File: generics.tex

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (499 lines) | stat: -rw-r--r-- 17,203 bytes parent folder | download
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This source file is part of the Swift.org open source project
%
% Copyright (c) 2021 - 2022 Apple Inc. and the Swift project authors
% Licensed under Apache License v2.0 with Runtime Library Exception
%
% See https://swift.org/LICENSE.txt for license information
% See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% KOMA-Script 'scrbook' document class
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% From left to right, each option does the following:
% - A4 page size. Do not change!
% - Draw line under chapter/section heading at top of page
% - Next three options force use of serif fonts for part, chapter and section headings
% - Put Bibliography in Table of Contents
% - Use 'flat' ToC style because it looks better with double-digit chapter numbers
% - Use 'fleqn' to left-align display math to make it consistent with the 'quote' environment which I use for tables and diagrams and stuff
%
% - Changing `twoside=semi' to `twoside' is safe. The default mode is meant for reading on-screen. If you make this change, even pages have a wider left margin, and odd pages have a wider right margin, which looks silly when scrolling vertically, but makes sense if you actually print and bind the book.
\documentclass[a4paper,headsepline,headings=standardclasses,headings=big,chapterprefix=false,bibliography=totoc,toc=flat,fleqn,twoside=semi]{scrbook}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Fancy drop caps at the start of each chapter.
\usepackage{Zallman,lettrine}
\renewcommand\LettrineFontHook{\Zallmanfamily}

% Multiple indices.
\usepackage{imakeidx}

% Theorem-like environments: proposition, example, algorithm, etc.
\usepackage{amsthm}

% For the 'List of Algorithms'. Must load before hyperref.
\usepackage{thmtools}

