-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
252 lines (237 loc) · 13.7 KB
/
index.html
File metadata and controls
252 lines (237 loc) · 13.7 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Welcome to Compiler Programming! — Compiler Programming</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/agogo.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Compiler Implementation Language" href="prelim-impl-lang.html" />
</head><body>
<div class="header-wrapper" role="banner">
<div class="header">
<div class="headertitle"><a
href="#">Compiler Programming</a></div>
<div class="rel" role="navigation" aria-label="related navigation">
<a href="prelim-impl-lang.html" title="Compiler Implementation Language"
accesskey="N">next</a> |
<a href="genindex.html" title="General Index"
accesskey="I">index</a>
</div>
</div>
</div>
<div class="content-wrapper">
<div class="content">
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="welcome-to-compiler-programming">
<h1>Welcome to Compiler Programming!<a class="headerlink" href="#welcome-to-compiler-programming" title="Permalink to this headline">¶</a></h1>
<p>This site aims to bring together practical knowledge regarding the design and implementation of optimizing compilers
and interpreters for Programming Languages.</p>
<p>There are a number of books on Compilers and Interpreters however only a very few of them are accompanied by
source code that implements the topics covered by the book. See below for a list of useful
learning projects that do include source code.</p>
<p>In recent years, thanks to LLVM, new programming language design has become a fertile space. New Language implementations
tend to focus on the language front-end, leveraging LLVM as the back-end for code optimization and code generation.
While this is beneficial if you only care about the language design aspects, it is unhelpful for the industry
as a whole, because the back-end of an optimizing compiler is a very interesting component, with a rich history of
algorithms and data structures, and is a subject worthy of study on its own.</p>
<p>We will cover both front-end and back-end techniques. We will implement a small scale language as a way
to learn various techniques, see what the common challenges are and how to address them.
Language design not being our goal, we will keep the language as simple as possible so that it allows us to
focus on important implementation issues.</p>
<p>Initially we will start with a procedural language. Later we will add features such as closures from functional languages
and classes and objects from OOP languages. We will also look at advanced front end techniques such as type inference and
generics.</p>
<p>The language will be statically typed to start with because this allows us to investigate the traditional compiler
optimization pipeline. Dyamically typed languages have their own interesting engineering problems.
We will eventually look at gradual typing and dynamic typing.</p>
<section id="implementation-and-discussions">
<h2>Implementation and Discussions<a class="headerlink" href="#implementation-and-discussions" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>The <a class="reference external" href="https://github.com/CompilerProgramming/ez-lang">EeZee programming language implementation</a> will serve as the playground for exploring various compilation
techniques.</p></li>
<li><p>This site is <a class="reference external" href="https://github.com/CompilerProgramming/compilerprogramming.github.io/tree/dev">maintained in github</a> too, and is generated using Sphinx.</p></li>
<li><p>We have a <a class="reference external" href="https://github.com/orgs/CompilerProgramming/discussions">Discussion Forum</a>.</p></li>
</ul>
</section>
<section id="preliminaries">
<h2>Preliminaries<a class="headerlink" href="#preliminaries" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Preliminaries</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="prelim-impl-lang.html">Compiler Implementation Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="ez-lang.html">The EeZee Programming Language</a></li>
</ul>
</div>
</section>
<section id="basic-front-end-techniques">
<h2>Basic Front-End techniques<a class="headerlink" href="#basic-front-end-techniques" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Parsing Techniques</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="lexical-analysis.html">Lexical Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="syntax-analysis.html">Syntax Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="abstract-syntax-tree.html">Abstract Syntax Tree</a></li>
<li class="toctree-l1"><a class="reference internal" href="type-systems.html">Type Systems</a></li>
<li class="toctree-l1"><a class="reference internal" href="semantic-analysis.html">Semantic Analysis</a></li>
</ul>
</div>
</section>
<section id="basic-back-end-techniques">
<h2>Basic Back-end techniques<a class="headerlink" href="#basic-back-end-techniques" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Backend Basics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="intermediate-representations.html">Intermediate Representations</a></li>
</ul>
</div>
</section>
<section id="basic-optimization-techniques">
<h2>Basic Optimization techniques<a class="headerlink" href="#basic-optimization-techniques" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>Dominators and Control Flow Graph</p></li>
<li><p>Static Single Assignment</p></li>
<li><p>Data Flow Analysis, Type Lattices, Abstract Interpretation</p></li>
<li><p>Peephole Optimizations</p></li>
<li><p>Sea of Nodes Representation</p></li>
<li><p>Code generation and Register Allocation</p></li>
</ul>
</section>
<section id="language-tools">
<h2>Language Tools<a class="headerlink" href="#language-tools" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>Debuggers</p></li>
<li><p>Language IDEs</p></li>
</ul>
</section>
<section id="advanced-front-end-techniques">
<h2>Advanced Front-end techniques<a class="headerlink" href="#advanced-front-end-techniques" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>Type inference</p></li>
<li><p>Classes and objects</p></li>
<li><p>Closures</p></li>
<li><p>Exception handling</p></li>
<li><p>Gradual typing</p></li>
<li><p>Generics</p></li>
</ul>
</section>
<section id="some-useful-learning-resources">
<h2>Some Useful Learning Resources<a class="headerlink" href="#some-useful-learning-resources" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Learning Resources</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="learning-resources.html">Learning Resources</a><ul>
<li class="toctree-l2"><a class="reference internal" href="learning-resources.html#courses">Courses</a></li>
<li class="toctree-l2"><a class="reference internal" href="learning-resources.html#papers-and-implementations">Papers And implementations</a></li>
<li class="toctree-l2"><a class="reference internal" href="learning-resources.html#others">Others</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="book-reviews">
<h2>Book Reviews<a class="headerlink" href="#book-reviews" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Reviews</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="compiler-books.html">Compiler Books</a><ul>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#dragon-books">Dragon Books</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#engineering-a-compiler-2nd-ed-cooper-torczon-2012">Engineering a Compiler, 2nd Ed. Cooper & Torczon. 2012.</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#modern-compiler-implementation-in-c-appel-1998-tiger-book">Modern Compiler Implementation in C. Appel. 1998. (Tiger book)</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#crafting-a-compiler-fischer-leblanc-cytron-2010">Crafting a Compiler. Fischer, LeBlanc, Cytron. 2010.</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#building-an-optimizing-compiler-bob-morgan-1998">Building an Optimizing Compiler. Bob Morgan. 1998.</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#advanced-compiler-design-implementation-muchnick-1997">Advanced Compiler Design & Implementation. Muchnick. 1997.</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#retargetable-c-compiler-a-design-and-implementation-hanson-fraser-1995">Retargetable C Compiler, A: Design and Implementation. Hanson & Fraser. 1995.</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#program-flow-analysis-theory-and-applications-editors-muchnick-jones-1981">Program Flow Analysis: Theory and Applications. Editors Muchnick, Jones. 1981.</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#ssa-based-compiler-design-various-authors">SSA-Based Compiler Design - various authors</a></li>
<li class="toctree-l2"><a class="reference internal" href="compiler-books.html#other-book-reviews">Other Book Reviews</a></li>
</ul>
</li>
</ul>
</div>
</section>
<section id="compiler-jobs">
<h2>Compiler Jobs<a class="headerlink" href="#compiler-jobs" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>A listing of <a class="reference external" href="https://github.com/mgaudet/CompilerJobs">compiler, language and runtime teams</a> for people looking for compiler jobs.</p></li>
</ul>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
</div>
<div class="sidebar">
<h3>Table of Contents</h3>
<p class="caption" role="heading"><span class="caption-text">Preliminaries</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="prelim-impl-lang.html">Compiler Implementation Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="ez-lang.html">The EeZee Programming Language</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Parsing Techniques</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="lexical-analysis.html">Lexical Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="syntax-analysis.html">Syntax Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="abstract-syntax-tree.html">Abstract Syntax Tree</a></li>
<li class="toctree-l1"><a class="reference internal" href="type-systems.html">Type Systems</a></li>
<li class="toctree-l1"><a class="reference internal" href="semantic-analysis.html">Semantic Analysis</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Backend Basics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="intermediate-representations.html">Intermediate Representations</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Learning Resources</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="learning-resources.html">Learning Resources</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Reviews</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="compiler-books.html">Compiler Books</a></li>
</ul>
<div role="search">
<h3 style="margin-top: 1.5em;">Search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="footer-wrapper">
<div class="footer">
<div class="left">
<div role="navigation" aria-label="related navigaton">
<a href="prelim-impl-lang.html" title="Compiler Implementation Language"
>next</a> |
<a href="genindex.html" title="General Index"
>index</a>
</div>
<div role="note" aria-label="source link">
<br/>
<a href="_sources/index.rst.txt"
rel="nofollow">Show Source</a>
</div>
</div>
<div class="right">
<div class="footer" role="contentinfo">
© Copyright 2024, Dibyendu Majumdar.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</body>
</html>