-
Notifications
You must be signed in to change notification settings - Fork 0
/
patterns-paper.tex
341 lines (289 loc) · 11.4 KB
/
patterns-paper.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
\PassOptionsToPackage{svgnames,dvipsnames,svgnames}{xcolor}
\newif\ifarxiv
\arxivtrue
% \arxivfalse
\ifarxiv
\documentclass[acmsmall,screen,nonacm]{acmart}
\else
%%% Note: arxiv does not want line numbers (they are detected somehow, and are not allowed)
\documentclass[acmsmall,screen]{acmart}
% \settopmatter{printfolios=false,printccs=false,printacmref=false}
% \settopmatter{printccs=false,printacmref=false}
\fi
\ifarxiv
\newcommand{\appendixName}{appendix}
\else
\newcommand{\appendixName}{extended appendix}
\fi
%% For single-blind review submission
%\documentclass[acmlarge,review]{acmart}\settopmatter{printfolios=true}
%% For final camera-ready submission
%\documentclass[acmlarge]{acmart}\settopmatter{}
%% Note: Authors migrating a paper from PACMPL format to traditional
%% SIGPLAN proceedings format should change 'acmlarge' to
%% 'sigplan,10pt'.
% \bibliographystyle{ACM-Reference-Format}
%% Some recommended packages.
\usepackage{booktabs} %% For formal tables:
%% http://ctan.org/pkg/booktabs
\usepackage{subcaption} %% For complex figures with subfigures/subcaptions
%% http://ctan.org/pkg/subcaption
%% Cyrus packages
\usepackage{microtype}
\usepackage{mdframed}
\usepackage{colortab}
\usepackage{mathpartir}
\usepackage{enumitem}
\usepackage{bbm}
\usepackage{stmaryrd}
\usepackage{mathtools}
\usepackage{leftidx}
\usepackage{todonotes}
\usepackage{xspace}
\usepackage{wrapfig}
\usepackage{extarrows}
% \usepackage[subtle]{savetrees}
\usepackage{listings}%
\lstloadlanguages{ML}
\lstset{tabsize=2,
basicstyle=\footnotesize\ttfamily,
% keywordstyle=\sffamily,
commentstyle=\itshape\ttfamily\color{gray},
stringstyle=\ttfamily\color{purple},
mathescape=false,escapechar=\#,
numbers=left, numberstyle=\scriptsize\color{gray}\ttfamily, language=ML, showspaces=false,showstringspaces=false,xleftmargin=15pt,
morekeywords={string, float, int, bool},
classoffset=0,belowskip=\smallskipamount, aboveskip=\smallskipamount,
moredelim=**[is][\color{red}]{SSTR}{ESTR}
}
\newcommand{\li}[1]{\lstinline[basicstyle=\ttfamily\fontsize{9pt}{1em}\selectfont]{#1}}
\newcommand{\lismall}[1]{\lstinline[basicstyle=\ttfamily\fontsize{9pt}{1em}\selectfont]{#1}}
%% Joshua Dunfield macros
\def\OPTIONConf{1}%
\usepackage{joshuadunfield}
%% Can remove this eventually
\usepackage{blindtext}
\usepackage{enumitem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Matt says: Cyrus, this package `adjustbox` seems directly related
%% to the `clipbox` error; To get rid of the error, I moved it last
%% (after other usepackages) and I added the line just above it, which
%% permits it to redefine `clipbox` (apparently also defined in
%% `pstricks`, and due to latex's complete lack of namespace
%% management, these would otherwise names clash).
\let\clipbox\relax
\usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{draftwatermark}
%\SetWatermarkText{DRAFT}
%\SetWatermarkScale{1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% A macro for the name of the system being described by ``this paper''
\newcommand{\HazelnutLive}{\textsf{Hazelnut Live}\xspace}
\newcommand{\Hazelnut}{\textsf{Hazelnut}\xspace}
% The mockup, work-in-progress system.
\newcommand{\Hazel}{\textsf{Hazel}\xspace}
% \newtheorem{theorem}{Theorem}[chapter]
% \newtheorem{lemma}[theorem]{Lemma}
% \newtheorem{corollary}[theorem]{Corollary}
% \newtheorem{definition}[theorem]{Definition}
% \newtheorem{assumption}[theorem]{Assumption}
% \newtheorem{condition}[theorem]{Condition}
\newtheoremstyle{slplain}% name
{.15\baselineskip\@plus.1\baselineskip\@minus.1\baselineskip}% Space above
{.15\baselineskip\@plus.1\baselineskip\@minus.1\baselineskip}% Space below
{\slshape}% Body font
{\parindent}%Indent amount (empty = no indent, \parindent = para indent)
{\bfseries}% Thm head font
{.}% Punctuation after thm head
{ }% Space after thm head: " " = normal interword space;
% \newline = linebreak
{}% Thm head spec
\theoremstyle{slplain}
\newtheorem{thm}{Theorem} % Numbered with the equation counter
\numberwithin{thm}{section}
\newtheorem{defn}[thm]{Definition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{corol}[thm]{Corollary}
% \newtheorem{cor}[section]{Corollary}
% \newtheorem{lem}[section]{Lemma}
% \newtheorem{prop}[section]{Proposition}
% \setlength{\abovedisplayskip}{0pt}
% \setlength{\belowdisplayskip}{0pt}
% \setlength{\abovedisplayshortskip}{0pt}
% \setlength{\belowdisplayshortskip}{0pt}
\ifarxiv
\setcopyright{rightsretained}
\acmJournal{PACMPL}
\acmYear{2019} \acmVolume{3} \acmNumber{POPL} \ifarxiv \acmArticle{1} \else \acmArticle{14} \fi \acmMonth{1} \acmPrice{}\acmDOI{10.1145/3290327}
\copyrightyear{2019}
\else
%%% The following is specific to POPL '19 and the paper
%%% 'Live Functional Programming with Typed Holes'
%%% by Cyrus Omar, Ian Voysey, Ravi Chugh, and Matthew A. Hammer.
%%%
\setcopyright{rightsretained}
\acmPrice{}
\acmDOI{10.1145/3290327}
\acmYear{2019}
\copyrightyear{2019}
\acmJournal{PACMPL}
\acmVolume{3}
\acmNumber{POPL}
\acmArticle{14}
\acmMonth{1}
\fi
% \fancyfoot{} % suppresses the footer (also need \thispagestyle{empty} after \maketitle below)
%% Bibliography style
\bibliographystyle{ACM-Reference-Format}
%% Citation style
%% Note: author/year citations are required for papers published as an
%% issue of PACMPL.
\citestyle{acmauthoryear} %% For author/year citations
\input{commands}
\input{macros}
\setlength{\abovecaptionskip}{4pt plus 3pt minus 2pt} % Chosen fairly arbitrarily
\setlength{\belowcaptionskip}{-4pt plus 3pt minus 2pt} % Chosen fairly arbitrarily
\begin{document}
%% Title information
\title{patterns paper} %% [Short Title] is optional;
\ifarxiv
\subtitle{Extended Version}
\subtitlenote{The original version of this article was published in the POPL 2019 edition of PACMPL \cite{HazelnutLive}. This extended version includes an additional appendix.}
\fi
%% when present, will be used in
%% header instead of Full Title.
% \titlenote{with title note} %% \titlenote is optional;
%% can be repeated if necessary;
%% contents suppressed with 'anonymous'
% \subtitle{Subtitle} %% \subtitle is optional
% \subtitlenote{with subtitle note} %% \subtitlenote is optional;
%% can be repeated if necessary;
%% contents suppressed with 'anonymous'
%% Author information
%% Contents and number of authors suppressed with 'anonymous'.
%% Each author should be introduced by \author, followed by
%% \authornote (optional), \orcid (optional), \affiliation, and
%% \email.
%% An author may have multiple affiliations and/or emails; repeat the
%% appropriate command.
%% Many elements are not rendered, but should be provided for metadata
%% extraction tools.
%% Author with single affiliation.
% \author{Cyrus Omar}
% \authornote{with author1 note} %% \authornote is optional;
%% can be repeated if necessary
% \orcid{nnnn-nnnn-nnnn-nnnn} %% \orcid is optional
% \affiliation{
% \position{Position1}
% \department{Department1} %% \department is recommended
% \institution{University of Chicago, USA} %% \institution is required
% \streetaddress{Street1 Address1}
% \city{City1}
% \state{State1}
% \postcode{Post-Code1}
% \country{Country1}
% }
% \email{[email protected]} %% \email is recommended
% %% Author with two affiliations and emails.
% \author{First2 Last2}
% \authornote{with author2 note} %% \authornote is optional;
% %% can be repeated if necessary
% \orcid{nnnn-nnnn-nnnn-nnnn} %% \orcid is optional
% \affiliation{
% \position{Position2a}
% \department{Department2a} %% \department is recommended
% \institution{Institution2a} %% \institution is required
% \streetaddress{Street2a Address2a}
% \city{City2a}
% \state{State2a}
% \postcode{Post-Code2a}
% \country{Country2a}
% }
% \email{[email protected]} %% \email is recommended
% \affiliation{
% \position{Position2b}
% \department{Department2b} %% \department is recommended
% \institution{Institution2b} %% \institution is required
% \streetaddress{Street3b Address2b}
% \city{City2b}
% \state{State2b}
% \postcode{Post-Code2b}
% \country{Country2b}
% }
% \email{[email protected]} %% \email is recommended
%% Paper note
%% The \thanks command may be used to create a "paper note" ---
%% similar to a title note or an author note, but not explicitly
%% associated with a particular element. It will appear immediately
%% above the permission/copyright statement.
% \thanks{with paper note} %% \thanks is optional
%% can be repeated if necesary
%% contents suppressed with 'anonymous'
%% Abstract
%% Note: \begin{abstract}...\end{abstract} environment must come
%% before \maketitle command
% \input{abstract}
%% 2012 ACM Computing Classification System (CSS) concepts
%% Generate at 'http://dl.acm.org/ccs/ccs.cfm'.
% \begin{CCSXML}
% <ccs2012>
% <concept>
% <concept_id>10011007.10011006.10011008</concept_id>
% <concept_desc>Software and its engineering~General programming languages</concept_desc>
% <concept_significance>500</concept_significance>
% </concept>
% <concept>
% <concept_id>10003456.10003457.10003521.10003525</concept_id>
% <concept_desc>Social and professional topics~History of programming languages</concept_desc>
% <concept_significance>300</concept_significance>
% </concept>
% </ccs2012>
% \end{CCSXML}
\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10011007.10011006.10011008.10011009.10011012</concept_id>
<concept_desc>Software and its engineering~Functional languages</concept_desc>
<concept_significance>500</concept_significance>
</concept>
% <concept>
% <concept_id>10003752.10010124.10010131.10010134</concept_id>
% <concept_desc>Theory of computation~Operational semantics</concept_desc>
% <concept_significance>500</concept_significance>
% </concept>
</ccs2012>
\end{CCSXML}
\ccsdesc[500]{Software and its engineering~Functional languages}
% \ccsdesc[500]{Theory of computation~Operational semantics}
%% End of generated code
%% Keywords
%% comma separated list
% \keywords{live programming, gradual typing, contextual modal type theory, typed holes, structured editing} %% \keywords is optional
%% \maketitle
%% Note: \maketitle command must come after title commands, author
%% commands, abstract environment, Computing Classification System
%% environment and commands, and keywords command.
% \maketitle
% \thispagestyle{empty} % suppresses the footer
% \input{intro}
% \input{examples}
% \input{calculus}
% \input{implementation}
% \input{related-work}
% \input{discussion}
\input{formally}
%\clearpage
\bibliography{all.short}
\ifarxiv
\clearpage
\appendix
%\input{appendix-defns}
%\input{extensions}
\else
\fi
% \input{misc}
% \input{implementation-appendix}
\end{document}