source: CIVL/doc/tutorial/preambular.tex@ c1c00b6

1.23 2.0 main test-branch
Last change on this file since c1c00b6 was 0c65483, checked in by Stephen Siegel <siegel@…>, 13 years ago

Working on tutorial, small changes to comments

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@310 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 6.7 KB
Line 
1%\usepackage{amsmath,amssymb,stmaryrd}
2\usepackage{graphicx}
3\usepackage{url}
4\usefonttheme[onlymath]{serif}
5
6\setbeamersize{text margin left=2mm, text margin right=1mm, %
7 sidebar width left=0mm, sidebar width right=3mm}
8\graphicspath{{../images/}}
9\author{Stephen F.\ Siegel}
10\institute{Department of Computer and Information Sciences\\University
11 of Delaware}
12%\newenvironment{pic}[4]{\begin{pgfpictureboxed}{#1}{#2}{#3}{#4}}{\end{pgfpictureboxed}}
13\newenvironment{pic}[4]{\begin{pgfpicture}{#1}{#2}{#3}{#4}}{\end{pgfpicture}}
14
15\newcommand{\myurl}[1]{\textcolor{blue}{\url{#1}}}
16
17\newcommand{\foot}[1]{%
18 \usefoottemplate{\hspace{0mm}\raisebox{1mm}[0mm][0mm]{%
19 \makebox[0pt][l]{\tiny
20 \color{blue!50}
21 S.F.\ Siegel $\diamond$
22 University of Delaware $\diamond$
23 #1 \hspace{1mm}
24 {\color{black!100}\insertframenumber}}}}}
25
26\newcommand{\code}[1]{\textcolor{blue}{\texttt{#1}}}
27
28\newcommand{\U}{{\ttfamily\symbol{'137}}}
29\newcommand{\lb}{\texttt{\char`\{}}
30\newcommand{\rb}{\texttt{\char`\}}}
31\newcommand{\bs}{\texttt{\char`\\}}
32\newcommand{\ra}{\rightarrow}
33\renewcommand{\implies}{\Rightarrow}
34\renewcommand{\iff}{\Leftrightarrow}
35%\renewcommand{\emptyset}{\varphi}
36\newcommand{\Z}{\mathbb{Z}}
37\newcommand{\N}{\mathbb{N}}
38\newcommand{\R}{\mathbb{R}}
39\newcommand{\spin}{\textsc{Spin}}
40\newcommand{\mpispin}{\textsc{Mpi-Spin}}
41\newcommand{\x}{\mathbf{x}}
42\newcommand{\y}{\mathbf{y}}
43\newcommand{\mat}[4]{\bigl(\begin{smallmatrix}#1&#2\\#3&#4\end{smallmatrix}\bigr)}
44
45\newcommand{\model}{\mathcal{M}}
46\newcommand{\vocab}{\mathcal{V}}
47\newcommand{\vars}{\mathcal{X}}
48\newcommand{\valof}[1]{\llbracket #1 \rrbracket}
49\newcommand{\valofma}[1]{\valof{#1}_{\model}(\alpha)}
50\newcommand{\true}{\textbf{T}}
51\newcommand{\false}{\textbf{F}}
52\newcommand{\satisfies}{\models}
53\newcommand{\infers}{\vdash}
54\newcommand{\sep}{\hspace{3mm}}
55\newcommand{\Vars}{\textsf{Vars}}
56\newcommand{\FV}{\textsf{FV}}
57\newcommand{\fmap}[1]{\lceil#1\rceil}
58\newcommand{\myForm}{\textbf{Form}}
59\newcommand{\Prop}{\textbf{Prop}}
60\newcommand{\PL}{\textsf{PL}}
61\newcommand{\FOL}{\textsf{FOL}}
62\newcommand{\BV}{\textsf{BV}}
63\newtheorem{proposition}{Proposition}
64\newcommand{\attribute}[1]{\par\begin{flushright}\tiny\textcolor{gray}{---\
65 #1}\end{flushright}\par}
66\newcommand{\pSymbs}{\textsf{pSymbs}}
67\newcommand{\NPL}{\mathcal{N}_{\textsf{PL}}}
68\newcommand{\Herb}{\mathcal{H}}
69\newcommand{\DHerb}{D_\Herb}
70\newcommand{\IH}{I_\Herb}
71\newcommand{\sorts}{\mathcal{S}}
72\newcommand{\bool}{\textsf{bool}}
73
74\newcommand{\theory}{\mathcal{T}}
75\newcommand{\aread}{\textit{read}}
76\newcommand{\awrite}{\textit{write}}
77\newcommand{\sarrow}{\leadsto}
78
79\newenvironment{hoare}{%
80 \begin{displaymath}%
81 \renewcommand{\arraystretch}{4}%
82 \begin{array}[t]{r@{.\hspace{4mm}}l@{\hspace{5mm}}l}%
83 }{%
84 \end{array}%
85 \end{displaymath}%
86}
87
88\newcommand{\bigtrip}[3]{%
89 {%
90 \renewcommand{\arraystretch}{1}%
91 \begin{array}[c]{l}%
92 {\color{blue}\{#1\}}\\\hspace{5mm}#2\\{\color{blue}\{#3\}}%
93 \end{array}%
94 }%
95}
96\newcommand{\ttrip}[3]{%
97 {%
98 \renewcommand{\arraystretch}{1}%
99 \begin{array}[c]{l}%
100 {\color{blue}[#1]}\\\hspace{5mm}#2\\{\color{blue}[#3]}%
101 \end{array}%
102 }%
103}
104\newcommand{\trip}[3]{%
105 {\color{blue}\{#1\}}\: #2\: {\color{blue}\{#3\}}%
106}
107\newcommand{\assign}{\textit{assign}}
108\newcommand{\seq}{\textit{seq}}
109\newcommand{\conseq}{\textit{conseq}}
110\newcommand{\pwhile}{\textbf{while}}
111\newcommand{\pdo}{\textbf{do}}
112\newcommand{\rwhile}{\textit{while}}
113\newcommand{\pskip}{\textbf{skip}}
114\newcommand{\pif}{\textbf{if}}
115\newcommand{\pelse}{\textbf{else}}
116\newcommand{\pthen}{\textbf{then}}
117
118\newcommand{\Ax}{\text{Ax}}
119\newcommand{\I}{\text{I}}
120\newcommand{\E}{\text{E}}
121\newcommand{\W}{\text{W}}
122\newcommand{\RAA}{\text{RAA}}
123
124\newcommand{\B}{\mathbb{B}}
125
126\newcommand{\opstyle}[1]{\textsf{\textcolor{blue}{#1}}}
127\newcommand{\TS}{\opstyle{TS}}
128\newcommand{\TT}{\opstyle{TT}}
129\newcommand{\LT}{\opstyle{LT}}
130\newcommand{\LL}{\opstyle{LL}}
131\newcommand{\TL}{\opstyle{TL}}
132\newcommand{\TE}{\opstyle{TE}}
133\newcommand{\ET}{\opstyle{ET}}
134
135\newcommand{\Act}{\opstyle{Act}}
136\newcommand{\AP}{\opstyle{AP}}
137\newcommand{\ul}{\opstyle{ul}}
138\newcommand{\ur}{\opstyle{ur}}
139\newcommand{\dl}{\opstyle{dl}}
140\newcommand{\dr}{\opstyle{dr}}
141\newcommand{\defeq}{\stackrel{\text{def}}{=}}
142\newcommand{\Post}{\opstyle{Post}}
143\newcommand{\Pre}{\opstyle{Pre}}
144\newcommand{\Reach}{\opstyle{Reach}}
145\newcommand{\dom}{\opstyle{dom}}
146%\newcommand{\true}{\textit{true}}
147%\newcommand{\false}{\textit{false}}
148\newcommand{\Eval}{\opstyle{Eval}}
149\newcommand{\Cond}{\opstyle{Cond}}
150\newcommand{\Loc}{\opstyle{Loc}}
151\newcommand{\Effect}{\opstyle{Effect}}
152\newcommand*{\hra}{\ensuremath{\lhook\joinrel\relbar\joinrel\rightarrow}}
153% use \xhookrightarrow{g:\alpha} instead
154\newcommand{\xra}[1]{\xrightarrow{#1}}
155\newcommand{\xhra}[1]{\xhookrightarrow{#1}}
156
157\newcommand{\PG}{\opstyle{PG}}
158\newcommand{\Var}{\opstyle{Var}}
159\newcommand{\tpc}{\;|||\;}
160\newcommand{\dpc}{\;||\;}
161\newcommand{\hand}[1]{\;||_{#1}\;}
162
163\newcommand{\Val}{\opstyle{Val}}
164
165\newcommand{\Chan}{\opstyle{Chan}}
166\newcommand{\capacity}{\opstyle{cap}}
167\newcommand{\Comm}{\opstyle{Comm}}
168\newcommand{\CS}{\opstyle{CS}}
169
170\newcommand{\len}{\opstyle{len}}
171
172\newcommand{\trace}{\opstyle{trace}}
173\newcommand{\Traces}{\opstyle{Traces}}
174\newcommand{\exinf}{\stackrel{\scriptstyle\infty}{\exists}}
175\newcommand{\Set}{\opstyle{Set}}
176\newcommand{\Stack}{\opstyle{Stack}}
177%\newcommand{\bool}{\opstyle{boolean}}
178\newcommand{\State}{\opstyle{State}}
179
180\newcommand{\BadPref}{\opstyle{BadPref}}
181\newcommand{\MinBadPref}{\opstyle{MinBadPref}}
182
183\newenvironment{mybox}[1]{%
184 \begin{footnotesize}%
185 \color{red}%
186 \begin{tabular}{@{}|c|@{}}%
187 \hline\\[-2.5mm]%
188 \begin{minipage}{#1}%
189 \color{black}%
190 }{%
191 \end{minipage}%
192 \\[-2.5mm] \\ \hline%
193 \end{tabular}%
194 \end{footnotesize}%
195}
196
197\newenvironment{mycbox}[1]{%
198 \begin{center}%
199 \begin{mybox}{#1}%
200 }{%
201 \end{mybox}%
202 \end{center}%
203}
204
205% CIVL-C keywords
206
207\newcommand{\cckey}{\$}
208\newcommand{\cc}[1]{\mbox{\textcolor{blue}{\texttt{\cckey{}#1}}}}
209\newcommand{\cproc}{\cc{proc}}
210\newcommand{\cself}{\cc{self}}
211\newcommand{\cinput}{\cc{input}}
212\newcommand{\coutput}{\cc{output}}
213\newcommand{\cspawn}{\cc{spawn}}
214\newcommand{\cwait}{\cc{wait}}
215\newcommand{\cassert}{\cc{assert}}
216\newcommand{\ctrue}{\cc{true}}
217\newcommand{\cfalse}{\cc{false}}
218\newcommand{\cassume}{\cc{assume}}
219\newcommand{\cwhen}{\cc{when}}
220\newcommand{\cchoose}{\cc{choose}}
221\newcommand{\cchooseint}{\cc{choose{\U}int}}
222\newcommand{\cinvariant}{\cc{invariant}}
223\newcommand{\crequires}{\cc{requires}}
224\newcommand{\censures}{\cc{ensures}}
225\newcommand{\cresult}{\cc{result}}
226\newcommand{\cat}{\texttt{@}}
227\newcommand{\ccollective}{\cc{collective}}
228
229\newcommand{\cheap}{\cc{heap}}
230\newcommand{\cscope}{\cc{scope}}
231\newcommand{\cregion}{\cc{region}}
232\newcommand{\cmalloc}{\cc{malloc}}
233
234
Note: See TracBrowser for help on using the repository browser.