source: CIVL/doc/manual/preambular.tex@ 36e5f03

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 36e5f03 was 7f39ee5, checked in by Stephen Siegel <siegel@…>, 12 years ago

Little more work on scopes in manual.

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

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