chiark / gitweb /
wip traversal
[topbloke-formulae.git] / trav-proofs.tex
1 \section{Traversal phase --- proofs}
2
3 For each operation called for by the traversal algorithms, we prove
4 that the commit generation preconditions are met.
5
6 WIP WHAT ABOUT PROVING ALL THE TRAVERSAL RESULTS
7
8 \subsection{Base Dependency Merge, Base Sibling Merge}
9
10 We do not prove that the preconditions are met.  Instead, we check
11 them at runtime.  If they turn out not to be met, we abandon
12 \alg{Merge-Base} and resort to \alg{Recreate-Base}.
13
14 TODO COMPLETE MERGE-BASE STUFF
15
16 WIP WHAT ABOUT PROVING ALL THE TRAVERSAL RESULTS
17
18 \subsection{Recreate Base Beginning}
19
20 WHAT IF $\pendsof{L}{\pqy} \neq \{\}$ ?
21 FIX BY CHANGE PRECOND OF CREATE BASE
22
23 \subsection{Tip Base Merge}
24
25 $L = W$, $R = \tipcn$.
26
27 TODO TBD
28
29 Afterwards, $\baseof{W} = \tipcn$.
30
31 \subsection{Tip Source Merge}
32
33 In fact, we do this backwards: $L = S$, $R = W$.  Since $S \in \pcy$,
34 the resulting $C \in \pcy$ and the remaining properties of the Merge
35 commit construction are symmetrical in $L$ and $R$ so this is fine.
36
37 By the results of Tip Base Merge, $\baseof{W} = \tipcn$.
38
39 By Base Ends Supreme, $\tipcn \ge \baseof{S}$ i.e.
40 $\baseof{R} \ge \baseof{L}$.
41
42 Either $\baseof{L} = \baseof{M}$, or we must choose a different $M$ in
43 which case $M = \baseof{S}$ will suffice.
44