X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=trav-alg.tex;h=df5e4cd8fb3b5e47532215b754ea66b6816fb0c1;hb=0ef6782afa245b0744d82dc7ff2d5a34a1fe2dc1;hp=37d91941ef952d2b9ad6550a25e19ddb58421b71;hpb=8ee16bd8a84437fc51257805eb234c4dee054889;p=topbloke-formulae.git diff --git a/trav-alg.tex b/trav-alg.tex index 37d9194..df5e4cd 100644 --- a/trav-alg.tex +++ b/trav-alg.tex @@ -1,7 +1,7 @@ \section{Traversal phase --- algorithm} (In general, unless stated otherwise below, when we generate a new -commit $C$ using one of the commit kind algorith, we update +commit $C$ using one of the commit kind recipies, we update $W \assign C$. In any such case where we say we're going to Merge with $L = W$, if $R \ge W$ we do not Merge but instead simply set $W \assign R$.) @@ -23,13 +23,26 @@ lowest first: \end{enumerate} -After processing each $\pc$ we will have created: - -\begin{itemize} - -\item $\tipcn$ and $\tipcy$ such that $\baseof{\tipcy} = \tipcn$. - -\end{itemize} +After processing each $\pc$ we will have created $\tipcn$ and $\tipcy$ +such that: + +\statement{Correct Base}{ + \baseof{\tipcy} = \tipcn +} +\statement{Base Correct Contents}{ + \tipcn \haspatch \pa E + \equiv + \pa E \isdep \pc +} +\statement{Tip Exceeds Inputs}{ + \tipcy \ge \pendsof{\allsrcs}{\pcy} +} +\statement{Base Exceeds Inputs' Bases}{ + \bigforall_{E \in \pendsof{\allsrcs}{\pcy}} \tipcn \ge \baseof{E} +} +\statement{Base Exceeds Base Inputs}{ + \bigforall_{H \in \set H^{\pn}} \tipcn \ge H +} \subsection{$\alg{Merge-Base}(\pc)$} @@ -58,10 +71,10 @@ In some order, perhaps interleaving the two kinds of merge: \begin{enumerate} -\item For each $\pd \isdirdep \pc$, find a merge base +\item For each $\hasdep$-maximal $\pd \isdirdep \pc$, find a merge base $M \le W,\; \le \tipdy$ and merge $\tipdy$ into $W$. That is, use $\alg{Merge}$ with $L = W,\; R = \tipdy$. -(Dependency Merge.) +(Base Dependency Merge.) \item For each $S \in S^{\pcn}_i$, merge it into $W$. That is, use $\alg{Merge}$ with $L = W,\; R = S,\; M = M^{\pcn}_i$. @@ -73,6 +86,11 @@ That is, use $\alg{Merge}$ with $L = W,\; R = S,\; M = M^{\pcn}_i$. Execute $\alg{Fixup-Base}(W,\pc)$. +TODO define Fixup-Base + +\subsubsection{Result} + +If all of that was successful, let $\tipcn = W$. \subsection{$\alg{Recreate-Base}(\pc)$} @@ -84,7 +102,7 @@ Choose a $\hasdep$-maximal direct dependency $\pd$ of $\pc$. \item -Use $\alg{Create Base}$ with $L$ = $\pdy,\; \pq = \pc$ to generate $C$ +Use $\alg{Create Base}$ with $L$ = $\tipdy,\; \pq = \pc$ to generate $C$ and set $W \iassign C$. (Recreate Base Beginning.) \item @@ -94,7 +112,7 @@ Execute the subalgorithm $\alg{Recreate-Recurse}(\pc)$. \item Declare that we contain all of the relevant information from the -sources. That is, use $\alg{Pseudo-merge}$ with $L = W, \; +sources. That is, use $\alg{Pseudo-Merge}$ with $L = W, \; \set R = \{ W \} \cup \set S^{\pcn}$. (Recreate Base Final Declaration.) @@ -108,12 +126,12 @@ sources. That is, use $\alg{Pseudo-merge}$ with $L = W, \; \item TODO what about non-Topbloke base branches -\item Use $\alg{Pseudo-Merge}$ with $L = W,\; \set R = \{ \tipdn \}$. -(Recreate Base Dependency Base Declaration.) - \item For all $\hasdep$-maximal $\pd' \isdirdep \pd$, execute $\alg{Recreate-Recurse}(\pd')$. +\item Use $\alg{Pseudo-Merge}$ with $L = W,\; \set R = \{ \tipdn \}$. +(Recreate Base Dependency Base Declaration.) + \item Use $\alg{Merge}$ to apply $\pd$ to $W$. That is, $L = W, \; R = \tipdy, \; M = \baseof{R} = \tipdn$. (Recreate Reapply.)