chiark / gitweb /
traversal: wip prove Recreate Base Beginning OK, currently need to prove Tip Correct...
[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{Traversal Lemmas}
9
10 Firstly, some lemmas.
11
12 \statement{Tip Correct Contents}{
13   \tipcy \haspatch \pd
14     \equiv
15   \pc = \pd \lor \pc \hasdep \pd
16 }
17 \proof{
18    WIP
19 }
20
21 \subsection{Base Dependency Merge, Base Sibling Merge}
22
23 We do not prove that the preconditions are met.  Instead, we check
24 them at runtime.  If they turn out not to be met, we abandon
25 \alg{Merge-Base} and resort to \alg{Recreate-Base}.
26
27 TODO COMPLETE MERGE-BASE STUFF
28
29 WIP WHAT ABOUT PROVING ALL THE TRAVERSAL RESULTS
30
31 \subsection{Recreate Base Beginning}
32
33 \subsubsection{Create Acyclic}
34
35 $L = \tipdy$ so
36
37 \subsection{Tip Base Merge}
38
39 $L = W$, $R = \tipcn$.
40
41 TODO TBD
42
43 Afterwards, $\baseof{W} = \tipcn$.
44
45 \subsection{Tip Source Merge}
46
47 In fact, we do this backwards: $L = S$, $R = W$.  Since $S \in \pcy$,
48 the resulting $C \in \pcy$ and the remaining properties of the Merge
49 commit construction are symmetrical in $L$ and $R$ so this is fine.
50
51 By the results of Tip Base Merge, $\baseof{W} = \tipcn$.
52
53 By Base Ends Supreme, $\tipcn \ge \baseof{S}$ i.e.
54 $\baseof{R} \ge \baseof{L}$.
55
56 Either $\baseof{L} = \baseof{M}$, or we must choose a different $M$ in
57 which case $M = \baseof{S}$ will suffice.
58