chiark / gitweb /
59ae0eba401b1524ab74b771753d929dcbecfb5f
[topbloke-formulae.git] / article.tex
1 \documentclass[a4paper,leqno]{strayman}
2 \errorcontextlines=50
3 \let\numberwithin=\notdef
4 \usepackage{amsmath}
5 \usepackage{mathabx}
6 \usepackage{txfonts}
7 \usepackage{amsfonts}
8 \usepackage{eufrak}
9 \usepackage{mdwlist}
10 %\usepackage{lastpage}
11 %\usepackage{accents}
12
13 \usepackage{fancyhdr}
14 \pagestyle{fancy}
15 \rhead[\rightmark]{}
16 \lhead[]{\rightmark}
17 \rfoot[\thepage]{\input{revid.inc}}
18 \lfoot[\input{revid.inc}]{\thepage}
19
20 \let\stdsection\section
21 \renewcommand\section{\newpage\stdsection}
22
23 \renewcommand{\ge}{\geqslant}
24 \renewcommand{\le}{\leqslant}
25 \newcommand{\nge}{\ngeqslant}
26 \newcommand{\nle}{\nleqslant}
27
28 \newcommand{\has}{\sqsupseteq}
29 \newcommand{\isin}{\sqsubseteq}
30
31 \newcommand{\nothaspatch}{\mathrel{\,\not\!\not\relax\haspatch}}
32 \newcommand{\notpatchisin}{\mathrel{\,\not\!\not\relax\patchisin}}
33 \newcommand{\haspatch}{\sqSupset}
34 \newcommand{\patchisin}{\sqSubset}
35 %\newcommand{\zhaspatch}{\mathrel{\underset{\fullmoon}\sqSupset}}
36 \newcommand{\zhaspatch}{\mathrel{\sqSupset_\varnothing\mkern-4mu}}
37
38         \newif\ifhidehack\hidehackfalse
39         \DeclareRobustCommand\hidefromedef[2]{%
40           \hidehacktrue\ifhidehack#1\else#2\fi\hidehackfalse}
41         \newcommand{\pa}[1]{\hidefromedef{\varmathbb{#1}}{#1}}
42
43 \newcommand{\stmt}[1]{\mathfrak{#1}}
44
45 \newcommand{\set}[1]{\mathbb{#1}}
46 \newcommand{\pay}[1]{\pa{#1}^+}
47 \newcommand{\pan}[1]{\pa{#1}^-}
48
49 \newcommand{\p}{\pa{P}}
50 \newcommand{\py}{\pay{P}}
51 \newcommand{\pn}{\pan{P}}
52
53 \newcommand{\pc}{\pa{C}}
54 \newcommand{\pcy}{\pay{C}}
55 \newcommand{\pcn}{\pan{C}}
56
57 \newcommand{\pd}{\pa{D}}
58 \newcommand{\pdy}{\pay{D}}
59 \newcommand{\pdn}{\pan{D}}
60
61 \newcommand{\pl}{\pa{L}}
62 \newcommand{\ply}{\pay{L}}
63 \newcommand{\pln}{\pan{L}}
64
65 \newcommand{\pq}{\pa{Q}}
66 \newcommand{\pqy}{\pay{Q}}
67 \newcommand{\pqn}{\pan{Q}}
68
69 \newcommand{\pr}{\pa{R}}
70 \newcommand{\pry}{\pay{R}}
71 \newcommand{\prn}{\pan{R}}
72
73 %\newcommand{\hasparents}{\underaccent{1}{>}}
74 %\newcommand{\hasparents}{{%
75 %  \declareslashed{}{_{_1}}{0}{-0.8}{>}\slashed{>}}}
76 \newcommand{\hasparents}{>_{\mkern-7.0mu _{1:}}}
77 \newcommand{\areparents}{<_{\mkern-14.0mu _{1:}\mkern+5.0mu}}
78
79 \renewcommand{\implies}{\Rightarrow}
80 \renewcommand{\equiv}{\Leftrightarrow}
81 \renewcommand{\nequiv}{\nLeftrightarrow}
82 \renewcommand{\land}{\wedge}
83 \renewcommand{\lor}{\vee}
84
85 \newcommand{\pancs}{{\mathcal A}}
86 \newcommand{\pends}{{\mathcal E}}
87
88 \newcommand{\pancsof}[2]{\pancs ( #1 , #2 ) }
89 \newcommand{\pendsof}[2]{\pends ( #1 , #2 ) }
90
91 %\newcommand{\commitmerge}{\text{\commitmergename}}
92 \newcommand{\commitmergeof}[4]{#1 \has \stmtmergeof{#2}{#3}{#4}}
93 %\newcommand{\merge}[4]{{#2 {{\frac{ #1 }{ #3 } #4}}}}
94 \newcommand{\commitmergename}{Git Merge}
95
96 \newcommand{\patch}{{\mathcal P}}
97 \newcommand{\base}{{\mathcal B}}
98 \newcommand{\depsreq}{{\mathcal G}}
99
100 \newcommand{\allsrcs}{\set U}
101 \newcommand{\allreach}{\set O}
102 \newcommand{\allreachof}[1]{\set O^{#1}}
103
104 \newcommand{\patchof}[1]{\patch ( #1 ) }
105 \newcommand{\baseof}[1]{\base ( #1 ) }
106 \newcommand{\depsreqof}[1]{\depsreq ( #1 ) }
107
108 \newcommand{\foreign}{\pa F}
109 \newcommand{\isforeign}[1]{#1 \in \foreign}
110
111 \newcommand{\allpatches}{\Upsilon}
112 \newcommand{\assign}{\leftarrow}
113 \newcommand{\iassign}{\leftarrow}
114 %\newcommand{\assign}{' =}
115
116 \newcommand{\mergeof}[3]{\left\langle #1 \;\middle\langle #2 \middle\rangle\; #3 \right\rangle}
117
118 \newcommand{\alg}[1]{\text{\bf #1}}
119 \newcommand{\setmerge}{\mergeof{}{}{}}
120 \newcommand{\setmergeof}[3]{\mergeof{#1}{#2}{#3}}
121 \newcommand{\stmtmergeof}[3]{\mergeof{#1}{#2}{#3}}
122
123 %\newcommand{\setmergeof}[3]{\setmerge\left\lgroup #1 \;\middle\lmoustache\; #2 \;\middle\rmoustache\; #3 \right\rgroup}
124 %\newcommand{\setmergeof}[3]{\setmerge\left\rmoustache #1 \middle\rmoustache #2 \middle\lmoustache #3 \right\lmoustache}
125 %\newcommand{\setmergeof}[3]{\setmerge\left\lfloor #1 \middle\lfloor #2 \middle\rfloor #3 \right\rfloor}
126
127 \newcommand{\eqntag}[2]{ #2 \tag*{\mbox{#1}} }
128 \newcommand{\eqn}[2]{ #2 \tag*{\mbox{\bf #1}} }
129
130 \newcommand{\hasdirdep}{\succ_{\mkern-7.0mu _1}}
131 \newcommand{\hasdep}{\succ}
132 \newcommand{\isdep}{\prec}
133 \newcommand{\isdirdep}{\prec_{\mkern-18.0mu _1}{\mkern+10mu}}
134
135 \newcommand{\tip}{ T }
136 \newcommand{\tipa}[1]{ \tip^{#1} }
137 \newcommand{\tipcn}{ \tipa \pcn }
138 \newcommand{\tipcy}{ \tipa \pcy }
139 \newcommand{\tipdn}{ \tipa \pdn }
140 \newcommand{\tipdy}{ \tipa \pdy }
141
142 \newcommand{\tippy}{ \tipa \py }
143
144 %\newcommand{\bigforall}{\mathop{\hbox{\huge$\forall$}}}
145 \newcommand{\bigforall}{%
146   \mathop{\mathchoice%
147     {\hbox{\huge$\forall$}}%
148     {\hbox{\Large$\forall$}}%
149     {\hbox{\normalsize$\forall$}}%
150     {\hbox{\scriptsize$\forall$}}}%
151 }
152 \newcommand{\bigexists}{%
153   \mathop{\mathchoice%
154     {\hbox{\huge$\exists$}}%
155     {\hbox{\Large$\exists$}}%
156     {\hbox{\normalsize$\exists$}}%
157     {\hbox{\scriptsize$\exists$}}}%
158 }
159
160 \newcommand{\Largeexists}{\mathop{\hbox{\Large$\exists$}}}
161 \newcommand{\Largenexists}{\mathop{\hbox{\Large$\nexists$}}}
162
163 \newcommand{\qed}{\square}
164 \newcommand{\proofstarts}{{\it Proof:}}
165 \newcommand{\proof}[1]{\proofstarts #1 $\qed$}
166
167 \newcommand{\commitproof}[1]{{\bf Proof of commit generation conditions:}
168  #1 $\qed$}
169 \newcommand{\condproof}[2]{
170
171 {\it #1:} #2
172
173 }
174
175 \newcommand{\statement}[2]{\[\eqn{ #1 }{ #2 }\]}
176
177 \newcommand{\gathbegin}{\begin{gather} \tag*{}}
178 \newcommand{\gathnext}{\\ \tag*{}}
179
180 \newcommand{\true}{t}
181 \newcommand{\false}{f}
182
183 \begin{document}
184
185 \chapter{Data model}
186
187 \input{notation.tex}
188 \input{invariants.tex}
189 \input{lemmas.tex}
190 \input{annotations.tex}
191
192 \input{simple.tex}
193 \input{create-base.tex}
194 \input{create-tip.tex}
195 \input{anticommit.tex}
196 \input{merge.tex}
197 \input{pseudomerge.tex}
198
199 \chapter{Update strategy}
200
201 \input{strategy.tex}
202 \input{ranking.tex}
203 \input{traversal.tex}
204
205 %\AtEndDocument{\par\bigskip\centerline{\Large\bfseries Document ends here}}
206
207 \par$\bigboxdot$
208
209 \end{document}