From: Ian Jackson Date: Sun, 13 May 2012 12:59:43 +0000 (+0100) Subject: strategy: new, wip X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke-formulae.git;a=commitdiff_plain;h=f0f7eceb4c3b65e4728d0b04b23e28906d5038fb strategy: new, wip --- diff --git a/article.tex b/article.tex index 18c75df..eb490e6 100644 --- a/article.tex +++ b/article.tex @@ -50,6 +50,10 @@ \newcommand{\pcy}{\pay{C}} \newcommand{\pcn}{\pan{C}} +\newcommand{\pd}{\pa{D}} +\newcommand{\pdy}{\pay{D}} +\newcommand{\pdn}{\pan{D}} + \newcommand{\pl}{\pa{L}} \newcommand{\ply}{\pay{L}} \newcommand{\pln}{\pan{L}} diff --git a/strategy.tex b/strategy.tex index 6fb4b4f..d9a2545 100644 --- a/strategy.tex +++ b/strategy.tex @@ -91,7 +91,7 @@ We run the following algorithm: \item Set $\allpatches = \{ \}$. \item Repeatedly: \begin{enumerate} -\item Clear out the graph $\hasdirdep$ so it has neither nodes nor edges. +\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} @@ -99,21 +99,85 @@ We run the following algorithm: {\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 Let $\set S_{\pcn} = h(\pcn) + +\item Let +$$ + \set S = h(\pcn) \cup \bigcup_{\p \in \allpatches} \bigcup_{H \in h(\pn) \lor H \in h(\py)} - \{ \baseof{E} \; | \; E \in \pendsof{H}{\pcy} \} $ + \{ \baseof{E} \; | \; E \in \pendsof{H}{\pcy} \} +$$ and $W = w(h(\pcn))$ -We write $\set S = \set S_{\pcn}$ where unambiguous. -\item While $\exists_{S \in \set S} S \ge W$: +\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 order 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_{S_i, j