2020-02-04 02:46:38 +03:00
|
|
|
\documentclass{book}
|
2018-11-13 09:54:04 +03:00
|
|
|
|
|
|
|
|
\usepackage{amssymb, amsmath}
|
|
|
|
|
\usepackage{alltt}
|
|
|
|
|
\usepackage{pslatex}
|
|
|
|
|
\usepackage{epigraph}
|
|
|
|
|
\usepackage{verbatim}
|
|
|
|
|
\usepackage{latexsym}
|
|
|
|
|
\usepackage{array}
|
|
|
|
|
\usepackage{comment}
|
|
|
|
|
\usepackage{makeidx}
|
|
|
|
|
\usepackage{listings}
|
|
|
|
|
\usepackage{indentfirst}
|
|
|
|
|
\usepackage{verbatim}
|
|
|
|
|
\usepackage{color}
|
|
|
|
|
\usepackage{url}
|
|
|
|
|
\usepackage{xspace}
|
|
|
|
|
\usepackage{hyperref}
|
|
|
|
|
\usepackage{stmaryrd}
|
|
|
|
|
\usepackage{amsmath, amsthm, amssymb}
|
|
|
|
|
\usepackage{graphicx}
|
|
|
|
|
\usepackage{euscript}
|
|
|
|
|
\usepackage{mathtools}
|
|
|
|
|
\usepackage{mathrsfs}
|
|
|
|
|
\usepackage{multirow,bigdelim}
|
|
|
|
|
\usepackage{subcaption}
|
|
|
|
|
\usepackage{placeins}
|
2019-11-24 02:30:32 +03:00
|
|
|
\usepackage{xspace}
|
2020-02-04 02:46:38 +03:00
|
|
|
\usepackage{bm}
|
2020-02-10 19:09:59 +03:00
|
|
|
\usepackage{enumitem}
|
2020-02-17 01:51:52 +03:00
|
|
|
\usepackage{mathpazo}
|
2018-11-13 09:54:04 +03:00
|
|
|
|
|
|
|
|
\definecolor{shadecolor}{gray}{1.00}
|
|
|
|
|
\definecolor{darkgray}{gray}{0.30}
|
|
|
|
|
|
|
|
|
|
\def\transarrow{\xrightarrow}
|
|
|
|
|
\newcommand{\setarrow}[1]{\def\transarrow{#1}}
|
|
|
|
|
|
|
|
|
|
\def\padding{\phantom{X}}
|
|
|
|
|
\newcommand{\setpadding}[1]{\def\padding{#1}}
|
|
|
|
|
|
|
|
|
|
\def\subarrow{}
|
|
|
|
|
\newcommand{\setsubarrow}[1]{\def\subarrow{#1}}
|
|
|
|
|
|
|
|
|
|
\newcommand{\trule}[2]{\frac{#1}{#2}}
|
|
|
|
|
\newcommand{\crule}[3]{\frac{#1}{#2},\;{#3}}
|
|
|
|
|
\newcommand{\withenv}[2]{{#1}\vdash{#2}}
|
2018-11-19 00:20:43 +03:00
|
|
|
\newcommand{\trans}[3]{{#1}\transarrow{\padding{\textstyle #2}\padding}\subarrow{#3}}
|
2018-11-13 09:54:04 +03:00
|
|
|
\newcommand{\ctrans}[4]{{#1}\transarrow{\padding#2\padding}\subarrow{#3},\;{#4}}
|
|
|
|
|
\newcommand{\llang}[1]{\mbox{\lstinline[mathescape]|#1|}}
|
|
|
|
|
\newcommand{\pair}[2]{\inbr{{#1}\mid{#2}}}
|
|
|
|
|
\newcommand{\inbr}[1]{\left<{#1}\right>}
|
|
|
|
|
\newcommand{\highlight}[1]{\color{red}{#1}}
|
|
|
|
|
\newcommand{\ruleno}[1]{\eqno[\scriptsize\textsc{#1}]}
|
|
|
|
|
\newcommand{\rulename}[1]{\textsc{#1}}
|
|
|
|
|
\newcommand{\inmath}[1]{\mbox{$#1$}}
|
|
|
|
|
\newcommand{\lfp}[1]{fix_{#1}}
|
|
|
|
|
\newcommand{\gfp}[1]{Fix_{#1}}
|
|
|
|
|
\newcommand{\vsep}{\vspace{-2mm}}
|
|
|
|
|
\newcommand{\supp}[1]{\scriptsize{#1}}
|
|
|
|
|
\newcommand{\sembr}[1]{\llbracket{#1}\rrbracket}
|
|
|
|
|
\newcommand{\cd}[1]{\texttt{#1}}
|
|
|
|
|
\newcommand{\free}[1]{\boxed{#1}}
|
|
|
|
|
\newcommand{\binds}{\;\mapsto\;}
|
|
|
|
|
\newcommand{\dbi}[1]{\mbox{\bf{#1}}}
|
|
|
|
|
\newcommand{\sv}[1]{\mbox{\textbf{#1}}}
|
|
|
|
|
\newcommand{\bnd}[2]{{#1}\mkern-9mu\binds\mkern-9mu{#2}}
|
|
|
|
|
\newtheorem{lemma}{Lemma}
|
|
|
|
|
\newtheorem{theorem}{Theorem}
|
|
|
|
|
\newcommand{\meta}[1]{{\mathcal{#1}}}
|
|
|
|
|
\renewcommand{\emptyset}{\varnothing}
|
|
|
|
|
\newcommand{\dom}[1]{\mathtt{dom}\;{#1}}
|
2018-11-19 00:20:43 +03:00
|
|
|
\newcommand{\primi}[2]{\mathbf{#1}\;{#2}}
|
2020-02-17 01:51:52 +03:00
|
|
|
\newcommand{\lama}{$\lambda\kern -.1667em\lower -.5ex\hbox{$a$}\kern -.1000em\lower .2ex\hbox{$\mathcal M$}\kern -.1000em\lower -.5ex\hbox{$a$}$\xspace}
|
2020-01-20 07:41:43 +03:00
|
|
|
%\newcommand{\sial}{S\textit{\lower -.5ex\hbox{I}\kern -.1667em\lower .5ex\hbox {A}}\kern -.125emL\@\xspace}
|
2018-11-13 09:54:04 +03:00
|
|
|
\definecolor{light-gray}{gray}{0.90}
|
|
|
|
|
\newcommand{\graybox}[1]{\colorbox{light-gray}{#1}}
|
|
|
|
|
|
2020-02-04 02:46:38 +03:00
|
|
|
\newcommand{\defterm}[1]{\textit{#1}}
|
|
|
|
|
\newcommand{\nonterm}[1]{\textit{#1}}
|
|
|
|
|
\newcommand{\term}[1]{\graybox{#1}}
|
|
|
|
|
\newcommand{\token}[1]{\textsc{#1}}
|
|
|
|
|
\newcommand{\alt}{\s\mid\s}
|
|
|
|
|
\newcommand{\s}{\:\:}
|
|
|
|
|
|
2020-02-10 19:09:59 +03:00
|
|
|
\newcommand{\descr}[2]{\smallskip{#1}\begin{itemize}[noitemsep,topsep=0pt]\item[]{#2}\end{itemize}}
|
|
|
|
|
|
2020-02-20 20:25:29 +03:00
|
|
|
\lstdefinelanguage{lama}{
|
2021-02-01 09:52:28 +03:00
|
|
|
keywords={skip,if,then,else,elif,fi,while,do,od,for,fun,public,import,
|
|
|
|
|
box,val, var,case,of,esac,when,box,str,sexp,array,infix,infixl,infixr,at,before,after,true,false,eta,lazy,syntax},
|
2018-11-13 09:54:04 +03:00
|
|
|
sensitive=true,
|
2020-02-04 05:49:12 +03:00
|
|
|
basicstyle=\small,
|
|
|
|
|
%commentstyle=\scriptsize\rmfamily,
|
2018-11-13 09:54:04 +03:00
|
|
|
keywordstyle=\ttfamily\bfseries,
|
|
|
|
|
identifierstyle=\ttfamily,
|
|
|
|
|
basewidth={0.5em,0.5em},
|
|
|
|
|
columns=fixed,
|
|
|
|
|
fontadjust=true,
|
2019-11-24 02:30:32 +03:00
|
|
|
literate={->}{{$\to$}}3,
|
2020-02-04 05:49:12 +03:00
|
|
|
morecomment=[s][\ttfamily]{(*}{*)},
|
|
|
|
|
morecomment=[l][\ttfamily]{--}
|
2018-11-13 09:54:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\lstset{
|
|
|
|
|
mathescape=true,
|
2020-02-04 05:49:12 +03:00
|
|
|
basicstyle=\small,
|
2018-11-13 09:54:04 +03:00
|
|
|
identifierstyle=\ttfamily,
|
|
|
|
|
keywordstyle=\bfseries,
|
|
|
|
|
commentstyle=\scriptsize\rmfamily,
|
|
|
|
|
basewidth={0.5em,0.5em},
|
|
|
|
|
fontadjust=true,
|
|
|
|
|
escapechar=!,
|
2020-02-20 20:25:29 +03:00
|
|
|
language=lama
|
2018-11-13 09:54:04 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\sloppy
|
|
|
|
|
|
2020-02-17 01:51:52 +03:00
|
|
|
%\title{\lama Language Definition}
|
2018-11-13 09:54:04 +03:00
|
|
|
|
2020-02-17 01:51:52 +03:00
|
|
|
%\author{Dmitry Boulytchev}
|
2018-11-13 09:54:04 +03:00
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
|
|
2020-02-17 01:51:52 +03:00
|
|
|
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
|
|
|
|
|
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for horizontal lines, change thickness here
|
|
|
|
|
|
|
|
|
|
\center % Centre everything on the page
|
|
|
|
|
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
% Headings
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
|
|
|
|
|
\includegraphics[scale=0.5]{jetbrains.png}\\[3cm]
|
|
|
|
|
% \textsc{\LARGE JetBrains Research}\\[2.5cm] % Main heading such as the name of your university/college
|
|
|
|
|
|
|
|
|
|
% \textsc{\Large Major Heading}\\[0.5cm] % Major heading such as course name
|
|
|
|
|
|
|
|
|
|
% \textsc{\large Minor Heading}\\[0.5cm] % Minor heading such as course title
|
|
|
|
|
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
% Title
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
|
|
|
|
|
\HRule\\[0.4cm]
|
|
|
|
|
|
|
|
|
|
{\huge\bfseries \lama Language Specification}\\[0.4cm] % Title of your document
|
2021-02-01 09:52:28 +03:00
|
|
|
|
|
|
|
|
{\textsc{Version 1.10}}
|
|
|
|
|
|
2020-02-17 01:51:52 +03:00
|
|
|
\HRule\\[1.5cm]
|
|
|
|
|
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
% Author(s)
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
|
|
|
|
|
\begin{minipage}{0.4\textwidth}
|
|
|
|
|
\begin{flushleft}
|
|
|
|
|
\large
|
|
|
|
|
\textit{Author}\\
|
|
|
|
|
Dmitry \textsc{Boulytchev} % Your name
|
|
|
|
|
\end{flushleft}
|
|
|
|
|
\end{minipage}
|
|
|
|
|
%~
|
|
|
|
|
%\begin{minipage}{0.4\textwidth}
|
|
|
|
|
% \begin{flushright}
|
|
|
|
|
% \large
|
|
|
|
|
% \textit{Supervisor}\\
|
|
|
|
|
% Dr. Caroline \textsc{Becker} % Supervisor's name
|
|
|
|
|
% \end{flushright}
|
|
|
|
|
%\end{minipage}
|
|
|
|
|
|
|
|
|
|
% If you don't want a supervisor, uncomment the two lines below and comment the code above
|
|
|
|
|
%{\large\textit{Author}}\\
|
|
|
|
|
%John \textsc{Smith} % Your name
|
|
|
|
|
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
% Date
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
|
|
|
|
|
\vfill\vfill\vfill % Position the date 3/4 down the remaining page
|
|
|
|
|
|
|
|
|
|
{\large\input{commitdate}} % Date, change the \today to a set date if you want to be precise
|
|
|
|
|
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
% Logo
|
|
|
|
|
%------------------------------------------------
|
|
|
|
|
|
|
|
|
|
%\vfill\vfill
|
|
|
|
|
%\includegraphics[width=0.2\textwidth]{placeholder.jpg}\\[1cm] % Include a department/university logo - this will require the graphicx package
|
|
|
|
|
|
|
|
|
|
%----------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
\vfill % Push the date up 1/4 of the remaining page
|
|
|
|
|
|
|
|
|
|
\end{titlepage}
|
2018-11-13 09:54:04 +03:00
|
|
|
|
2020-02-05 20:49:50 +03:00
|
|
|
\tableofcontents
|
|
|
|
|
|
2020-02-04 02:46:38 +03:00
|
|
|
\input{01.introduction}
|
2020-02-17 20:00:02 +03:00
|
|
|
%\input{02.abstract_syntax_and_semantics}
|
2020-02-04 02:46:38 +03:00
|
|
|
\input{03.concrete_syntax}
|
2020-02-10 04:05:53 +03:00
|
|
|
\input{04.extensions}
|
|
|
|
|
\input{05.driver_options}
|
2020-09-10 22:15:57 +03:00
|
|
|
\input{06.debugging}
|
|
|
|
|
\input{07.standard_library}
|
2020-02-05 01:18:20 +03:00
|
|
|
|
|
|
|
|
\bibliographystyle{plainurl}
|
2020-02-18 03:39:42 +03:00
|
|
|
\bibliography{lama-spec}
|
2018-11-13 09:54:04 +03:00
|
|
|
|
|
|
|
|
\end{document}
|