-
Notifications
You must be signed in to change notification settings - Fork 0
/
reference.tex
254 lines (210 loc) · 7.12 KB
/
reference.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
\documentclass[11pt,openright,fleqn]{book}
\usepackage{alltt,varioref,xspace,amsmath,amssymb,wasysym,manfnt,longtable,latexsym,makeidx,eurosym}
\usepackage{index,lettrine,fancyhdr,float,floatflt}
\usepackage[final]{graphicx}
\usepackage{type1cm,eso-pic,color}
\usepackage{textcomp}
\usepackage{bussproofs}
\usepackage{enumerate}
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % ... or a4paper or a5paper or ...
\usepackage[intoc]{nomencl}
\usepackage{prog}
%\usepackage{cropmark}
\usepackage{nap}
\usepackage[backref=page,hyperindex=true,pagebackref=true,linktocpage=true,colorlinks=true,linkcolor=blue]{hyperref}
\usepackage[nottoc,notlot]{tocbibind}
\usepackage[titles]{tocloft}
\usepackage{shadow,boxedminipage}
%\usepackage[perpage,flushmargin]{footmisc}
\usepackage{lineno}
\usepackage{listings}
\usepackage{zlmtt}
%\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
%\DeclareGraphicsRule{.gif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .gif`.png}
\newcommand{\starVersion}{102}
% used in the various syntax diagrams
\newcommand{\arrow}{{\rm ::=}}
\newcommand{\arrowplus}{{\rm ::+}}
\newcommand{\choice}{\ensuremath{\vert}}
\newcommand{\plus}{\ensuremath{^{\geq1}}}
\newcommand{\plustwo}{\ensuremath{^{\geq2}}}
\newcommand{\sequence}[1]{\ensuremath{\,\q{#1}\cdots\q{#1}\,}}
\newcommand{\seq}[1]{\ensuremath{\q{#1}\ldots\q{#1}}}
\newcommand{\btwn}{\tlda\tlda}
\newcommand{\cons}{\q{;;}}
\newcommand{\ntDef}[1]{\hypertarget{#1}{\emph{#1}}}
\newcommand{\ntRef}[1]{\protect{\hyperlink{#1}{\rm\emph{#1}}}}
% grammar rule macros
\newcommand{\grule}{\q{->}\xspace}
\newcommand{\gapp}{\q{\%\%}\xspace}
% Function specification
\newenvironment{spec}[0]{\begin{alltt}\hrule\vspace*{0.75ex}}{\vspace*{0.75ex}\hrule\end{alltt}}
\newcommand{\Sr}{{Star}\xspace}
\newcommand{\SrTitle}{\Sr Language Definition}
\title{\Huge \SrTitle}
\author{Francis G. McCabe}
\date{}
\makeindex
\makenomenclature
\lstdefinelanguage{Star}
{morekeywords={def,var,fun,prc,ptn,default,let,in,where,has,type,kind,ref,package,worksheet,
show,assert,is,from,import,open,or,and,implies,otherwise,not,for,all,exists,such,that,
over,of,determines,contract,implementation,valof,valis,do,with,as,present,group, substitute, by,task,perform,ignore,counts,wait,nothing,computation,query,notify,request},
sensitive=false,
morecomment=[l]{-- },
morecomment=[s][\color{red}]{/*}{*/},
morestring=[b]",
morestring=[b]',
basicstyle=\ttfamily,
basewidth={0.55em,0.45em},
commentstyle=\itshape,
identifierstyle=\ttfamily,
stringstyle=\ttfamily,
showspaces=false,
showstringspaces=false,
columns=fixed,
numbers=none,
}
\lstset{language=Star}
\begin{document}
\floatstyle{ruled}
\floatname{program}{Program}
\newfloat{program}{hbt}{lop}[chapter]
\frontmatter
\thispagestyle{empty}
\fancyhf{} % delete current setting for header and footer
\definecolor{skyBlue}{HTML}{2EA4FF}
\begin{flushleft}
\vspace*{\stretch{1}}
\begin{center}
\begin{minipage}{4.2in}
\color{skyBlue}{\textbf{\Huge\SrTitle}}
\Large%
\flushright{\textbf{\color{skyBlue}Version \starVersion}}
\end{minipage}
\end{center}
\vspace*{\stretch{1}}
\end{flushleft}
\newpage{}
{{
\parindent=0in
\parskip=1ex
\thispagestyle{fancy}
\fancyhf{} % delete current setting for header and footer
\newcommand{\tstamp}{\today}
\newcommand{\Draft}{\sc draft}
\copyright{} 2015, 2016 Francis McCabe.
\vspace*{1ex}
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in Appendix~\vref{gnufdl}.
The software described in this reference is licensed under the terms of the Apache 2.0 License. This license is included in Appendix~\vref{apache2.0}.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\textsc{Documentation is provided ``as is'' and all express or implied conditions, representations and warranties, including any implied warranty of merchantability, fitness for a particular purpose or non-infringement, are disclaimed, except to the extent that such disclaimers are held to be legally invalid.}
}
\newpage{}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter\ #1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\fancyhf{} % delete current setting for header and footer
\newcommand{\blueLine}{{\color{skyBlue}%
\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
\fancyhead[LE,RO]{\bfseries}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\headrule}{{\blueLine}}
\renewcommand{\footrulewidth}{0.5pt}
\renewcommand{\footrule}{{\color{skyBlue}%
\vskip-\footruleskip\vskip-\footrulewidth
\hrule width\headwidth height\footrulewidth\vskip\footruleskip}}
\addtolength{\headheight}{15pt} % make space for the rule
\rfoot[\thepage]{\SrTitle}
\lfoot[\SrTitle]{\thepage}
\fancypagestyle{plain}{
%
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt} % and the line
}
%\pagestyle{headings}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}
\makeatletter
\renewcommand{\@pnumwidth}{2.5em}
\renewcommand{\@tocrmarg}{2.7em}
\makeatother
\markboth{Contents}{Contents}
\tableofcontents
\clearpage
\markboth{List of Programs}{List of Programs}
\listof{program}{List of Programs}
\markboth{}{}
\clearpage
\markboth{List of Figures}{List of Figures}
\listof{figure}{List of Figures}
\markboth{}{}
\clearpage
%\markboth{List of Examples}{List of Examples}
%\addcontentsline{toc}{chapter}{List of Examples}
%\listof{example}{List of Examples}
%\markboth{}{}
%\cleardoublepage
%\includeonly{io}
\listoftables
\markboth{}{}
\mainmatter
\nolinenumbers
\include{introduction}
\include{lexical}
\include{grammar}
\include{programs}
\include{types}
\include{variables}
\include{expressions}
\include{patterns}
\include{actions}
\include{conditions}
\include{queries}
\include{numbers}
\include{string}
\include{lists}
\include{maps}
\include{io}
\include{infoset}
\include{computation}
\include{concurrent}
\include{actors}
\include{date}
%\include{parsing}
\include{system}
\include{packaging}
\appendix
\include{running}
%\include{notes}
%\include{syntax}
\include{macro}
\include{validation}
\include{formatting}
\include{notes}
\include{apache}
\include{fdl}
\bibliographystyle{plain}
\bibliography{LogicBib}
\cleardoublepage
\nolinenumbers
% To generate the glossary do:
% latex reference
% makeindex reference.glo -s nomencl.ist -o reference.gls
% latex reference (a few more times)
\renewcommand{\nomname}{Glossary}
%\renewcommand{\nompreamble}{\addcontentsline{toc}{chapter}{Glossary}\label{glossary}}
\markboth{\MakeUppercase\nomname}{\MakeUppercase\nomname}
\printnomenclature[1in]
\cleardoublepage
\printindex
\end{document}