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)
11 Commit C is annotated with:
14 Either P s.t. C \elem P
15 or \bottom meaning \notexists_{P} C \elem P.
17 For every Px, E(C,Px+)
18 Implicitly for C \elem Pc+, E(C,Pc+) = { C }
19 and this is not annotated explicitly.
20 Also implicitly for P(C) = \bottom, \forall_{Px} E(C,Px+) = { }
21 and this is also not annotated explicitly.
29 D \isin C <=> D \isin A v D = C
33 A \haspatch P <=> C \haspatch P
34 For A \notelem Px+: E(C,Px+) = E(A,Px+)
35 A \elem Px+: E(C,Px+) = { C } -- not annotated
43 D \isin C <=> D \notelement Pr+ ^ D \isin L
46 P(R+) = Pr+, P(R-) = Pr-
47 E(L,Pr+) = { R+ } -- nontrivial, may need R+' = merge of E(L,Pr+)
53 If C \elem P+, B(C) = B(L); otherwise B(C) n/a
54 For P = Pr: C \nothaspatch Pr
55 E(C,Pr+) = E(L,Pr+) = { R+ }
56 P != Pr: C \haspatch P <=> L \haspatch P
65 D \isin C <=> [ (D \isin L ^ D \isin R) v D = C : T ]
66 [ D \notisin L ^ D \notisin R ^ D != C : F ]
67 [ otherwise : D \notisin M ]
72 R \elem P+ ^ B(R) = B(L) -- only merge tips with same base
73 v R \elem P- ^ R >= B(L) ^ M = B(L) -- base when merging into tip
76 If L \haspatch P <=/=> R \haspatch P:
77 \forall Ce \elem E(R,P+): Ce <= L -- may need to merge E(R,P+) into L
82 For C \notelem P+: n/a
83 C \elem P+, R \elem P+: B(L) = B(R)
84 C \elem P+, R \notelem P+: R >= B(L)
87 For L \nothaspatch P, R \nothaspatch P: F
88 L \haspatch P, R \haspatch P: T
89 otherwise: M \nothaspatch P
90 E(C,P+) = maximal elements of E(L,P+) \union E(R,P+)
91 = { Cl | \notexist Cr \elem E(R,P+): Cr >= Cl } \union
92 { Cr | \notexist Cl \elem E(L,P+): Cl >= Cr }
94 -- to reintroduce a dep, set P(C)=P(L)=Pl-, P(R)=Pr+, M=B(R)
95 where L \notelem Pr obv.
104 P(L) = Pl+ v P(L) = \bottom
109 D \isin B <=> D \isin L v D = B
115 B \haspatch P <=> L \haspatch P
128 D \isin C <=> D \isin B v D = C
134 For P != Pb: B \haspatch P