\renewcommand\thmtformatoptarg[1]{#1}

% thmtools doesn't offer enough customization options, so hack it up to not print "Algorithm" in each line of the "List of Algorithms"
\makeatletter

\renewcommand\thmt@mklistcmd{%
  \thmtlo@newentry
    \@xa\def\csname ll@\thmt@envname\endcsname{%
      \protect\numberline{\csname the\thmt@envname\endcsname}%
      \ifx\@empty\thmt@shortoptarg\else\protect\thmtformatoptarg{\thmt@shortoptarg}\fi
    }%
  \@xa\gdef\csname thmt@contentsline@\thmt@envname\endcsname{%
    \thmt@contentslineShow% default:show
  }%
}

\makeatother

% Hyperlinks in PDF files. We enable numbering in PDF bookmark titles, and backreferences from bibliography entries.
\usepackage[pdfborder={0 0 0},linkcolor=blue,citecolor=blue,linktocpage=true,colorlinks=true,bookmarksnumbered,bookmarksopen=true,bookmarksopenlevel=0,pagebackref]{hyperref}

% More control over PDF bookmarks.
\usepackage{bookmark}

% \uptau for generic parameter notation
\usepackage{upgreek}

% rcases, etc
\usepackage{mathtools}

% Nice horizontal rules in tables: \toprule, \midrule, \bottomrule
\usepackage{booktabs}

% AMS math symbols: \varnothing, \mathbb, etc
\usepackage{amssymb}

% UTF-8 greek letters directly in TeX for verbatim environment
\usepackage{textgreek}

% TikZ for figures
\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{positioning,shapes,arrows,trees,calc,fit,backgrounds,shapes.multipart}
\tikzstyle{class}=[rounded corners,draw=black,thick,anchor=west]
\tikzstyle{stage}=[rounded corners, draw=darkgray, thick, fill=lightgray, text centered, outer sep=0.2em]
\tikzstyle{data}=[draw=darkgray, thick, fill=light-gray, text centered, outer sep=0.2em]
\tikzstyle{arrow}=[->,>=stealth]
\tikzstyle{genericenv}=[inner sep=12pt, rounded corners, draw=gray, very thick]
\tikzstyle{genericenvlabel}=[fill=white, draw=gray, very thick, rounded corners]
\tikzstyle{genericenvmatrix}=[matrix, row sep=3pt, column sep=5pt]
\tikzstyle{genericenvpart}=[rounded corners, fill=light-gray]
\tikzstyle{abstractvertex}=[circle, fill=gray]
\tikzstyle{abstractvertex2}=[circle, fill=lightgray]
\tikzstyle{SourceFile}=[draw=black,thick,fill=lightgray]
\tikzstyle{decl}=[draw=black,thick]
\tikzstyle{type}=[rounded corners,draw=black,thick,fill=lighter-gray]
\tikzstyle{OtherEntity}=[draw=black,thick,fill=lighter-gray]

% \DeclareMathOperator, \boxed, etc
\usepackage{mathtools}

% Verbatim environment with border and line numbers
\usepackage{fancyvrb}

% Extended array environment
\usepackage{array}

% Colors for shaded frames
\usepackage{xcolor}

% Shaded frames for 'More details' boxes in Introduction
\usepackage{mdframed}

% To customize bibliography with \bstctlcite
\usepackage{IEEEtrantools}

% Each chapter is its own file.
\usepackage{subfiles}

% Strikethrough (\st)
\usepackage[normalem]{ulem}

% Line breaks in URLs in bibliography
\usepackage{url}
\def\UrlBreaks{\do\/\do-}

% Text flowing around figures
\usepackage{wrapfig}

% For \textbf inside \texttt
\usepackage{bold-extra}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Environments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Various theorem-like environments
\theoremstyle{definition}
\newtheorem{definition}{Definition}[chapter]

% Algorithm 12A, 12B, etc.
\newtheorem{algorithm}{Algorithm}[chapter]
\renewcommand\thealgorithm{\thechapter\Alph{algorithm}}

% Hack so that the sample 'Algorithm 0A' from the Preface doesn't show up in the list.
\newtheorem{algorithmx}{Algorithm}[chapter]
\renewcommand\thealgorithmx{\thechapter\Alph{algorithmx}}

% Use the same counter for all three so you get Definition 12.1, Proposition 12.2, Example 12.3 etc.
\newtheorem{example}[definition]{Example}

% We don't want the statement of the theorem to use italics...
% \theoremstyle{theorem}
\newtheorem{proposition}[definition]{Proposition}
\newtheorem{lemma}[definition]{Lemma}
\newtheorem{theorem}[definition]{Theorem}

% 'listing' floating environment for source listings
\DeclareNewTOC[
  type = listing,
  counterwithin=chapter,
  float
]{listing}

% 'Verbatim' environment for fancy source listings
\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{frame=single,rulecolor=\color{gray},numbers=left}

% 'More Details' boxes in Introduction
\newenvironment{MoreDetails}{\medskip\begin{mdframed}[rightline=true,frametitlerule=true,frametitlerulecolor=gray,frametitlebackgroundcolor=light-gray,frametitlerulewidth=2pt,backgroundcolor=light-gray,linecolor=gray,frametitle={More details}]
\begin{itemize}}{\end{itemize}
\end{mdframed}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% I use this in a few places.
\definecolor{light-gray}{gray}{0.90}
\definecolor{lighter-gray}{gray}{0.97}

% Zero-tolerance policy for overfull hboxes.
\overfullrule=10pt

% Comment this out and uncomment the next line to see the work-in-progress sections.
\newcommand{\ifWIP}{\iffalse}
%\newcommand{\ifWIP}{\iftrue}

% By default KOMA-script lays out footnotes so that the second line is offset by the width of an opening quotation mark. This looks ugly if your footnote text is not actually a quotation, because the second line is indented too far relative to the first line.
\deffootnote[1em]{1em}{1em}{\textsuperscript{\thefootnotemark}}

% Bibliography backreferences pages with citations
\renewcommand*{\backrefalt}[4]{%
       \ifcase #1 %
         \\*(No citations.)%
       \or
         \\*(Cited on page #2.)%
       \else
         \\*(Cited on pages #2.)%
\fi }

% Request evalator requests
\newcommand{\Request}[1]{\textbf{#1}}

% Formal requirements in proof calculus
\newcommand{\FormalReq}[1]{[\texttt{#1}]}
\newcommand{\ConfReq}[2]{[\texttt{#1:~#2}]}

% Substitution algebra notation
\newcommand{\Type}[1]{[{\texttt{#1}}]}

\newcommand{\SubstMap}[1]{\{#1\}}
\newcommand{\SubstMapC}[2]{\{#1;\,#2\}}

\newcommand{\SubstType}[2]{\texttt{#1} \mapsto \texttt{#2}}
\newcommand{\SubstConf}[3]{\ConfReq{#1}{#3} \mapsto \ConfReq{#2}{#3}}

\newcommand{\SubstMapLong}[1]{\left\{\begin{array}{l}#1\end{array}\right\}}
\newcommand{\SubstMapLongC}[2]{\left\{\begin{array}{l}#1;\\[\medskipamount] #2\end{array}\right\}}

\newcommand{\Proto}[1]{[\texttt{#1}]}

\newcommand{\ProtoObj}{\textsc{Proto}}

\newcommand{\Conf}[2]{[#1\texttt{:~#2}]}

\newcommand{\AssocType}[1]{\pi(\texttt{#1})}
\newcommand{\AssocConf}[2]{\pi(\texttt{#1:~#2})}

\newcommand{\SigObj}{\textsc{Sig}}
\newcommand{\TypeObj}[1]{\textsc{Type}({#1})}
\newcommand{\SubMapObj}[2]{\textsc{Sub}({#1, #2})}
\newcommand{\ConfObj}[1]{\textsc{Conf}({#1})}
\newcommand{\ConfPObj}[2]{\textsc{Conf}_{\texttt{#1}}({#2})}
\newcommand{\AssocTypeObj}[1]{\textsc{AssocType}_{\texttt{#1}}}
\newcommand{\AssocConfObj}[1]{\textsc{AssocConf}_{\texttt{#1}}}

\newcommand{\ttbf}[1]{\texttt{\textbf{#1}}}
\newcommand{\T}{\ttbf{T}}

\newcommand{\PhiInv}{\varphi^{-1}}
\newcommand{\AR}{\langle A;\,R\rangle}

% Old substitution algebra notation
\newcommand{\mathboxed}[1]{\boxed{\mbox{\vphantom{pI\texttt{pI}}#1}}}
\newcommand{\ttbox}[1]{\boxed{\mbox{\vphantom{pI\texttt{pI}}\texttt{#1}}}}
\newcommand{\ttgp}[2]{\texttt{$\uptau$\_#1\_#2}}

% Archetypes print [[like this]]. Must be in math mode
\newcommand{\archetype}[1]{[\![\texttt{#1}]\!]}

% Equivalence class notation for math
\newcommand{\EquivClass}[1]{[\![#1]\!]}

% GitHub links in 'Source Code Reference' sections
\newcommand{\SourceFile}[1]{\href{https://github.com/apple/swift/tree/main/#1}{\texttt{#1}}}

% Note: \apiref{foo}{bar} must be followed by a newline, because of a quirk with \noindent
\def\apiref#1#2
{\bigskip\hrule\nobreak\vskip 3pt\noindent\texttt{\vphantom{p}#1}\hfill\textsl{#2}\par\nobreak\vskip 3pt\hrule\vskip 3pt\noindent}

% Requirement Machine symbols
\newcommand{\proto}[1]{\texttt{#1}}
\newcommand{\protosym}[1]{[\texttt{#1}]}
\newcommand{\assocsym}[2]{[\texttt{#1}|\texttt{#2}]}
\newcommand{\layoutsym}[1]{[\mathrm{layout}\colon\texttt{#1}]}
\newcommand{\supersym}[1]{[\mathrm{superclass}\colon #1]}
\newcommand{\concretesym}[1]{[\mathrm{concrete}\colon #1]}

\DeclareMathOperator{\Src}{src}
\DeclareMathOperator{\Dst}{dst}

%%%%
% Remove these
%%%%
\usepackage{bm}
\newcommand{\namesym}[1]{\mathrm{#1}}
\newcommand{\genericparam}[1]{\bm{\mathsf{#1}}}
\newcommand{\gensig}[2]{\langle #1\;\textit{where}\;#2\rangle}
\newcommand{\genericsym}[2]{\bm{\uptau}_{#1,#2}}
\DeclareMathOperator{\gpdepth}{depth}
\DeclareMathOperator{\gpindex}{index}
\DeclareMathOperator{\domain}{domain}
%%%%%

% Type parameter and conformance path graph
\tikzstyle{root} = [rounded corners, fill=lightgray]
\tikzstyle{interior} = [rounded corners, fill=light-gray]

% Protocol dependency graph
\tikzstyle{protocol} = [rounded corners, fill=light-gray]

% Title page logo

\newcommand{\GenericsLogo}{\Huge\centering\textcolor{lightgray}{$
\begin{array}{|cccccccccc|}
\hline
\otimes&\circ&+&:&\cdot&\varnothing&\star&\vee&\times&\bot\\
\sim&\rightarrow&\in&\Rightarrow&=&\vdash&<&\prec&>&\mapsto\\
+&\varnothing&\cdot&\vee&\star&\bot&\times&\circ&\otimes&:\\
>&\prec&\sim&\mapsto&\in&\rightarrow&=&\Rightarrow&<&\vdash\\
\cdot&\bot&\star&\circ&\times&:&\otimes&\varnothing&+&\vee\\
<&\Rightarrow&>&\vdash&\sim&\prec&\in&\mapsto&=&\rightarrow\\
\star&:&\times&\varnothing&\otimes&\vee&+&\bot&\cdot&\circ\\
=&\mapsto&<&\rightarrow&>&\Rightarrow&\sim&\vdash&\in&\prec\\
\times&\vee&\otimes&\bot&+&\circ&\cdot&:&\star&\varnothing\\
\in&\vdash&=&\prec&<&\mapsto&>&\rightarrow&\sim&\Rightarrow\\
\hline
\end{array}
$}}

% I don't like boldface page numbers in the table of contents.
\RedeclareSectionCommands[tocpagenumberformat=]{chapter}
\RedeclareSectionCommands[tocpagenumberformat=]{part}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Index
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% We have a main index and one for command line flags.

% generics.ist configures letter headings in the index.
\makeindex[intoc,options=-s generics]
\makeindex[intoc,name=flags,title=Command Line Flags,columns=1,options=-s generics]

% \Index is used instead of \index for entries with custom formatting, eg
%
%   \Index{foo bar@foo \texttt{bar}}
%
% because for some reason, a mix of \IndexDefinition or \IndexSource with \index doesn't get collated correctly.
\newcommand{\Index}[1]{\index{#1|textrm}}

\newcommand{\IndexDefinition}[1]{\index{#1|textbf}}
\newcommand{\IndexSource}[1]{\index{#1|textit}}

% Add an entry to the command line flag index with the right formatting
\newcommand{\IndexFlag}[1]{\index[flags]{#1@\texttt{-#1}}}

% Used for -debug-requirement-machine=... flags
\newcommand{\IndexTwoFlag}[2]{\index[flags]{#1@\texttt{-#1}!#2@\texttt{#2}}}

% Derivation steps
\newcommand{\IndexStep}[1]{\index{#1 derivation step@\textsc{#1} derivation step|textrm}}
\newcommand{\IndexStepDefinition}[1]{\index{#1 derivation step@\textsc{#1} derivation step|textbf}}

% Sets in the type substitution algebra
\newcommand{\IndexSet}[2]{\index{#1@$#2$|textrm}}
\newcommand{\IndexSetDefinition}[2]{\index{#1@$#2$|textbf}}

% Normally a seealso index entry elides the page number, but sometimes we want index entries that look like this:
%
% foo, 123
%    see also bar
%
% The trick is to make a fake subentry and format it with this macro to prevent it from showing up.
%
% The above example would be generated by: \index{foo}\index{foo!z@\igobble|seealso{bar}}
%
% The 'z' should sort after every other 'real' subentry, if any.
\def\igobble#1 {}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\titlehead{\GenericsLogo}
\title{Compiling Swift Generics}
\author{Slava Pestov}

% Put chapter/section headings at the top of each page
\pagestyle{headings}

\begin{document}

\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Let's Go!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Add a PDF bookmark for the Preface
\cleardoublepage
\pdfbookmark{Preface}{preface}

\subfile{chapters/preface}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table of Contents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% PDF bookmark for Table of Contents
\cleardoublepage
\pdfbookmark{Contents}{toc}
\tableofcontents

% List of Algorithms
\cleardoublepage
\pdfbookmark{List of Algorithms}{loa}
\listoftheorems[ignoreall,onlynamed={algorithm},title={List of Algorithms}]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The Good Stuff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\part{Fundamental Concepts}\label{part fundamentals}

\subfile{chapters/introduction}

\subfile{chapters/compilation-model}

\subfile{chapters/types}

\subfile{chapters/declarations}

\subfile{chapters/generic-declarations}

\subfile{chapters/generic-signatures}

\subfile{chapters/substitution-maps}

\subfile{chapters/conformances}

\subfile{chapters/generic-environments}

\part{Further Explorations}\label{part odds and ends}

\subfile{chapters/type-resolution}

\subfile{chapters/extensions}

\subfile{chapters/building-generic-signatures}

\subfile{chapters/conformance-paths}

\subfile{chapters/opaque-return-types}

\subfile{chapters/existential-types}

\subfile{chapters/class-inheritance}

\subfile{chapters/witness-thunks}

\part{The Requirement Machine}\label{part rqm}

\subfile{chapters/basic-operation}

\subfile{chapters/monoids}

\subfile{chapters/symbols-terms-and-rules}

\subfile{chapters/completion}

\subfile{chapters/property-map}

\subfile{chapters/concrete-conformances}

\subfile{chapters/rewrite-system-minimization}

% Move subsequent PDF bookmarks to the top level since the Appendix, Bibliography and Index are not logically contained in Part III
\bookmarksetup{startatroot}

\appendix

\subfile{chapters/derived-requirements-summary}

\subfile{chapters/type-substitution-summary}

\subfile{chapters/runtime-representation}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Postmatter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Customize bibliography some more
\begingroup
\scriptsize
% Don't justify paragraphs since it looks silly
\raggedright
% Don't break bibliography entries across pages
\raggedbottom
\widowpenalties 1 10000
\bibliographystyle{IEEEtran}
\bibliography{generics}
\endgroup

% Index
\indexprologue{\noindent A \textbf{bold} page number is where the concept is first defined; an \textit{italic} page number is where the implementation is shown in a ``Source Code Reference'' section. A plain page number is where the concept is used.\par}
\printindex

% Command Line Flags
\setindexpreamble{}
\printindex[flags]

% Goodbye!
\end{document}