X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke-formulae.git;a=blobdiff_plain;f=strategy.tex;h=833f5bdfe06fe6c2846815c66dcde91002d674be;hp=d6c06da777300d25afde45747f9c36a919cf9266;hb=29dc9ebb649e71ccdee72c704377fbe623705404;hpb=5dcbf70314a603f304c34e5cdebfc7e6914eb676 diff --git a/strategy.tex b/strategy.tex index d6c06da..833f5bd 100644 --- a/strategy.tex +++ b/strategy.tex @@ -50,6 +50,10 @@ the $\le$-maximal elements of $\bigcup_{J \in \set J} \pendsof{J}{\p}$ Convenience notation for $\bigforall_{E \in \pendsof{\set X}{\p}} E \le T$ +\item[ $\allsrcs$ ] +$\bigcup_{\p \in \allpatches} \set H^{\pn} \cup \set H^{\py}$. +All the input commits to the update algorithm. (See below.) + %\item[ $\set E_{\pc}$ ] %$ \bigcup_i \pendsof{S_{\pc,i}}{\pc} $. %All the ends of $\pc$ in the sources. @@ -70,7 +74,7 @@ $\bigforall_{E \in \pendsof{\set X}{\p}} E \le T$ The topmost patch which we are trying to update. This and all of its dependencies will be updated. -\item[ $h : \pc^{+/-} \mapsto \set H_{\pc^{+/-}}$ ] +\item[ $h : \pc^{+/-} \mapsto \set H^{\pc^{+/-}}$ ] Function for getting the existing heads $\set H$ of the branch $\pc^{+/-}$. These are the heads which will be merged and used in this update. This will include the current local and remote git refs, as desired. @@ -98,281 +102,58 @@ The desired direct dependencies of $\pc$, a set of patches. The set of all the patches we are dealing with (constructed during the update algorithm). -\end{basedescript} - -\section{Ranking phase} - -We run the following algorithm: -\begin{enumerate} -\item Set $\allpatches = \{ \}$. -\item Repeatedly: -\begin{enumerate} -\item Clear out the graph $\hasdirdep$ so it has no edges. -\item Execute {\bf Rank-Recurse}($\pc_0$) -\item Until $\allpatches$ remains unchanged. -\end{enumerate} -\end{enumerate} - -{\bf Rank-Recurse}($\pc$) is: -\begin{enumerate} - -\item If we have already done {\bf Rank-Recurse}($\pc$) in this -ranking iteration, do nothing. Otherwise: - -\item Add $\pc$ to $\allpatches$ if it is not there already. - -\item Set -$$ - \set S \iassign h(\pcn) - \cup - \bigcup_{\p \in \allpatches} - \bigcup_{H \in h(\pn) \lor H \in h(\py)} - \{ \baseof{E} \; | \; E \in \pendsof{H}{\pcy} \} -$$ - -and $W \iassign w(h(\pcn))$ - -\item While $\exists_{S \in \set S} S \ge W$, -update $W \assign S$ and $\set S \assign \set S \, \backslash \{ S \}$ - -(This will often remove $W$ from $\set S$. Afterwards, $\set S$ -is a collection of heads to be merged into $W$.) - -\item Choose an ordering of $\set S$, $S_i$ for $i=1 \ldots n$. - -\item For each $S_i$ in turn, choose a corresponding $M_i$ -such that $$ - M_i \le S_i \land \left[ - M_i \le W \lor \bigexists_{j= pendsof( O_pyn, Pyn ) +(Tip_pyn is computed during traversal for the patch p) -So, formally, we select somehow an order of sources $S_i$. For each +We ensure this property by: + - we do not generate any commits for pyn other than + during traversal for pyn + - so at the start of traversal pendsof ( O, pyn) = pendsof (U, pyn) + - the traversal steps will takes those pends + - during traversal for the patch set pyn + pendsof -Make use of the following recursive algorithm, Plan + - arranging that during traversal for the patch set pyn + +, we firstly + compute a tip_pyn which is >= pendsof(O) as follows: + there is a set of relevant ends + pendsof(U, + we initially set T + by virtue of it being >= pendsof(U) \cup + all lower tip_qyn + - +We do this by: + - firstly, Tip_pyn is only valid af + - recursively make a plan to merge all $E = \pends$ +Set of all reachable commits in a particular patch set. + This consists of + - input commits + - -Specifically, in