X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=article.tex;h=5df0d91f722c49c48cd097c47bb1a7f650ab52bd;hb=9ad96b436e0c1ddc5c4fb5074c588644e88c0bae;hp=840627459348792bba4c3fbecec830dedb74d743;hpb=21d4ab7d99e6a0a73e88badeb8183ae47185c07f;p=topbloke-formulae.git diff --git a/article.tex b/article.tex index 8406274..5df0d91 100644 --- a/article.tex +++ b/article.tex @@ -1,28 +1,44 @@ -\documentclass[a4paper]{strayman} +\documentclass[a4paper,leqno]{strayman} +\errorcontextlines=50 \let\numberwithin=\notdef +\usepackage{amsmath} \usepackage{mathabx} -\usepackage{stmaryrd} -\usepackage{slashed} \usepackage{txfonts} \usepackage{amsfonts} \usepackage{mdwlist} %\usepackage{accents} +\usepackage{fancyhdr} +\pagestyle{fancy} +\rhead[\rightmark]{} +\lhead[]{\rightmark} +\rfoot[\thepage]{\input{revid.inc}} +\lfoot[\input{revid.inc}]{\thepage} + +\let\stdsection\section +\renewcommand\section{\newpage\stdsection} + \renewcommand{\ge}{\geqslant} \renewcommand{\le}{\leqslant} +\newcommand{\nge}{\ngeqslant} +\newcommand{\nle}{\nleqslant} \newcommand{\has}{\sqsupseteq} \newcommand{\isin}{\sqsubseteq} -\newcommand{\nothaspatch}{{% - \declareslashed{}{\sslash}{-0.04}{0}{\sqSupset}\slashed{\sqSupset}}} -\newcommand{\notpatchisin}{{% - \declareslashed{}{\sslash}{-0.04}{0}{\sqSubset}\slashed{\sqSubset}}} +\newcommand{\nothaspatch}{\mathrel{\,\not\!\not\relax\haspatch}} +\newcommand{\notpatchisin}{\mathrel{\,\not\!\not\relax\patchisin}} \newcommand{\haspatch}{\sqSupset} \newcommand{\patchisin}{\sqSubset} +%\newcommand{\zhaspatch}{\mathrel{\underset{\fullmoon}\sqSupset}} +\newcommand{\zhaspatch}{\mathrel{\sqSupset_\varnothing\mkern-4mu}} + + \newif\ifhidehack\hidehackfalse + \DeclareRobustCommand\hidefromedef[2]{% + \hidehacktrue\ifhidehack#1\else#2\fi\hidehackfalse} + \newcommand{\pa}[1]{\hidefromedef{\varmathbb{#1}}{#1}} -\newcommand{\set}[1]{\mathbb #1} -\newcommand{\pa}[1]{\varmathbb #1} +\newcommand{\set}[1]{\mathbb{#1}} \newcommand{\pay}[1]{\pa{#1}^+} \newcommand{\pan}[1]{\pa{#1}^-} @@ -30,64 +46,145 @@ \newcommand{\py}{\pay{P}} \newcommand{\pn}{\pan{P}} -%\newcommand{\hasparents}{\underaccent{1}{>}} -%\newcommand{\hasparents}{{% -% \declareslashed{}{_{_1}}{0}{-0.8}{>}\slashed{>}}} -\newcommand{\hasparents}{>_{\mkern-7.0mu _1}} -\newcommand{\areparents}{<_{\mkern-14.0mu _1\mkern+5.0mu}} +\newcommand{\pc}{\pa{C}} +\newcommand{\pcy}{\pay{C}} +\newcommand{\pcn}{\pan{C}} -\newcommand{\implies}{\Rightarrow} +\newcommand{\pd}{\pa{D}} +\newcommand{\pdy}{\pay{D}} +\newcommand{\pdn}{\pan{D}} -\newcommand{\pancs}[2]{{\mathcal A} ( #1 , #2 ) } -\newcommand{\pends}[2]{{\mathcal E} ( #1 , #2 ) } +\newcommand{\pl}{\pa{L}} +\newcommand{\ply}{\pay{L}} +\newcommand{\pln}{\pan{L}} -\begin{document} +\newcommand{\pq}{\pa{Q}} +\newcommand{\pqy}{\pay{Q}} +\newcommand{\pqn}{\pan{Q}} -\section{Notation} +\newcommand{\pr}{\pa{R}} +\newcommand{\pry}{\pay{R}} +\newcommand{\prn}{\pan{R}} -\begin{basedescript}{ -\desclabelwidth{5em} -\desclabelstyle{\nextlinelabel} +%\newcommand{\hasparents}{\underaccent{1}{>}} +%\newcommand{\hasparents}{{% +% \declareslashed{}{_{_1}}{0}{-0.8}{>}\slashed{>}}} +\newcommand{\hasparents}{>_{\mkern-7.0mu _{1:}}} +\newcommand{\areparents}{<_{\mkern-14.0mu _{1:}\mkern+5.0mu}} + +\renewcommand{\implies}{\Rightarrow} +\renewcommand{\equiv}{\Leftrightarrow} +\renewcommand{\nequiv}{\nLeftrightarrow} +\renewcommand{\land}{\wedge} +\renewcommand{\lor}{\vee} + +\newcommand{\pancs}{{\mathcal A}} +\newcommand{\pends}{{\mathcal E}} + +\newcommand{\pancsof}[2]{\pancs ( #1 , #2 ) } +\newcommand{\pendsof}[2]{\pends ( #1 , #2 ) } + +%\newcommand{\commitmerge}{\text{\commitmergename}} +\newcommand{\commitmergeof}[4]{#1 \approx \stmtmergeof{#2}{#3}{#4}} +%\newcommand{\merge}[4]{{#2 {{\frac{ #1 }{ #3 } #4}}}} +\newcommand{\commitmergename}{Git Merge} + +\newcommand{\patch}{{\mathcal P}} +\newcommand{\base}{{\mathcal B}} +\newcommand{\depsreq}{{\mathcal G}} + +\newcommand{\allsrcs}{\set U} + +\newcommand{\patchof}[1]{\patch ( #1 ) } +\newcommand{\baseof}[1]{\base ( #1 ) } +\newcommand{\depsreqof}[1]{\depsreq ( #1 ) } + +\newcommand{\foreign}{\pa F} +\newcommand{\isforeign}[1]{#1 \in \foreign} + +\newcommand{\allpatches}{\Upsilon} +\newcommand{\assign}{\leftarrow} +\newcommand{\iassign}{\leftarrow} +%\newcommand{\assign}{' =} + +\newcommand{\mergeof}[3]{\left\langle #1 \;\middle\langle #2 \middle\rangle\; #3 \right\rangle} + +\newcommand{\alg}[1]{\text{\bf #1}} +\newcommand{\setmerge}{\mergeof{}{}{}} +\newcommand{\setmergeof}[3]{\mergeof{#1}{#2}{#3}} +\newcommand{\stmtmergeof}[3]{\mergeof{#1}{#2}{#3}} + +%\newcommand{\setmergeof}[3]{\setmerge\left\lgroup #1 \;\middle\lmoustache\; #2 \;\middle\rmoustache\; #3 \right\rgroup} +%\newcommand{\setmergeof}[3]{\setmerge\left\rmoustache #1 \middle\rmoustache #2 \middle\lmoustache #3 \right\lmoustache} +%\newcommand{\setmergeof}[3]{\setmerge\left\lfloor #1 \middle\lfloor #2 \middle\rfloor #3 \right\rfloor} + +\newcommand{\eqntag}[2]{ #2 \tag*{\mbox{#1}} } +\newcommand{\eqn}[2]{ #2 \tag*{\mbox{\bf #1}} } + +\newcommand{\hasdirdep}{\succ_{\mkern-7.0mu _1}} +\newcommand{\hasdep}{\succ} +\newcommand{\isdep}{\prec} +\newcommand{\isdirdep}{\prec_{\mkern-18.0mu _1}{\mkern+10mu}} + +\newcommand{\tip}{ T } +\newcommand{\tipa}[1]{ \tip^{#1} } +\newcommand{\tipcn}{ \tipa \pcn } +\newcommand{\tipcy}{ \tipa \pcy } +\newcommand{\tipdn}{ \tipa \pdn } +\newcommand{\tipdy}{ \tipa \pdy } + +%\newcommand{\bigforall}{\mathop{\hbox{\huge$\forall$}}} +\newcommand{\bigforall}{% + \mathop{\mathchoice% + {\hbox{\huge$\forall$}}% + {\hbox{\Large$\forall$}}% + {\hbox{\normalsize$\forall$}}% + {\hbox{\scriptsize$\forall$}}}% +} +\newcommand{\bigexists}{% + \mathop{\mathchoice% + {\hbox{\huge$\exists$}}% + {\hbox{\Large$\exists$}}% + {\hbox{\normalsize$\exists$}}% + {\hbox{\scriptsize$\exists$}}}% } -\item[ $ C \hasparents \set X $ ] -The parents of commit $C$ are exactly the set -$\set X$. -\item[ $ C \ge D $ ] -$C$ is a descendant of $D$ in the git commit -graph. This is a partial order, namely the transitive closure of -$ D \in \set X $ where $ C \hasparents \set X $. +\newcommand{\Largeexists}{\mathop{\hbox{\Large$\exists$}}} +\newcommand{\Largenexists}{\mathop{\hbox{\Large$\nexists$}}} -\item[ $ C \has D $ ] -Informally, the tree at commit $C$ contains the change -made in commit $D$. Does not take account of deliberate reversions by -the user or in non-Topbloke-controlled branches; these are considered -normal, forward, commits. For merges and Topbloke-generated -anticommits, the ``change made'' is only to be thought of as any -conflict resolution. This is not a partial order because it is not -transitive. +\newcommand{\qed}{\square} +\newcommand{\proofstarts}{{\it Proof:}} +\newcommand{\proof}[1]{\proofstarts #1 $\qed$} -\item[ $ \p, \py, \pn $ ] -A patch $\p$ consists of two sets of commits $\pn$ and $\py$, which -are respectively the base and tip git branches. $\p$ may be used -where the context requires a set, in which case the statement -is to be taken as applying to both $\py$ and $\pn$ -All these sets are distinct. +\newcommand{\statement}[2]{\[\eqn{ #1 }{ #2 }\]} -\end{basedescript} +\newcommand{\gathbegin}{\begin{gather} \tag*{}} +\newcommand{\gathnext}{\\ \tag*{}} -\section{Invariants} +\newcommand{\true}{t} +\newcommand{\false}{f} -No replay: \[ C \has D \implies C \ge D \] +\begin{document} -Unique base: \[ \mathop{\forall}_{C \in \py} \pends{C}{\pn} = \{ B \} \] +\chapter{Data model} -\section{Test more symbols} +\input{notation.tex} +\input{invariants.tex} +\input{lemmas.tex} +\input{annotations.tex} -$ C \haspatch \p $ +\input{simple.tex} +\input{create-base.tex} +\input{create-tip.tex} +\input{anticommit.tex} +\input{merge.tex} +\input{pseudomerge.tex} -$ C \nothaspatch \p $ +\chapter{Update strategy} -$ \{ B \} \areparents C $ +\input{strategy.tex} +\input{ranking.tex} +\input{trav-alg.tex} +\input{trav-proofs.tex} \end{document}