From: Ian Jackson Date: Sun, 27 May 2012 18:04:19 +0000 (+0100) Subject: strategy: notation: add \alg X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke-formulae.git;a=commitdiff_plain;h=519fc3cd6423a7972327911a61fc060ab2aa1fc1 strategy: notation: add \alg --- diff --git a/article.tex b/article.tex index 6ea245a..7a43732 100644 --- a/article.tex +++ b/article.tex @@ -101,6 +101,8 @@ \newcommand{\iassign}{\leftarrow} %\newcommand{\assign}{' =} +\newcommand{\alg}[1]{\text{\bf #1}} + \newcommand{\eqntag}[2]{ #2 \tag*{\mbox{#1}} } \newcommand{\eqn}[2]{ #2 \tag*{\mbox{\bf #1}} } diff --git a/strategy.tex b/strategy.tex index d6c06da..ad8db15 100644 --- a/strategy.tex +++ b/strategy.tex @@ -108,15 +108,15 @@ We run the following algorithm: \item Repeatedly: \begin{enumerate} \item Clear out the graph $\hasdirdep$ so it has no edges. -\item Execute {\bf Rank-Recurse}($\pc_0$) +\item Execute $\alg{Rank-Recurse}(\pc_0)$ \item Until $\allpatches$ remains unchanged. \end{enumerate} \end{enumerate} -{\bf Rank-Recurse}($\pc$) is: +$\alg{Rank-Recurse}(\pc)$ is: \begin{enumerate} -\item If we have already done {\bf Rank-Recurse}($\pc$) in this +\item If we have already done $\alg{Rank-Recurse}(\pc)$ in this ranking iteration, do nothing. Otherwise: \item Add $\pc$ to $\allpatches$ if it is not there already. @@ -155,7 +155,7 @@ if available. \item For each $i \ldots 1..n$, update our putative direct dependencies: $$ -\Gamma \assign \text{\bf set-merge}\left[\Gamma, +\Gamma \assign \alg{set-merge}\left[\Gamma, \left( \begin{cases} M_i \in \pcn : & \depsreqof{M_i} \\ M_i \not\in \pcn : & \{ \} @@ -164,7 +164,7 @@ $$ \right] $$ -TODO define {\bf set-merge} +TODO define $\alg{set-merge}$ \item Finalise our putative direct dependencies $ @@ -179,7 +179,7 @@ as necessary). If this results in a cycle, abort entirely (as the function $g$ is inappropriate; a different $g$ could work). \end{enumerate} -\item Run ${\text{\bf Rank-Recurse}}(\pd)$. +\item Run $\alg{Rank-Recurse}(\pd)$. \end{enumerate}