Converted Filet-o-Fish Literate Haskell code into a Technical Note
[barrelfish] / doc / 024-fof / FiletOFish.lhs
1 %% 
2 %%  Template for Barrelfish technical notes.
3 %%
4 %%  Modified from the University of Stirling LaTeX technical report
5 %%  style file and template with much gratitude.
6 %%  
7
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 % Copyright (c) 2011, ETH Zurich.
10 % All rights reserved.
11 %
12 % This file is distributed under the terms in the attached LICENSE file.
13 % If you do not find this file, copies can be found by writing to:
14 % ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16
17 % \documentclass[a4paper]{article} 
18 \documentclass[a4paper,twoside]{report} % If you want a report
19 \usepackage{bftn}
20 \usepackage{fullpage}
21 %include polycode.fmt
22 \usepackage{epigraph}
23 \setlength{\epigraphrule}{0pt}
24 \setlength{\beforeepigraphskip}{0pt}
25 \setlength{\afterepigraphskip}{2\baselineskip}
26 \usepackage{tikz}
27 \usetikzlibrary{matrix,arrows}
28
29 \title{Filet-o-Fish\\
30       \small{When French Cuisine Meets Swiss Fishes}
31 }
32 \author{Pierre-Evariste Dagand}
33 %% \email{info@barrelfish.org}
34 \tnnumber{024}
35 \tnkey{FiletOFish}
36
37 \begin{document}
38 \maketitle                      % Uncomment for final draft
39
40 \begin{versionhistory}
41 \vhEntry{1.0}{02.06.2017}{TR}{Converted to Technical Note from Pierre's LHS}
42 \end{versionhistory}
43
44 \tableofcontents
45
46 \input{Introduction}
47
48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 \part{The Filet-o-Fish Language}
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51
52 \input{IntroLanguage}
53
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 \chapter{Filet-o-Fish Syntax}
56 \label{chap:fof_syntax}
57 \epigraph{- None shall pass.\\
58           - I have no quarrel with you, good Sir Knight, but I must cross this bridge.\\
59           - Then you shall die.}{Monty Python}
60 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61
62 \input{PureExpressions}
63 \input{Constructs}
64
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 \chapter{Filet-o-Fish Semantics}
67 \label{chap:fof_semantics}
68 \epigraph{So, logically...\\
69           If...\\
70           she...\\ weighs...\\
71           the same as a duck,...\\
72           she's made of wood.}{Monty Python}
73 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74
75 \input{Eval}
76 \input{Expressions}
77 \input{Semantics}
78
79 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80 \chapter{Filet-o-Fish Operators}
81 \label{chap:fof_operators}
82 \epigraph{Listen. \\
83           Strange women lying in ponds distributing swords 
84           is no basis for a system of government. 
85           Supreme executive power derives from a mandate from the masses, 
86           not from some farcical aquatic ceremony.}{Monty Python}
87 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88
89 \input{Constructs/Arrays}
90 \input{Constructs/Conditionals}
91 \input{Constructs/Enumerations}
92 \input{Constructs/Functions}
93 \input{Constructs/References}
94 \input{Constructs/Strings}
95 \input{Constructs/Structures}
96 \input{Constructs/Typedef}
97 \input{Constructs/Unions}
98
99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
100 \chapter{Lib-C Operators}
101 \label{chap:fof_libc}
102 \epigraph{Mortician: Bring out your dead! [clang] \ldots \\
103           Customer:  Here's one -- nine pence. \\
104           Dead person: I'm not dead!\\
105           Mortician: What?\\
106           Customer: Nothing -- here's your nine pence.}{Monty Python}
107
108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109
110 \input{Libc/Printf}
111 \input{Libc/Assert}
112
113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114 \chapter{Lib-barrefish Operators}
115 \label{chap:fof_libbarrelfish}
116 \epigraph{Here may be found the last words of Joseph of Aramathea.  He
117   who is valiant and pure of spirit may find the Holy Grail in the
118   Castle of uuggggggh}{Monty Python}
119 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
120
121 \input{Libbarrelfish/HasDescendants}
122 \input{Libbarrelfish/MemToPhys}
123
124
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
126 \part{The Filet-o-Fish Compiler}
127 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
128
129 \input{Compile}
130
131 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
132 \chapter{The FoF Intermediate Language}
133 \label{chap:il_fof}
134 \epigraph{- [...] For, since the tragic death of her father -- \\
135           - He's not quite dead!\\
136           - Since the near fatal wounding of her father--\\
137           - He's getting better!\\
138           - For, since her own father\ldots who, when he seemed about to
139             recover, suddenly felt the icy hand of death upon him,\ldots\\
140           - Oh, he's died!\\
141           - And I want his only daughter to look upon me\ldots as her own
142             dad -- in a very real, and legally binding sense.
143             And I feel sure that the merger -- uh, the union -- between the
144             Princess and the brave, but dangerous, Sir Launcelot of Camelot...}{Monty Python}
145
146 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147
148 \input{IL/FoF/FoF}
149 \input{IL/FoF/Compile}
150 \input{IL/FoF/Run}
151
152 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153 \chapter{The Paka Intermediate Language}
154 \label{chap:il_paka}
155 \epigraph{Listen, lad. \\
156   I've built this kingdom up from nothing.  When
157   I started here, all there was was swamp.  All the kings said I was
158   daft to build a castle in a swamp, but I built it all the same,
159   just to show 'em.  It sank into the swamp.\\
160   So, I built a second one. That sank into the swamp. \\
161   So I built a third one.  That burned down,
162   fell over, then sank into the swamp.  \\
163   But the fourth one stayed up. An' that's what your gonna get, lad -- the strongest castle in these
164   islands.}{Monty Python}
165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
166
167 \input{IL/Paka/Syntax}
168 \input{IL/Paka/Builders}
169 \input{IL/Paka/Paka}
170 \input{IL/Paka/Compile}
171 \input{IL/Paka/Optimizer}
172
173
174 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
175 \appendix
176 \part{Appendix}
177 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
178
179 \input{FutureWork}
180
181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
182 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183
184
185 \bibliographystyle{plain}
186 \bibliography{barrelfish}
187
188
189 \end{document}