3 C >= D C is descendant of D, partial order
4 C \haspatch D C contains changes from D, partial order
5 Patch P has two sets P+, P-
6 Ancestors A(C,P) = { Ca \elem C | Ca \elem P }
7 Ends E(C,P) = maximal elements of A(C,P)
9 C \haspatch P <=> [ \forall D \elem P+: D \isin C <=> D <= C ]
10 C \nothaspatch P <=> [ \forall D \elem P+: D \notisin C ]
14 Commit C is annotated with:
17 Either P s.t. C \elem P
18 or \bottom meaning \notexists_{P} C \elem P.
20 For every Px, E(C,Px+)
21 Implicitly for C \elem Pc+, E(C,Pc+) = { C }
22 and this is not annotated explicitly.
23 Also implicitly for P(C) = \bottom, \forall_{Px} E(C,Px+) = { }
24 and this is also not annotated explicitly.
32 D \isin C <=> D \isin A v D = C
36 A \haspatch P <=> C \haspatch P
37 For A \notelem Px+: E(C,Px+) = E(A,Px+)
38 A \elem Px+: E(C,Px+) = { C } -- not annotated
46 D \isin C <=> D \notelement Pr+ ^ D \isin L
49 P(R+) = Pr+, P(R-) = Pr-
50 E(L,Pr+) = { R+ } -- nontrivial, may need R+' = merge of E(L,Pr+)
56 If C \elem P+, B(C) = B(L); otherwise B(C) n/a
57 For P = Pr: C \nothaspatch Pr
58 E(C,Pr+) = E(L,Pr+) = { R+ }
59 P != Pr: C \haspatch P <=> L \haspatch P
68 D \isin C <=> [ (D \isin L ^ D \isin R) v D = C : T ]
69 [ D \notisin L ^ D \notisin R ^ D != C : F ]
70 [ otherwise : D \notisin M ]
75 R \elem P+ ^ B(R) = B(L) -- only merge tips with same base
76 v R \elem P- ^ R >= B(L) ^ M = B(L) -- base when merging into tip
79 If L \haspatch P <=/=> R \haspatch P:
80 \forall Ce \elem E(R,P+): Ce <= L -- may need to merge E(R,P+) into L
85 For C \notelem P+: n/a
86 C \elem P+, R \elem P+: B(L) = B(R)
87 C \elem P+, R \notelem P+: R >= B(L)
90 For L \nothaspatch P, R \nothaspatch P: F
91 L \haspatch P, R \haspatch P: T
92 otherwise: M \nothaspatch P
93 E(C,P+) = maximal elements of E(L,P+) \union E(R,P+)
94 = { Cl | \notexist Cr \elem E(R,P+): Cr >= Cl } \union
95 { Cr | \notexist Cl \elem E(L,P+): Cl >= Cr }
97 -- to reintroduce a dep, set P(C)=P(L)=Pl-, P(R)=Pr+, M=B(R)
98 where L \notelem Pr obv.
107 P(L) = Pl+ v P(L) = \bottom
112 D \isin B <=> D \isin L v D = B
118 B \haspatch P <=> L \haspatch P
131 D \isin C <=> D \isin B v D = C
137 For P != Pb: B \haspatch P