source: CIVL/doc/manual/preambular.tex@ 2b5dc93

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

Adding CIVL manual (latex), changing Makefile in examples to use "civl" instead of assuming the jar is all that is needed.

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

  • Property mode set to 100644
File size: 6.9 KB
Line 
1% algorithm2e package settings...
2
3\SetInd{1mm}{2mm}
4\SetVlineSkip{.5mm}
5\SetKw{Break}{break}
6\SetKw{Assert}{assert}
7\SetKw{Integer}{Integer}
8\SetKw{Array}{array}
9\SetKw{Of}{of}
10\SetKwFor{Procedure}{procedure}{is}{end procedure}
11\SetKwInOut{Uses}{uses}
12\SetKwInOut{Invariant}{invariant}
13
14% Type/font styles...
15\newcommand{\setsty}[1]{\textsf{\textcolor{blue}{\textup{#1}}}}
16\newcommand{\code}[1]{\texttt{\textcolor{blue}{#1}}}
17
18% Theorem environments...
19\newtheorem{theorem}{Theorem}
20\theoremstyle{definition}
21\newtheorem{definition}{Definition}[subsection]
22
23% Symbols...
24\renewcommand{\implies}{\Rightarrow}
25\newcommand{\ra}{\rightarrow}
26\newcommand{\B}{\mathbb{B}}
27\newcommand{\N}{\mathbb{N}}
28\newcommand{\lb}{\texttt{\char`\{}}
29\newcommand{\rb}{\texttt{\char`\}}}
30\newcommand{\U}{{\ttfamily\symbol{'137}}}
31\newcommand{\UU}{\U\U}
32
33% Static notions...
34\newcommand{\rootscope}{\setsty{root}} % root static scope
35\newcommand{\start}{\setsty{start}} % start location $l_0$
36\newcommand{\Var}{\setsty{Var}} % set of all variables
37\newcommand{\bool}{\setsty{bool}} % boolean type
38\newcommand{\proc}{\setsty{proc}} % process reference type
39\newcommand{\Val}{\setsty{Val}} % set of all values
40\newcommand{\vtype}{\setsty{vtype}} % type of variable
41\newcommand{\etype}{\setsty{etype}} % type of expression
42\newcommand{\Type}{\setsty{Type}} % set of all types
43\newcommand{\Expr}{\setsty{Expr}} % set of all expressions
44\newcommand{\Eval}{\setsty{Eval}} % set of all valuations on variables
45\newcommand{\eval}{\setsty{eval}} % evaluation of an expression
46\newcommand{\sparent}{\setsty{sparent}} % parent of a static scope
47\newcommand{\dparent}{\setsty{dparent}} % parent of a dynamic scope
48\newcommand{\fscope}{\setsty{fscope}} % scope of a function
49\newcommand{\lscope}{\setsty{lscope}} % scope of a location
50\newcommand{\static}{\setsty{static}} % static scope associated to a dynamic one
51\newcommand{\stack}{\setsty{stack}} % call stack
52\newcommand{\vars}{\setsty{vars}} % variables declared in a scope
53\newcommand{\ancestors}{\setsty{ancestors}} % as in tree
54\newcommand{\descendants}{\setsty{descendants}} % as in tree
55\newcommand{\returntype}{\setsty{returnType}} % function's return type
56\newcommand{\numparams}{\setsty{numParams}} % number of params for a func.
57\newcommand{\params}{\setsty{params}} % sequence of formal parameters
58\newcommand{\void}{\setsty{void}} % type for func. returning nothing
59\newcommand{\Loc}{\setsty{Loc}} % locations in function's trans. sys.
60\newcommand{\Func}{\mathcal{F}} % set of function symbols
61\newcommand{\true}{\textit{true}} % boolean value true
62\newcommand{\false}{\textit{false}} % boolean value false
63\newcommand{\default}{\setsty{default}} % default value of type
64\newcommand{\len}{\setsty{length}} % length of sequence
65\newcommand{\func}{\setsty{func}} % function a static scope belongs to
66
67% Dynamic notions...
68\newcommand{\fnode}{\setsty{fnode}} % function node of dyscope
69\newcommand{\State}{\setsty{State}} % set of all states of model
70\newcommand{\deval}{\setsty{deval}} % valuation on dyscope
71\newcommand{\droot}{\setsty{droot}} % root dyscope
72\newcommand{\Frame}{\setsty{Frame}} % set of activation frames
73
74% Tables...
75\newcommand{\notationtable}{%
76 \begin{tabular}{lll}
77 Symbol & Section & Meaning\\ \hline
78 $\B$ & \S\ref{sec:notation} & \{\true,\false\}\\
79 $\N$ & \S\ref{sec:notation} & \{0,1,2,\ldots\}\\
80 $\ancestors$ & \S\ref{sec:notation} & set of ancestors of node in a tree (inclusive)\\
81 $\descendants$ & \S\ref{sec:notation} & set of descendants of node
82 in a tree (inclusive)\\
83 $\len$ & \S\ref{sec:notation} & length of a sequence\\
84 $\Var$ & \S\ref{sec:context} & the set of all variables\\
85 $\bool$ & \S\ref{sec:context} & the boolean type\\
86 $\proc$ & \S\ref{sec:context} & the process reference type\\
87 $\Val$ & \S\ref{sec:context} & the set of all values\\
88 $\Val_t$ & \S\ref{sec:context} & values of type $t$\\
89 $\default_t$ & \S\ref{sec:context} & default value of type $t$\\
90 $\vtype$ & \S\ref{sec:context} & function $\Var\ra\Type$ giving type of each variable\\
91 $\Eval$ & \S\ref{sec:context} & set of all valuations on $\Var$\\
92 $\Eval(V)$ & \S\ref{sec:state} & set of all valuations on variables in $V\subseteq\Var$\\
93 $\Expr$ & \S\ref{sec:context} & set of typed expressions over $\Var$\\
94 $\etype$ & \S\ref{sec:context} & $\Expr\ra\Type$, gives type of each expression\\
95 $\eval$ & \S\ref{sec:context} & $\Expr\times\Eval\ra\Val$, the evaluation function\\
96 $\mathcal{C}$ & \S\ref{sec:context} & a CIVL context\\
97 $\Sigma$ & \S\ref{sec:scopes} & set of all static scopes\\
98 $\rootscope$ & \S\ref{sec:scopes} & the root scope (member of $\Sigma$)\\
99 $\sparent$ & \S\ref{sec:scopes} & $\Sigma\setminus\{\rootscope\}\ra\Sigma$, parent function in static scope tree\\
100 $\vars$ & \S\ref{sec:scopes} & $\Sigma\ra 2^{\Var}$, specifies variables declared in scope\\
101 $\Lambda$ & \S\ref{sec:scopes} & a lexical scope system\\
102 $\void$ & \S\ref{sec:functions} & type used for function that does not return a value\\
103 $\Type'$ & \S\ref{sec:functions} & $\Type\cup\{\void\}$\\
104 $\Func$ & \S\ref{sec:functions} & set of function symbols\\
105 $\fscope$ & \S\ref{sec:functions} & $\Func\ra\Sigma\setminus\{\rootscope\}$, gives function scope of each function\\
106 $\returntype$ & \S\ref{sec:functions} & $\Func\ra\Type'$, gives return type of each function\\
107% $\numparams$ & \S\ref{sec:functions} & $\Func\ra\N$, gives number of inputs for each function\\
108 $\params$ & \S\ref{sec:functions} & $\Func\ra\Var^*$, formal
109 parameter sequence for $f\in\Func$\\
110 $f_0$ & \S\ref{sec:functions} & the root function (member of
111 $\mathcal{F}$)\\
112 $\func$ & \S\ref{sec:functions} & $\Sigma\ra\Func$, function to
113 which scope belongs\\
114 $\Loc_f$ & \S\ref{sec:gts} & set of locations for $f\in\Func$\\
115 $\lscope_f$ & \S\ref{sec:gts} & $\Loc_f\ra\Sigma$, gives scope of each location for $f\in\Func$\\
116 $\start_f$ & \S\ref{sec:gts} & start location for $f\in\Func$ (member of $\Loc_f$)\\
117 $T_f$ & \S\ref{sec:gts} & set of guarded transitions for $f\in\Func$\\
118 \end{tabular}
119}
120
121
122% CIVL-C keywords
123
124\newcommand{\cckey}{\$}
125\newcommand{\cc}[1]{\mbox{\texttt{\cckey{}#1}}}
126\newcommand{\cproc}{\cc{proc}}
127\newcommand{\cself}{\cc{self}}
128\newcommand{\cinput}{\cc{input}}
129\newcommand{\coutput}{\cc{output}}
130\newcommand{\cspawn}{\cc{spawn}}
131\newcommand{\cwait}{\cc{wait}}
132\newcommand{\cassert}{\cc{assert}}
133\newcommand{\ctrue}{\cc{true}}
134\newcommand{\cfalse}{\cc{false}}
135\newcommand{\cassume}{\cc{assume}}
136\newcommand{\cwhen}{\cc{when}}
137\newcommand{\cchoose}{\cc{choose}}
138\newcommand{\cchooseint}{\cc{choose{\U}int}}
139\newcommand{\cinvariant}{\cc{invariant}}
140\newcommand{\crequires}{\cc{requires}}
141\newcommand{\censures}{\cc{ensures}}
142\newcommand{\cresult}{\cc{result}}
143\newcommand{\cat}{\texttt{@}}
144\newcommand{\ccollective}{\cc{collective}}
145
146\newcommand{\cheap}{\cc{heap}}
147\newcommand{\cscope}{\cc{scope}}
148\newcommand{\cregion}{\cc{region}}
149\newcommand{\cmalloc}{\cc{malloc}}
150
151
Note: See TracBrowser for help on using the repository browser.