├── CCBY-logo.pdf ├── figs ├── cheney.pdf ├── sudoku.pdf ├── closures.pdf ├── cheney.graffle ├── derivation.pdf ├── root-stack.pdf ├── sudoku.graffle ├── tuple-rep.pdf ├── cheney-python.pdf ├── closures.graffle ├── sudoku-graph.pdf ├── tuple-rep.graffle ├── ambig-parse-tree.pdf ├── copy-collect-1.pdf ├── copy-collect-2.pdf ├── root-stack.graffle ├── sudoku-graph-bw.pdf ├── sudoku-graph.graffle ├── cheney-python.graffle ├── copy-collect-1.graffle ├── copy-collect-2.graffle ├── root-stack-python.pdf ├── simple-parse-tree.pdf ├── copy-collect-1-python.pdf ├── copy-collect-2-python.pdf ├── root-stack-python.graffle ├── shift-reduce-conflict.pdf ├── sudoku-graph-bw.graffle ├── copy-collect-1-python.graffle ├── copy-collect-2-python.graffle ├── simple-parse-tree.graffle ├── derivation.graffle └── shift-reduce-conflict.graffle ├── shadow-stack.pdf ├── CopyCollector2.pdf ├── CopyingCollector.pdf ├── errata-racket.txt ├── Essentials_of_Compilation_Racket.pptx ├── errata-python.txt ├── .gitignore ├── shell.nix ├── .github └── workflows │ └── ci.yml ├── Makefile ├── README.md ├── multind.sty ├── s-expr-example.rkt ├── python.bib ├── dataflow-notes.txt ├── SyllabusExampleRacket.md ├── notes.md ├── defs.tex └── book.bib /CCBY-logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/CCBY-logo.pdf -------------------------------------------------------------------------------- /figs/cheney.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/cheney.pdf -------------------------------------------------------------------------------- /figs/sudoku.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/sudoku.pdf -------------------------------------------------------------------------------- /figs/closures.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/closures.pdf -------------------------------------------------------------------------------- /shadow-stack.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/shadow-stack.pdf -------------------------------------------------------------------------------- /CopyCollector2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/CopyCollector2.pdf -------------------------------------------------------------------------------- /CopyingCollector.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/CopyingCollector.pdf -------------------------------------------------------------------------------- /figs/cheney.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/cheney.graffle -------------------------------------------------------------------------------- /figs/derivation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/derivation.pdf -------------------------------------------------------------------------------- /figs/root-stack.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/root-stack.pdf -------------------------------------------------------------------------------- /figs/sudoku.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/sudoku.graffle -------------------------------------------------------------------------------- /figs/tuple-rep.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/tuple-rep.pdf -------------------------------------------------------------------------------- /figs/cheney-python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/cheney-python.pdf -------------------------------------------------------------------------------- /figs/closures.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/closures.graffle -------------------------------------------------------------------------------- /figs/sudoku-graph.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/sudoku-graph.pdf -------------------------------------------------------------------------------- /figs/tuple-rep.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/tuple-rep.graffle -------------------------------------------------------------------------------- /figs/ambig-parse-tree.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/ambig-parse-tree.pdf -------------------------------------------------------------------------------- /figs/copy-collect-1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-1.pdf -------------------------------------------------------------------------------- /figs/copy-collect-2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-2.pdf -------------------------------------------------------------------------------- /figs/root-stack.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/root-stack.graffle -------------------------------------------------------------------------------- /figs/sudoku-graph-bw.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/sudoku-graph-bw.pdf -------------------------------------------------------------------------------- /figs/sudoku-graph.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/sudoku-graph.graffle -------------------------------------------------------------------------------- /figs/cheney-python.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/cheney-python.graffle -------------------------------------------------------------------------------- /figs/copy-collect-1.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-1.graffle -------------------------------------------------------------------------------- /figs/copy-collect-2.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-2.graffle -------------------------------------------------------------------------------- /figs/root-stack-python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/root-stack-python.pdf -------------------------------------------------------------------------------- /figs/simple-parse-tree.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/simple-parse-tree.pdf -------------------------------------------------------------------------------- /figs/copy-collect-1-python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-1-python.pdf -------------------------------------------------------------------------------- /figs/copy-collect-2-python.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-2-python.pdf -------------------------------------------------------------------------------- /figs/root-stack-python.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/root-stack-python.graffle -------------------------------------------------------------------------------- /figs/shift-reduce-conflict.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/shift-reduce-conflict.pdf -------------------------------------------------------------------------------- /figs/sudoku-graph-bw.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/sudoku-graph-bw.graffle -------------------------------------------------------------------------------- /errata-racket.txt: -------------------------------------------------------------------------------- 1 | January 24, 2023 2 | 3 | p. 41 4 | 5 | Figure 3.4 6 | change 7 | L_after(2) = {c} 8 | to 9 | L_after(3) = {c} 10 | -------------------------------------------------------------------------------- /figs/copy-collect-1-python.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-1-python.graffle -------------------------------------------------------------------------------- /figs/copy-collect-2-python.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/figs/copy-collect-2-python.graffle -------------------------------------------------------------------------------- /Essentials_of_Compilation_Racket.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IUCompilerCourse/Essentials-of-Compilation/HEAD/Essentials_of_Compilation_Racket.pptx -------------------------------------------------------------------------------- /errata-python.txt: -------------------------------------------------------------------------------- 1 | 2 | January 24, 2023 3 | 4 | p. 50 5 | 6 | Figure 4.3 7 | change 8 | L_after(2) = {c} 9 | to 10 | L_after(3) = {c} 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .DS_Store 3 | auto/ 4 | *.aux 5 | *.bbl 6 | *.bcf 7 | *.blg 8 | *.idx 9 | *.ilg 10 | *.ind 11 | *.log 12 | *.out 13 | *.run.xml 14 | *.synctex.gz 15 | *.toc 16 | *.fls 17 | *latexmk 18 | book.pdf 19 | 20 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | 2 | # By default (irreproducibly) use whatever nixpkgs is in path: 3 | with (import {}); 4 | 5 | # Probably a lower-footprint way of doing this: 6 | stdenv.mkDerivation { 7 | name = "docsEnv"; 8 | buildInputs = [ 9 | texlive.combined.scheme-full 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | pull_request: 4 | jobs: 5 | build: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Setup 9 | run: sudo apt-get update && sudo apt-get install --no-install-recommends -y biber latexmk lmodern texlive-bibtex-extra texlive-latex-extra texlive-science 10 | - name: Checkout 11 | uses: actions/checkout@v2 12 | - name: Keep Racket edition 13 | run: sed -i 's|\\def\\edition{0}|\\def\\edition{0}|g' book.tex 14 | - name: Build PDF 15 | run: make 16 | - name: Release 17 | uses: softprops/action-gh-release@v1 18 | if: startsWith(github.ref, 'refs/tags/') 19 | with: 20 | files: book.pdf 21 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: all cont continuous clean publish 3 | 4 | LATEXMK= latexmk -pdf 5 | 6 | all: 7 | $(LATEXMK) -f book 8 | 9 | cont: continuous 10 | continuous: 11 | $(LATEXMK) -pvc book 12 | 13 | clean: 14 | $(LATEXMK) -C book 15 | rm -f book.pdf *.log *.aux *.bbl \ 16 | *.lof *.out *.toc *.blg *.ilg *.ind *.idx \ 17 | *.lot *.run.xml *.bcf *.fls *.fdb_latexmk 18 | 19 | # Build with a fixed snapshot of NixPkgs 17.03. Known-to-work. 20 | # For a very clean version, run git clean -fxd followed by this: 21 | # 22 | # This may take a long time and build a complete version of texlive. 23 | # Since it is fixed-in-time it may not have binary caches available and 24 | # may need to build from source. 25 | nix: 26 | NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/51a83266d164195698f04468d90d2c6238ed3491.tar.gz $(MAKE) nix-head 27 | 28 | # This is a compromise. Build faster by using a binary cache, but 29 | # still allow minor version patches by pointing at the head of a 30 | # (dynamic) channel. 31 | nix-fast: 32 | NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-17.03.tar.gz $(MAKE) nix-head 33 | 34 | # Build with whatever version of nixpkgs is in the users environment: 35 | nix-head: 36 | nix-shell --pure --run make 37 | 38 | 39 | # Specific to Fall16: 40 | publish: 41 | scp build/book.pdf tank.soic.indiana.edu:p523-web/book.pdf 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Essentials of Compilation 2 | 3 | This is the LaTeX sources for two books, one about compiling a subset 4 | of Racket to x86-64 assembly code and the other about compiling a 5 | subset of Python, also to x86-64. 6 | 7 | **Generating the book** 8 | 9 | To generate the book (`build/book.pdf`), run the `make` command (assuming 10 | you have a full install of TeX Live). 11 | 12 | **Related resources** 13 | 14 | * [IU Compiler Course Webpage](https://iucompilercourse.github.io/IU-P423-P523-E313-E513-Fall-2020/) 15 | * [Student Support Code (Racket Version)](https://github.com/IUCompilerCourse/public-student-support-code) 16 | * [Student Support Code (Python Version)](https://github.com/IUCompilerCourse/python-student-support-code) 17 | 18 | If you are an instructor, you may also request access to the reference 19 | implementation of the compiler and the full test suite. 20 | 21 | * [Instructor Solution (Racket Version)](https://github.com/IUCompilerCourse/course-compiler) 22 | * [Instructor Solution (Python Version)](https://github.com/IUCompilerCourse/python-compiler) 23 | 24 | **Universities that have used this book** 25 | 26 | 1. California Institute of Technology 27 | 2. California Polytechnic State University, San Luis Obispo 28 | 3. IIIT Hyderabad 29 | 4. Portland State University 30 | 5. Rose Hulman Institute of Technology 31 | 6. University of Basel 32 | 7. University of Colorado Boulder (older version of the book) 33 | 8. University of Freiburg 34 | 9. University of Massachusetts Lowell 35 | 10. University of Vermont 36 | 11. Wisconsin Lutheran College 37 | 12. University of Tuebingen 38 | 13. Worcester Polytechnic Institute 39 | 40 | Instructors, please let me know if you plan to use this book in your course! 41 | -------------------------------------------------------------------------------- /multind.sty: -------------------------------------------------------------------------------- 1 | % indexes document style option for producing multiple indexes 2 | % for use with the modified bbok style, CHbook.sty 3 | % Written by F.W. Long, Version 1.1, 12 August 1991. 4 | 5 | % Modified by F.W. Long, Version 1.1a, 29 August 1991 6 | % to get the index heading correctly spaced. 7 | 8 | % Modified by F.W. Long, Version 1.1b, 31 August 1991 9 | % to remove the abbreviation \ix (which should be in the document, not here). 10 | 11 | % Modified \makeindex and \index commands to allow multiple indexes 12 | % in both cases the first parameter is the index name. 13 | % They now work more like \@starttoc and \addcontentsline. 14 | % \index is no longer defined inside \makeindex but determines 15 | % whether the appropriate file is defined before writing to it. 16 | 17 | \def\makeindex#1{\begingroup 18 | \makeatletter 19 | \if@filesw \expandafter\newwrite\csname #1@idxfile\endcsname 20 | \expandafter\immediate\openout \csname #1@idxfile\endcsname #1.idx\relax 21 | \typeout{Writing index file #1.idx }\fi \endgroup} 22 | 23 | \def\index#1{\@bsphack\begingroup 24 | \def\protect##1{\string##1\space}\@sanitize 25 | \@wrindex{#1}} 26 | 27 | % \@wrindex now checks that the appropriate file is defined. 28 | 29 | \def\@wrindex#1#2{\let\thepage\relax 30 | \xdef\@gtempa{\@ifundefined{#1@idxfile}{}{\expandafter 31 | \write\csname #1@idxfile\endcsname{\string 32 | \indexentry{#2}{\thepage}}}}\endgroup\@gtempa 33 | \if@nobreak \ifvmode\nobreak\fi\fi\@esphack} 34 | 35 | % Modified \printindex command to allow multiple indexes. 36 | % This now takes over much of the work of \theindex. 37 | % Again, the first parameter is the index name. 38 | % The second parameter is the index title (as printed). 39 | 40 | \newif\if@restonecol 41 | \def\printindex#1#2{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi 42 | \columnseprule \z@ \columnsep 35pt 43 | \newpage \twocolumn[{\Large\bf #2 \vskip4ex}] 44 | \markright{\uppercase{#2}} 45 | \addcontentsline{toc}{section}{#2} 46 | \@input{#1.ind}} 47 | 48 | % The following index commands are taken from book.sty. 49 | % \theindex is modified to not start a chapter. 50 | 51 | \def\theindex{\parindent\z@ 52 | \parskip\z@ plus .3pt\relax\let\item\@idxitem} 53 | \def\@idxitem{\par\hangindent 40pt} 54 | \def\subitem{\par\hangindent 40pt \hspace*{20pt}} 55 | \def\subsubitem{\par\hangindent 40pt \hspace*{30pt}} 56 | \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} 57 | \def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax} 58 | 59 | % the command \ix allows an abbreviation for the general index 60 | 61 | %\def\ix#1{#1\index{general}{#1}} 62 | 63 | % define the \see command from makeidx.sty 64 | 65 | \def\see#1#2{{\em see\/} #1} 66 | -------------------------------------------------------------------------------- /s-expr-example.rkt: -------------------------------------------------------------------------------- 1 | #lang racket 2 | (require racket/match) 3 | (require racket/fixnum) 4 | 5 | (define assert 6 | (lambda (msg b) 7 | (if (not b) 8 | (begin 9 | (display "ERROR: ") 10 | (display msg) 11 | (newline)) 12 | (void)))) 13 | 14 | (define ast1.4 `(- 8)) 15 | (define ast1.1 `(+ 50 ,ast1.4)) 16 | 17 | (match ast1.1 18 | [`(,op ,child1 ,child2) 19 | (print op) (newline) 20 | (print child1) (newline) 21 | (print child2)]) 22 | 23 | (define (arith-kind arith) 24 | (match arith 25 | [(? fixnum?) `int] 26 | [`(- ,c1) `neg] 27 | [`(+ ,c1 ,c2) `add])) 28 | 29 | (arith-kind `50) 30 | (arith-kind `(- 8)) 31 | (arith-kind `(+ 50 (- 8))) 32 | 33 | (define (arith? sexp) 34 | (match sexp 35 | [(? fixnum?) #t] 36 | [`(+ ,e1 ,e2) 37 | (and (arith? e1) (arith? e2))] 38 | [`(- ,e) (arith? e)] 39 | [else #f])) 40 | 41 | (arith? `(+ 50 (- 8))) 42 | (arith? `(- 50 (+ 8))) 43 | 44 | (define (interp-R0 e) 45 | (match e 46 | [(? fixnum?) e] 47 | [`(read) 48 | (let ([r (read)]) 49 | (cond [(fixnum? r) r] 50 | [else (error 'interp-R0 "input was not an integer" r)]))] 51 | [`(- ,(app interp-R0 v)) 52 | (fx- 0 v)] 53 | [`(+ ,(app interp-R0 v1) ,(app interp-R0 v2)) 54 | (fx+ v1 v2)] 55 | )) 56 | 57 | (interp-R0 ast1.1) 58 | ;(interp-R0 `(+ (read) (- 8))) 59 | 60 | (define (pe-neg r) 61 | (match r 62 | [(? fixnum?) (fx- 0 r)] 63 | [else `(- ,r)] 64 | )) 65 | 66 | (define (pe-add r1 r2) 67 | (match (list r1 r2) 68 | [`(,n1 ,n2) 69 | #:when (and (fixnum? n1) (fixnum? n2)) 70 | (fx+ r1 r2)] 71 | [else 72 | `(+ ,r1 ,r2)] 73 | )) 74 | 75 | (define (pe-arith e) 76 | (match e 77 | [(? fixnum?) e] 78 | [`(read) 79 | `(read)] 80 | [`(- ,e1) 81 | (pe-neg (pe-arith e1))] 82 | [`(+ ,e1 ,e2) 83 | (pe-add (pe-arith e1) (pe-arith e2))] 84 | )) 85 | 86 | ;; e ::= (read) | (- (read)) | (+ e e) 87 | ;; r ::= n | (+ n e) | e 88 | 89 | (define (pe-neg2 r) 90 | (match r 91 | [(? fixnum?) (fx- 0 r)] 92 | [`(+ ,n ,e2) 93 | #:when (fixnum? n) 94 | `(+ ,(fx- 0 n) ,(pe-neg2 e2))] 95 | [`(read) `(- (read))] 96 | [`(- ,e2) e2] 97 | [`(+ ,e1 ,e2) 98 | `(+ ,(pe-neg2 e1) ,(pe-neg2 e2))] 99 | )) 100 | 101 | (define (pe-add2 r1 r2) 102 | (match r1 103 | [(? fixnum?) 104 | (match r2 105 | [(? fixnum?) (fx+ r1 r2)] 106 | [`(+ ,n2 ,e2) #:when (fixnum? n2) 107 | `(+ ,(fx+ r1 n2) ,e2)] 108 | [else `(+ ,r1 ,r2)])] 109 | [`(+ ,n1 ,e1) 110 | (match r2 111 | [(? fixnum?) `(+ (fx+ n1 r2) ,e1)] 112 | [`(+ ,n2 ,e2) #:when (fixnum? n2) 113 | `(+ ,(fx+ n1 n2) (+ ,e1 ,e2))] 114 | [else `(+ ,r1 ,r2)])] 115 | [else 116 | (match r2 117 | [(? fixnum?) `(+ ,r2 ,r1)] 118 | [else `(+ ,r1 ,r2)])] 119 | )) 120 | 121 | (define (pe-arith2 e) 122 | (match e 123 | [(? fixnum?) e] 124 | [`(read) 125 | `(read)] 126 | [`(- ,e1) 127 | (pe-neg2 (pe-arith2 e1))] 128 | [`(+ ,e1 ,e2) 129 | (pe-add2 (pe-arith2 e1) (pe-arith2 e2))] 130 | )) 131 | 132 | 133 | (define (test-pe pe p) 134 | (assert "testing pe-arith" (equal? (interp-R0 p) 135 | (interp-R0 (pe p))))) 136 | (if #f 137 | (begin 138 | (test-pe pe-arith `(+ (read) (- (+ 5 3)))) 139 | (test-pe pe-arith `(+ 1 (+ (read) 1))) 140 | (test-pe pe-arith `(- (+ (read) (- 5)))) 141 | 142 | (test-pe pe-arith2 `(+ (read) (- (+ 5 3)))) 143 | (test-pe pe-arith2 `(+ 1 (+ (read) 1))) 144 | (test-pe pe-arith2 `(- (+ (read) (- 5)))) 145 | ) 146 | (void)) 147 | -------------------------------------------------------------------------------- /python.bib: -------------------------------------------------------------------------------- 1 | 2 | @Article{Anderson73, 3 | author = {T. Anderson and J. Eve and J. Horning}, 4 | title = {Efficient LR(1) Parsers}, 5 | journal = {Acta Informatica}, 6 | year = 1973, 7 | volume = 2, 8 | pages = {2--39}} 9 | 10 | @PhdThesis{DeRemer69, 11 | author = {Frank DeRemer}, 12 | title = {Practical Translators for LR(k) Languages}, 13 | school = {MIT}, 14 | year = 1969} 15 | 16 | @book{Barry:2016vj, 17 | author = {Paul Barry}, 18 | publisher = {O'Reilly}, 19 | title = {Head First Python}, 20 | year = {2016}} 21 | 22 | @book{Matthes:2019vs, 23 | author = {Eric Matthes}, 24 | edition = {2nd edition}, 25 | publisher = {No Starch Press}, 26 | title = {Python Crash Course}, 27 | year = {2019}} 28 | 29 | @Manual{PSF21:cpython, 30 | title = {Python {GitHub} {Repository}}, 31 | organization = {Python Software Foundation}, 32 | url = {https://github.com/python}, 33 | year = 2021 34 | } 35 | 36 | @Manual{PSF21:python_ref, 37 | title = {The Python Language Reference}, 38 | organization = {Python Software Foundation}, 39 | year = 2021 40 | } 41 | 42 | @book{Lutz:2013vp, 43 | author = {Mark Lutz}, 44 | edition = {5th edition}, 45 | publisher = {O'Reilly}, 46 | title = {Learning Python}, 47 | year = {2013} 48 | } 49 | 50 | @book{Sweigart:2019vn, 51 | author = {Al Sweigart}, 52 | publisher = {No Starch Press}, 53 | title = {Automate the Boring Stuff with Python}, 54 | year = {2019}} 55 | 56 | @inproceedings{Dieckmann99, 57 | author = {Sylvia Dieckmann and Urs H{\"{o}}lzle}, 58 | title = {A Study of the Allocation Behavior of the SPECjvm98 59 | Java Benchmark}, 60 | booktitle = {Proceedings of the 13th European Conference on 61 | Object-Oriented Programming, ECOOP 1999, 62 | \normalfont{Lecture Notes in Computer Science 1628}}, 63 | pages = {92--115}, 64 | publisher = {Springer}, 65 | year = 1999 66 | } 67 | 68 | @article{Dunfield:2021, 69 | author = {Dunfield, Jana and Krishnaswami, Neel}, 70 | title = {Bidirectional Typing}, 71 | year = 2021, 72 | publisher = {Association for Computing Machinery}, 73 | volume = 54, 74 | number = 5, 75 | journal = {ACM Comput. Surv.}, 76 | articleno = 98, 77 | numpages = 38 78 | } 79 | 80 | @Misc{Lehtosalo2021:MyPy, 81 | author = {Jukka Lehtosalo}, 82 | title = {MyPy Optional Type Checker for Python}, 83 | url = {http://mypy-lang.org/}, 84 | year = 2021 85 | } 86 | 87 | @article{Pierce:2000, 88 | author = {Pierce, Benjamin C. and Turner, David N.}, 89 | title = {Local Type Inference}, 90 | year = 2000, 91 | publisher = {Association for Computing Machinery}, 92 | volume = 22, 93 | number = 1, 94 | journal = {ACM Trans. Program. Lang. Syst.}, 95 | pages = {1--44} 96 | } 97 | 98 | @misc{shinan20:_lark_docs, 99 | author = {Erez Shinan}, 100 | title = {Welcome to Lark's Documentation!}, 101 | url = {https://lark-parser.readthedocs.io/en/latest/index.html}, 102 | year = 2020} 103 | 104 | @book{Tomita:1985qr, 105 | author = {Masaru Tomita}, 106 | publisher = {Kluwer Academic}, 107 | title = {Efficient Parsing for Natural Language: A Fast 108 | Algorithm for Practical Systems}, 109 | year = {1985}} 110 | 111 | @article{Earley:1970ly, 112 | author = {Earley, Jay}, 113 | issue = {2}, 114 | journal = {Commun. ACM}, 115 | month = {February}, 116 | numpages = {9}, 117 | pages = {94--102}, 118 | publisher = {Association for Computing Machinery}, 119 | title = {An efficient context-free parsing algorithm}, 120 | volume = {13}, 121 | year = {1970}} 122 | 123 | @book{Hopcroft06:_automata, 124 | author = {John Hopcroft and Rajeev Motwani and Jeffrey Ullman}, 125 | title = {Introduction to Automata Theory, Languages, and Computation}, 126 | publisher = {Pearson}, 127 | year = 2006} 128 | 129 | @techreport{Lesk:1975uq, 130 | author = {M. E. Lesk and E. Schmidt}, 131 | institution = {Bell Laboratories}, 132 | month = {July}, 133 | title = {Lex - A Lexical Analyzer Generator}, 134 | year = {1975}} 135 | 136 | @incollection{Johnson:1979qy, 137 | author = {Stephen C. Johnson}, 138 | booktitle = {{UNIX} Programmer's Manual}, 139 | date-added = {2007-08-27 13:19:51 -0600}, 140 | date-modified = {2007-08-27 13:23:00 -0600}, 141 | organization = {AT\&T}, 142 | pages = {353--387}, 143 | publisher = {Holt, Rinehart, {and} Winston}, 144 | title = {{YACC}: Yet Another Compiler-Compiler}, 145 | volume = {2}, 146 | year = {1979}} 147 | 148 | -------------------------------------------------------------------------------- /dataflow-notes.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Liveness Analysis as a Dataflow Analysis 4 | ---------------------------------------- 5 | 6 | References: 7 | * Principles of Program Analysis by Nielson, Nielson, and Hankin 8 | * Ch. 9 of Compilers: Principles, Techniques, & Tools 9 | by Aho, Lam, Sethi, Ullman 10 | * Ch. 17 of Modern Compiler Implementation in ML by Appel 11 | 12 | Running example: 13 | S* = 14 | [y := 1]^1 15 | while [x>0]^2 16 | [w := y]^3 17 | [x := x - 1]^4 18 | [z := w]^5 19 | 20 | We're going to work on the control flow graph of the program, 21 | where each superscript corresponds to a node in the graph 22 | and the edges represent control flow possibilities. 23 | 24 | Recall that a variable is *live* if it might get used later. 25 | Used for register allocation and dead code elimination. 26 | 27 | A backward analysis. 28 | 29 | gen([x:=e]) = FV(e) 30 | gen([skip]) = {} 31 | gen([e]) = FV(e) 32 | 33 | kill([x:=e]) = {x} 34 | kill([skip]) = {} 35 | kill([e]) = {} 36 | 37 | Let P[l] be the statement number l in program P. 38 | 39 | LV_before(l) = (LV_after(l) - kill(P[l])) U gen(P[l]) (1) 40 | LV_after(l) = Union{ LV_before(l') | l --> l' in CFG(P) } (2) 41 | 42 | We'd like to find a solution to these equations. 43 | It's useful to combine all these equations into a single 44 | equation by putting all the LV's into two vectors: 45 | 46 | LV_before = [LV_before(1), LV_before(2), ... ] 47 | LV_after = [LV_after(1), LV_after(2), ... ] 48 | 49 | And then encode the equations (1) and (2) for all the statements 50 | into two vector-valued functions F_before and F_after. 51 | 52 | F_before(l)(LV_after) = (LV_after[l] - kill(P[l])) U gen(P[l]) 53 | F_after(l)(LV_before) = Union{ LV_before[l'] | l --> l' in CFG(P) } 54 | 55 | We could even squish these two vectors (before/after) and two 56 | functions into a single vector LV and function F. Then a solution 57 | looks like: 58 | 59 | LV = F(LV) 60 | 61 | That is, we'd like to find a fixed point of F. 62 | 63 | There's a branch of mathematics that studies fixed points 64 | in the context of lattices. 65 | 66 | The sets of variables ordered by subseteq form a lattice, 67 | with {} as the bottom element and the set of all variables V 68 | as the top element. 69 | 70 | Vectors of sets ordered pointwise forms a lattice, with 71 | [{},{},{},...] as the bottom element and 72 | [V,V,V,...] as the top element. 73 | 74 | One of the classic fixpoint theorems is: 75 | 76 | Suppose F is an order-preserving function. If the set L 77 | has no infinitely ascending chains and a least element bot, 78 | then there is a fixed point of F. 79 | 80 | Proof. 81 | bot <= F(bot) because bot is the least element of L 82 | F(bot) <= F(F(bot)) because F is order preserving. 83 | and so on, so in general we have 84 | F^i(bot) <= F^i+1(bot) 85 | but this can't go on forever, so at some point 86 | F^n(bot) = F^n+1(bot) 87 | and therefore, F^n(bot) is a fixed point of F. 88 | 89 | But is our F for liveness order-preserving? (skip this) 90 | Suppose V <= V'. 91 | Let l be any statement number. 92 | If l is even: (LV_before) 93 | We have V[l] <= V'[l]. 94 | then V[l] - kill(P[l]) <= V[l]' - kill(P[l]) 95 | and (V[l] - kill(P[l])) U gen(P[l]) <= (V[l]' - kill(P[l])) U gen(P[l]). 96 | Therefore F_l(V) <= F_l(V'). 97 | If l is odd: (LV_after) 98 | We have V[i] <= V'[i] for any i. 99 | Thus, 100 | Union{ V[l'] | l --> l' in CFG(P) } 101 | <= Union{ V'[l'] | l --> l' in CFG(P) } 102 | Therefore F_l(V) <= F_l(V') 103 | So F(V) <= F(V). 104 | 105 | Do we have a least element? Yes: 106 | [{}, {}, ...] 107 | Are there infinite ascending chains? No, because there are 108 | a finite number of variables in the program. 109 | 110 | Worklist algorithm (applied to Liveness) 111 | 112 | W is a list of control-flow edges 113 | 114 | 1. Initialization 115 | W = [] 116 | for (l,l') in CFG 117 | W = [(l,l')] + W 118 | for l in CFG do 119 | Analysis[l] = {} 120 | 121 | 2. Iteration 122 | while W != []: 123 | (l,l') = W[0] 124 | W = W[1:] 125 | if F_l(Analysis[l]) not <= Analysis[l']: 126 | Analysis[l'] := Analysis[l'] |_| F_l(Analysis[l]) 127 | for l'' in in_edges(CFG, l'): 128 | W = [(l'',l')] + W 129 | 3. Recording the result 130 | LV_after(l) := Analysis[l] 131 | LV_before(l) := F_l(Analysis[l]) 132 | 133 | Example 134 | 135 | S* = 136 | [y := 1]^1 137 | while [x>0]^2 138 | [w := y]^3 139 | [x := x - 1]^4 140 | [z := w]^5 141 | 142 | flow^R(S*) = (2,1),(3,2),(4,3),(2,4),(5,2) 143 | 144 | F_before_1(X) = X - {y} 145 | F_before_2(X) = X U {x} 146 | F_before_3(X) = (X - {w}) U {y} 147 | F_before_4(X) = X U {x} 148 | F_before_5(X) = (X - {z}) U {w} 149 | 150 | Analysis W 151 | step 1 2 3 4 5 152 | 1 {} {} {} {} {} (2,1),(3,2),(4,3),(2,4),(5,2) 153 | 2 {x} {} {} {} {} (3,2),(4,3),(2,4),(5,2) 154 | 3 {x} {y} {} {} {} (2,1),(2,4),(4,3),(2,4),(5,2) 155 | 4 {x,y} {y} {} {} {} (2,4),(4,3),(2,4),(5,2) 156 | 5 {x,y} {y} {} {x,y} {} (4,3),(4,3),(2,4),(5,2) 157 | 6 {x,y} {y} {x,y} {x,y} {} (3,2),(4,3),(2,4),(5,2) 158 | 7 {x,y} {x,y} {x,y} {x,y} {} (2,1),(2,4),(4,3),(2,4),(5,2) 159 | 8 {x,y} {x,y} {x,y} {x,y} {} (2,4),(4,3),(2,4),(5,2) 160 | 9 {x,y} {x,y} {x,y} {x,y} {} (4,3),(2,4),(5,2) 161 | 10 {x,y} {x,y} {x,y} {x,y} {} (2,4),(5,2) 162 | 11 {x,y} {x,y} {x,y} {x,y} {} (5,2) 163 | 12 {x,y} {x,y,w} {x,y} {x,y} {} (2,1),(2,4) 164 | 13 {x,y,w} {x,y,w} {x,y} {x,y} {} (2,4) 165 | 14 {x,y,w} {x,y,w} {x,y} {x,y,w} {} (4,3) 166 | 15 {x,y,w} {x,y,w} {x,y,w} {x,y,w} {} (3,2) 167 | 16 {x,y,w} {x,y,w} {x,y,w} {x,y,w} {} 168 | 169 | Constant Propagation and Folding 170 | 171 | z = 3 172 | x = 1 173 | while x > 0: 174 | if x == 1: 175 | y = 7 176 | else: 177 | y = z + 4 178 | x = 3 179 | print y 180 | 181 | ===> 182 | 183 | z = 3 184 | x = 1 185 | while x > 0: 186 | if x == 1: 187 | y = 7 188 | else: 189 | y = 3 + 4 *** 190 | x = 3 191 | print y 192 | 193 | ===> 194 | 195 | z = 3 196 | x = 1 197 | while x > 0: 198 | if x == 1: 199 | y = 7 200 | else: 201 | y = 7 *** 202 | x = 3 203 | print y 204 | 205 | ===> 206 | 207 | z = 3 208 | x = 1 209 | while x > 0: 210 | if x == 1: 211 | y = 7 212 | else: 213 | y = 7 214 | x = 3 215 | print 7 *** 216 | 217 | Lattice for one program variable: 218 | 219 | NAC (not a constant) 220 | 221 | 1 2 3 4 ... (definitely a constant) 222 | 223 | UNDEF (don't know anything about the variable) 224 | 225 | The after/before's are mappings from variables to values 226 | in the above lattice. 227 | 228 | THE FOLLOWING NEEDS TO BE REVISED -Jeremy 229 | 230 | Constant propagation is a forward analysis 231 | 232 | kill([x:=e]^l) = {(x,c) | for any c} 233 | kill([skip]^l) = {} 234 | kill([e]^l) = {} 235 | 236 | gen([x:=e}^l) = { (x,eval(e,l)) } 237 | gen([skip]^l) = {} 238 | gen([e]^l) = {} 239 | 240 | eval(n,l) = n 241 | eval(x,l) = c if (x, c) in CP_before(l) 242 | eval(e1 + e2,l) = 243 | eval(e1,l) 244 | eval(e2,l) bot 1 2 ... uninit top 245 | bot bot bot bot bot bot 246 | 1 bot 2 3 bot top 247 | 2 bot 3 4 bot top 248 | ... 249 | uninit bot bot bot bot bot 250 | top bot top top top 251 | 252 | CP_before(l) = 253 | if l = init(S*) then 254 | {(x,uninit),(y,uninit),...} 255 | else 256 | |_| { CP_after(l') | (l',l) in flow(S*) } 257 | 258 | CP_after(l) = (CP_before(l) - kill(P[l])) |_| gen(P[l]) 259 | -------------------------------------------------------------------------------- /SyllabusExampleRacket.md: -------------------------------------------------------------------------------- 1 | ## Syllabus Example for a Compiler Course based on Essentials of Compilation (Racket) 2 | 3 | High-level programming languages like Racket make it easier to program 4 | compared to low-level languages such as x86 assembly code. But how do 5 | high-level languages work? There's a big gap between them and machine 6 | instructions for modern computers. In this class you learn how to 7 | translate Racket programs all the way to x86 assembly language. 8 | 9 | Traditionally, compiler courses teach one phase of the compiler at a 10 | time, such as parsing, semantic analysis, and register allocation. The 11 | problem with that approach is it is difficult to understand how the 12 | whole compiler fits together and why each phase is designed the way it 13 | is. Instead, each week we implement a progressively larger subset of 14 | the input language. The very first subset is a tiny language of 15 | integer arithmetic, and by the time we are done the language includes 16 | first-class functions. 17 | 18 | **Prerequisites:** Fluency in Racket is highly recommended as students 19 | will do a lot of programming in one of those languages. Prior 20 | knowledge of an assembly language helps, but is not required. 21 | 22 | **Textbook: Essentials of Compilation: An Incremental Approach in Racket** 23 | 24 | The textbook is available from MIT Press 25 | [here](https://mitpress.mit.edu/9780262047760/essentials-of-compilation/) 26 | and the PDF of the book is available 27 | [here](https://www.dropbox.com/s/ktdw8j0adcc44r0/book.pdf?dl=1). 28 | 29 | If you have suggestions for improvement, please either send an email 30 | to Jeremy or, even better, make edits to a branch of the book and 31 | perform a pull request. The book is at the following location on 32 | github: 33 | 34 | https://github.com/IUCompilerCourse/Essentials-of-Compilation 35 | 36 | **Lecture:** Times and location. 37 | 38 | **Office hours** 39 | 40 | * Instructor 1: Times and location. 41 | * Instructor 2: Times and location. 42 | 43 | **Topics:** 44 | 45 | * Instruction Selection 46 | 47 | * Register Allocation 48 | 49 | * Static type checking 50 | 51 | * Conditional control flow 52 | 53 | * Mutable data 54 | 55 | * Garbage collection 56 | 57 | * Procedures and calling conventions 58 | 59 | * First-class functions and closure conversion 60 | 61 | * Dynamic typing 62 | 63 | * Generics 64 | 65 | * High-level optimization (inlining, constant folding, copy 66 | propagation, etc.) 67 | 68 | **Grading:** 69 | 70 | Course grades are based on the following items. 71 | 72 | * Assignments (including final project) (40%) 73 | * Midterm Exam (25%) 74 | * Final Exam (35%) 75 | 76 | **Assignments:** 77 | 78 | Organize into teams of 2-4 students. Assignments will be due bi-weekly 79 | on Mondays at 11:59pm. Teams that include one or more graduate 80 | students are required to complete one challenge exercise per 81 | assignment. 82 | 83 | Assignments will be graded based on how many test cases they succeed 84 | on. Partial credit will be given for each "pass" of the compiler. 85 | Some of the tests are in the public support code (see Resources 86 | below). The testing will be done on a linux (ubuntu) machine. The 87 | testing will include both new tests and all of the tests from prior 88 | assignments. 89 | 90 | You may request feedback on your assignments prior to the due date. 91 | Just submit your work and send us email. 92 | 93 | Students are responsible for understanding the entire assignment and 94 | all of the code that their team produces. The midterm and final exam 95 | are designed to test a student's understanding of the assignments. 96 | 97 | Students are free to discuss and get help on the assignments from 98 | anyone or anywhere. When posting questions on Slack, it is OK to post 99 | your code. 100 | 101 | In contrast, for exams, students are asked to work alone. The exams 102 | are closed book. 103 | 104 | The Final Project is at the end of the semester. 105 | 106 | **Late assignment policy:** Assignments may be turned in up to one 107 | week late with a penalty of 10%. 108 | 109 | **Slack Chat/Messaging:** 110 | 111 | TBD 112 | 113 | **Schedule** 114 | 115 | Day | Lecture Topic | Assignment Due 116 | --------|------------------------------------------------------|-------------------------- 117 | Aug. 22 | Introduction | 118 | Aug. 25 | Compiling from LVar to x86 | 119 | Aug. 30 | Uniquify, Remove Complex Operands, Explicate Control | 120 | Sep. 1 | Select Instructions through Prelude & Conclusion | 121 | Sep. 5 | | Integers and Variables 122 | Sep. 6 | Register Allocation: liveness, interference | 123 | Sep. 8 | Code Review: Integers and Variables | 124 | Sep. 13 | Register Allocation: graph coloring | 125 | Sep. 15 | L_If language, type checking, and x86_If | 126 | Sep. 19 | | Register Allocation 127 | Sep. 20 | Conditionals and Explicate Control | 128 | Sep. 22 | Code Review: Register Allocation | 129 | Sep. 27 | Conditionals: Select Instr., Reg. Alloc., Opt. Jumps | 130 | Sep. 29 | Loops and Dataflow Analysis | 131 | Oct. 3 | | Booleans and Conditionals 132 | Oct. 4 | Loops: RCO, Explicate, Challenge | 133 | Oct. 6 | Tuples and Garbage Collection | 134 | Oct. 11 | Tuples and GC, cont'd | 135 | Oct. 13 | Arrays, Structs, Generational GC | 136 | Oct. 17 | | Loops 137 | Oct. 18 | Review for Midterm | 138 | Oct. 20 | **Midterm Exam** | 139 | Oct. 25 | Compiling Functions to x86 | 140 | Oct. 27 | Compiling Functions, cont'd | 141 | Oct. 31 | | Tuples and GC 142 | Nov. 1 | Lexically Scoped Functions | 143 | Nov. 3 | Lexically Scoped Functions, cont'd | 144 | Nov. 8 | Optimize Closures | 145 | Nov. 10 | Dynamic Typing | 146 | Nov. 14 | | Functions 147 | Nov. 15 | Code Review | 148 | Nov. 17 | Gradual Typing | 149 | Nov. 18 | | Proposal for Final Project 150 | Dec. 1 | Generics | 151 | Dec. 6 | No Class | 152 | Dec. 8 | Review for Final Exam | 153 | Dec. 9 | | Final Project 154 | Dec. 13 | **Final Exam** | 155 | 156 | **Resources:** 157 | 158 | * Lecture videos recorded from the [IU 2020 Compiler course](https://iucompilercourse.github.io/IU-P423-P523-E313-E513-Fall-2020/). 159 | * Github repository for the support code and test suites 160 | - for [Racket](https://github.com/IUCompilerCourse/public-student-support-code) 161 | * [Racket Download](https://download.racket-lang.org/) 162 | * [Racket Documentation](https://docs.racket-lang.org/) 163 | * [Notes on x86-64 programming](http://web.cecs.pdx.edu/~apt/cs491/x86-64.pdf) 164 | * [x86-64 Machine-Level Programming](https://www.cs.cmu.edu/~fp/courses/15411-f13/misc/asm64-handout.pdf) 165 | * [Intel x86 Manual](http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf?_ga=1.200286509.2020252148.1452195021) 166 | * [System V Application Binary Interface](https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf) 167 | * [Uniprocessor Garbage Collection Techniques](https://iu.instructure.com/courses/1735985/files/82131907/download?wrap=1) by Wilson. 168 | * [Fast and Effective Procedure Inlining](https://www.cs.indiana.edu/~dyb/pubs/inlining.pdf) by Waddell and Dybvig. 169 | 170 | 171 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | which registers to use for coloring? 2 | which not? 3 | 4 | register allocation 5 | update print x86 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- 10 | R1: Integers and Variables 11 | 12 | exp ::= x | n | (op exp*) | (let ([x exp]) exp) 13 | R1 ::= (program exp) 14 | 15 | uniquify 16 | | 17 | V 18 | 19 | exp ::= x | n | (op exp*) | (let ([x exp]) exp) 20 | R1' ::= (program () exp) 21 | 22 | remove-complex-opera* 23 | | 24 | V 25 | 26 | arg ::= x | n 27 | exp ::= arg | (op arg*) | (let ([x exp]) exp) 28 | R1' ::= (program () exp) 29 | 30 | create-CFG (the graph is empty for this assignment) 31 | | 32 | V 33 | 34 | arg ::= x | n 35 | exp ::= arg | (op arg*) 36 | stmt ::= (assign x exp) 37 | tail ::= (return exp) | (seq stmt tail) 38 | C0 ::= (program () ((label . tail)*)) 39 | 40 | uncover-locals 41 | | 42 | V 43 | 44 | arg ::= x | n 45 | exp ::= arg | (op arg*) 46 | stmt ::= (assign x exp) 47 | tail ::= (return exp) | (seq stmt tail) 48 | C0 ::= (program ((locals . x*)) ((label . tail)*)) 49 | 50 | select-instructions 51 | | 52 | V 53 | 54 | imm ::= (var x) | (reg r) | (deref r n) | (int n) 55 | instr ::= (addq imm imm) | (retq) | ... 56 | block ::= (block () instr*) 57 | x86 ::= (program ((locals . x*)) ((label . block)*)) 58 | 59 | assign-homes 60 | | 61 | V 62 | 63 | imm ::= (reg r) | (deref r n) | (int n) 64 | instr ::= (addq imm imm) | ... 65 | block ::= (block () instr*) 66 | x86 ::= (program ((stack-space . n)) ((label . block)*)) 67 | 68 | patch-instructions 69 | | 70 | V 71 | 72 | same grammar as above 73 | 74 | print-x86 75 | | 76 | V 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- 81 | 82 | R2: Booleans and Conditionals 83 | 84 | exp ::= x | n | #t | #f | (op exp*) | (let ([x exp]) exp) | (if exp exp exp) 85 | R2 ::= (program exp) 86 | 87 | type-check 88 | | 89 | V 90 | 91 | exp ::= x | n | #t | #f | (op exp*) | (let ([x exp]) exp) | (if exp exp exp) 92 | R2 ::= (program ((type . type)) exp) 93 | 94 | remove-complex-opera* 95 | | 96 | V 97 | 98 | arg ::= x | n | #t | #f 99 | exp ::= arg | (op arg*) | (let ([x exp]) exp) | (if exp exp exp) 100 | R2 ::= (program ((type . type)) exp) 101 | 102 | create-CFG 103 | | 104 | V 105 | 106 | arg ::= x | n | #t | #f 107 | exp ::= arg | (op arg*) 108 | tail ::= (return exp) | (seq stmt tail) 109 | | (goto label) | (if (op arg*) (goto label) (goto label)) 110 | stmt ::= (assign x exp) 111 | C1 ::= (program ((type . type)) ((label . tail)*)) 112 | 113 | optimize-jumps 114 | | 115 | V 116 | 117 | same grammar as above 118 | 119 | uncover-locals 120 | | 121 | V 122 | 123 | arg ::= x | n | #t | #f 124 | exp ::= arg | (op arg*) 125 | tail ::= (return exp) | (seq stmt tail) 126 | | (goto label) | (if (op exp*) (goto label) (goto label)) 127 | stmt ::= (assign x exp) 128 | C1 ::= (program ((type . type) (locals . x*)) 129 | ((label . tail)*)) 130 | 131 | select-instructions 132 | | 133 | V 134 | 135 | imm ::= (var x) | (deref r n) | (int n) 136 | instr ::= (addq imm imm) | ... | (jmp label) | (jmp-if cc label) | (retq) 137 | block ::= (block () instr*) 138 | x86 ::= (program ((locals . x*) (type . type)) ((label . block)*)) 139 | 140 | uncover-live 141 | | 142 | V 143 | 144 | imm ::= (var x) | (deref r n) | (int n) 145 | instr ::= (addq imm imm) | (jmp label) | (jmp-if cc label) | (retq) 146 | block ::= (block (lives ls*) instr*) 147 | x86 ::= (program ((locals . x*) (type . type)) ((label . block)*)) 148 | 149 | build-interference 150 | | 151 | V 152 | 153 | block ::= (block () instr*) 154 | x86 ::= (program ((locals . x*) (type . type) (conflicts . graph)) 155 | ((label . block)*)) 156 | 157 | allocate-registers 158 | | 159 | V 160 | 161 | imm ::= (reg r) | (deref r n) | (int n) 162 | instr ::= (addq imm imm) | ... | (jmp label) | (jmp-if cc label) | (retq) 163 | block ::= (block () instr*) 164 | x86 ::= (program ((locals . x*) (type . type)) 165 | ((label . block)*)) 166 | 167 | print-x86 168 | | 169 | V 170 | 171 | -------------------------------------------------------------------------------- 172 | 173 | R3: Vectors 174 | 175 | exp ::= x | n | #t | #f | (op exp*) | (let ([x exp]) exp) | (if exp exp exp) 176 | | (vector exp*) | (vector-ref exp n) | (vector-set! exp n exp) 177 | | (void) 178 | R3 ::= (program exp) 179 | 180 | type-check 181 | | 182 | V 183 | 184 | type ::= ... | Void | (Vector type*) 185 | exp ::= x | n | #t | #f | (op exp*) | (let ([x exp]) exp) | (if exp exp exp) 186 | | (vector exp*) | (vector-ref exp n) | (vector-set! exp n exp) 187 | | (void) 188 | | (has-type exp type) 189 | R3 ::= (program ((type . type)) exp) 190 | 191 | expose-allocation 192 | | 193 | V 194 | 195 | type ::= ... | Void | (Vector type*) 196 | exp ::= x | n | #t | #f | (op exp*) | (let ([x exp]) exp) | (if exp exp exp) 197 | | (vector exp*) | (vector-ref exp n) | (vector-set! exp n exp) 198 | | (void) | (has-type exp type) 199 | | (collect n) | (allocate n type) | (global-value x) 200 | R3 ::= (program ((type . type)) exp) 201 | 202 | remove-complex-opera* 203 | | 204 | V 205 | 206 | arg ::= x | n | #t | #f | (void) 207 | exp ::= arg | (op arg*) | (let ([x exp]) exp) | (if exp exp exp) 208 | | (vector exp*) | (vector-ref exp n) | (vector-set! exp n exp) 209 | | (void) | (has-type exp type) 210 | | (collect n) | (allocate n type) | (global-value x) 211 | R3 ::= (program ((type . type)) exp) 212 | 213 | create-CFG 214 | | 215 | V 216 | 217 | arg ::= x | n | #t | #f | (void) 218 | exp ::= arg | (op arg*) | (allocate n type) | (global-value x) 219 | | (has-type exp type) 220 | tail ::= (goto label) | (if (op arg*) (goto label) (goto label)) 221 | | (return exp) | (seq stmt tail) 222 | stmt ::= (assign x exp) | (collect n) 223 | C2 ::= (program ((type . type)) ((label . tail)*)) 224 | 225 | uncover-locals 226 | | 227 | V 228 | 229 | ... 230 | C2 ::= (program ((locals . ((x . type)*)) (type . type) 231 | (flow-graph . ((label . tail)*))) tail) 232 | 233 | select-instructions 234 | | 235 | V 236 | 237 | imm ::= (var x) | (deref r n) | (int n) | (global-value x) 238 | instr ::= (addq imm imm) | ... | (jmp label) | (jmp-if cc label) | (retq) 239 | block ::= (block () instr*) 240 | x86 ::= (program ((locals . ((x . type)*)) (type . type)) 241 | ((label . block)*)) 242 | 243 | uncover-live 244 | | 245 | V 246 | 247 | imm ::= (var x) | (deref r n) | (int n) | (global-value x) 248 | instr ::= (addq imm imm) | ... | (jmp label) | (jmp-if cc label) | (retq) 249 | block ::= (block (lives x**) instr*) 250 | x86 ::= (program ((locals . ((x . type)*)) (type . type)) 251 | ((label . block)*)) 252 | 253 | build-interference 254 | | 255 | V 256 | 257 | ... 258 | x86 ::= (program ((locals . ((x . type)*)) (type . type) 259 | (conflicts . graph)) 260 | ((label . block)*)) 261 | 262 | build-move-graph 263 | | 264 | V 265 | 266 | ... 267 | x86-CFG ::= (program ((locals . ((x . type)*)) (type . type) 268 | (conflicts . graph) (move-graph . graph)) 269 | ((label . block)*)) 270 | 271 | allocate-registers 272 | | 273 | V 274 | 275 | imm ::= (reg x) | (deref r n) | (int n) | (global-value x) 276 | instr ::= (addq imm imm) | ... | (jmp label) | (jmp-if cc label) | (retq) 277 | x86 ::= (program ((locals . ((x . type)*)) (type . type)) 278 | ((label . block)*)) 279 | 280 | patch-instructions 281 | | 282 | V 283 | 284 | same as above 285 | 286 | print-x96 287 | | 288 | V 289 | 290 | -------------------------------------------------------------------------------- 291 | 292 | R4: Functions 293 | 294 | type ::= ... | (type* -> type) 295 | exp ::= x | n | #t | #f | (op exp*) | (let ([x exp]) exp) | (if exp exp exp) 296 | | (vector exp*) | (vector-ref exp n) | (vector-set! exp n exp) 297 | | (void) 298 | | (exp exp*) 299 | def ::= (define (var [var : type]*) : type exp) 300 | R4 ::= (program def* exp) 301 | 302 | type-check 303 | | 304 | V 305 | 306 | R4 ::= (program () def+) 307 | 308 | uniquify 309 | | 310 | V 311 | 312 | same as above 313 | 314 | limit-functions 315 | | 316 | V 317 | 318 | same as above, but with a limit on the number of parameters to a function 319 | 320 | reveal-functions 321 | | 322 | V 323 | 324 | exp ::= (function-ref label) | (app exp exp*) | ... 325 | tail ::= x | n | #t | #f | (op exp*) | (let ([x exp]) tail) 326 | | (if exp tail tail) 327 | | (vector exp*) | (vector-ref exp n) | (vector-set! exp n exp) 328 | | (void) 329 | | (function-ref label) | (tailcall exp exp*) 330 | def ::= (define (var [var : type]*) : type tail) 331 | F1 ::= (program () def+) 332 | 333 | expose-allocations 334 | | 335 | V 336 | 337 | same as above 338 | 339 | remove-complex-opera* 340 | | 341 | V 342 | 343 | arg ::= x | n | #t | #f | (void) 344 | exp ::= ... | (op arg*) | (app arg arg*) | ... 345 | tail ::= ... | (op arg*) | (tailcall arg arg*) | ... 346 | def ::= (define (var [var : type]*) : type tail) 347 | F1 ::= (program () def+) 348 | 349 | create-CFG 350 | | 351 | V 352 | 353 | arg ::= x | n | #t | #f | (void) 354 | exp ::= arg | (op arg*) | (allocate n type) | (global-value x) 355 | | (has-type exp type) | (app arg arg*) 356 | tail ::= (goto label) | (if (op arg*) (goto label) (goto label)) 357 | | (return exp) | (seq stmt tail) | (tailcall arg arg*) 358 | stmt ::= (assign x exp) | (collect n) 359 | def ::= (define (var [var : type]*) : type ((label . tail)*)) 360 | C3 ::= (program ((type . type)) def+) 361 | 362 | 363 | | 364 | V 365 | -------------------------------------------------------------------------------- /figs/simple-parse-tree.graffle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActiveLayerIndex 6 | 0 7 | ApplicationVersion 8 | 9 | com.omnigroup.OmniGraffle6 10 | 169.23.0.276662 11 | 12 | AutoAdjust 13 | 14 | BackgroundGraphic 15 | 16 | Bounds 17 | {{0, 0}, {588.018798828125, 768.018798828125}} 18 | Class 19 | SolidGraphic 20 | ID 21 | 2 22 | Style 23 | 24 | stroke 25 | 26 | Draws 27 | NO 28 | 29 | 30 | 31 | BaseZoom 32 | 0 33 | CanvasOrigin 34 | {0, 0} 35 | ColumnAlign 36 | 1 37 | ColumnSpacing 38 | 36 39 | CreationDate 40 | 2008-08-19 22:24:58 +0000 41 | Creator 42 | Jeremy Siek 43 | DisplayScale 44 | 1 in = 1 in 45 | GraphDocumentVersion 46 | 12 47 | GraphicsList 48 | 49 | 50 | Class 51 | LineGraphic 52 | Head 53 | 54 | ID 55 | 4 56 | 57 | ID 58 | 19 59 | Points 60 | 61 | {322.62499054903725, 229} 62 | {322.62499054903725, 200} 63 | 64 | Style 65 | 66 | shadow 67 | 68 | Draws 69 | NO 70 | 71 | stroke 72 | 73 | HeadArrow 74 | 0 75 | Legacy 76 | 77 | TailArrow 78 | 0 79 | 80 | 81 | Tail 82 | 83 | ID 84 | 18 85 | 86 | 87 | 88 | Bounds 89 | {{309.625, 229}, {26, 14}} 90 | Class 91 | ShapedGraphic 92 | FitText 93 | YES 94 | Flow 95 | Resize 96 | ID 97 | 18 98 | Style 99 | 100 | fill 101 | 102 | Draws 103 | NO 104 | 105 | shadow 106 | 107 | Draws 108 | NO 109 | 110 | stroke 111 | 112 | Draws 113 | NO 114 | 115 | 116 | Text 117 | 118 | Text 119 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 120 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 121 | {\colortbl;\red255\green255\blue255;} 122 | {\*\expandedcolortbl;;} 123 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 124 | 125 | \f0\fs24 \cf0 "3"} 126 | VerticalPad 127 | 0.0 128 | 129 | Wrap 130 | NO 131 | 132 | 133 | Class 134 | LineGraphic 135 | Head 136 | 137 | ID 138 | 15 139 | 140 | ID 141 | 17 142 | Points 143 | 144 | {166.06198367368057, 229} 145 | {166.06198367368057, 200} 146 | 147 | Style 148 | 149 | shadow 150 | 151 | Draws 152 | NO 153 | 154 | stroke 155 | 156 | HeadArrow 157 | 0 158 | Legacy 159 | 160 | TailArrow 161 | 0 162 | 163 | 164 | Tail 165 | 166 | ID 167 | 16 168 | 169 | 170 | 171 | Bounds 172 | {{153.06200000000001, 229}, {26, 14}} 173 | Class 174 | ShapedGraphic 175 | FitText 176 | YES 177 | Flow 178 | Resize 179 | ID 180 | 16 181 | Style 182 | 183 | fill 184 | 185 | Draws 186 | NO 187 | 188 | shadow 189 | 190 | Draws 191 | NO 192 | 193 | stroke 194 | 195 | Draws 196 | NO 197 | 198 | 199 | Text 200 | 201 | Text 202 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 203 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 204 | {\colortbl;\red255\green255\blue255;} 205 | {\*\expandedcolortbl;;} 206 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 207 | 208 | \f0\fs24 \cf0 "1"} 209 | VerticalPad 210 | 0.0 211 | 212 | Wrap 213 | NO 214 | 215 | 216 | Class 217 | LineGraphic 218 | Head 219 | 220 | ID 221 | 7 222 | 223 | ID 224 | 14 225 | Points 226 | 227 | {309.66279069767444, 143} 228 | {255.96220930232559, 114} 229 | 230 | Style 231 | 232 | shadow 233 | 234 | Draws 235 | NO 236 | 237 | stroke 238 | 239 | HeadArrow 240 | 0 241 | Legacy 242 | 243 | TailArrow 244 | 0 245 | 246 | 247 | Tail 248 | 249 | ID 250 | 6 251 | 252 | 253 | 254 | Class 255 | LineGraphic 256 | Head 257 | 258 | ID 259 | 6 260 | 261 | ID 262 | 13 263 | Points 264 | 265 | {322.625, 186} 266 | {322.625, 157} 267 | 268 | Style 269 | 270 | shadow 271 | 272 | Draws 273 | NO 274 | 275 | stroke 276 | 277 | HeadArrow 278 | 0 279 | Legacy 280 | 281 | TailArrow 282 | 0 283 | 284 | 285 | Tail 286 | 287 | ID 288 | 4 289 | 290 | 291 | 292 | Class 293 | LineGraphic 294 | Head 295 | 296 | ID 297 | 7 298 | 299 | ID 300 | 12 301 | Points 302 | 303 | {243.94573643410854, 229} 304 | {243.05426356589146, 114} 305 | 306 | Style 307 | 308 | shadow 309 | 310 | Draws 311 | NO 312 | 313 | stroke 314 | 315 | HeadArrow 316 | 0 317 | Legacy 318 | 319 | TailArrow 320 | 0 321 | 322 | 323 | Tail 324 | 325 | ID 326 | 3 327 | 328 | 329 | 330 | Class 331 | LineGraphic 332 | Head 333 | 334 | ID 335 | 7 336 | 337 | ID 338 | 11 339 | Points 340 | 341 | {178.58679069767442, 143} 342 | {230.4752093023256, 114} 343 | 344 | Style 345 | 346 | shadow 347 | 348 | Draws 349 | NO 350 | 351 | stroke 352 | 353 | HeadArrow 354 | 0 355 | Legacy 356 | 357 | TailArrow 358 | 0 359 | 360 | 361 | Tail 362 | 363 | ID 364 | 5 365 | 366 | 367 | 368 | Class 369 | LineGraphic 370 | Head 371 | 372 | ID 373 | 5 374 | 375 | ID 376 | 10 377 | Points 378 | 379 | {166.06200000000001, 186} 380 | {166.06200000000001, 157} 381 | 382 | Style 383 | 384 | shadow 385 | 386 | Draws 387 | NO 388 | 389 | stroke 390 | 391 | HeadArrow 392 | 0 393 | Legacy 394 | 395 | TailArrow 396 | 0 397 | 398 | 399 | Tail 400 | 401 | ID 402 | 15 403 | 404 | 405 | 406 | Bounds 407 | {{228, 100}, {30, 14}} 408 | Class 409 | ShapedGraphic 410 | FitText 411 | YES 412 | Flow 413 | Resize 414 | ID 415 | 7 416 | Style 417 | 418 | fill 419 | 420 | Draws 421 | NO 422 | 423 | shadow 424 | 425 | Draws 426 | NO 427 | 428 | stroke 429 | 430 | Draws 431 | NO 432 | 433 | 434 | Text 435 | 436 | Text 437 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 438 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 439 | {\colortbl;\red255\green255\blue255;} 440 | {\*\expandedcolortbl;;} 441 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 442 | 443 | \f0\fs24 \cf0 exp} 444 | VerticalPad 445 | 0.0 446 | 447 | Wrap 448 | NO 449 | 450 | 451 | Bounds 452 | {{307.625, 143}, {30, 14}} 453 | Class 454 | ShapedGraphic 455 | FitText 456 | YES 457 | Flow 458 | Resize 459 | ID 460 | 6 461 | Style 462 | 463 | fill 464 | 465 | Draws 466 | NO 467 | 468 | shadow 469 | 470 | Draws 471 | NO 472 | 473 | stroke 474 | 475 | Draws 476 | NO 477 | 478 | 479 | Text 480 | 481 | Text 482 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 483 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 484 | {\colortbl;\red255\green255\blue255;} 485 | {\*\expandedcolortbl;;} 486 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 487 | 488 | \f0\fs24 \cf0 exp} 489 | VerticalPad 490 | 0.0 491 | 492 | Wrap 493 | NO 494 | 495 | 496 | Bounds 497 | {{151.06200000000001, 143}, {30, 14}} 498 | Class 499 | ShapedGraphic 500 | FitText 501 | YES 502 | Flow 503 | Resize 504 | ID 505 | 5 506 | Style 507 | 508 | fill 509 | 510 | Draws 511 | NO 512 | 513 | shadow 514 | 515 | Draws 516 | NO 517 | 518 | stroke 519 | 520 | Draws 521 | NO 522 | 523 | 524 | Text 525 | 526 | Text 527 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 528 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 529 | {\colortbl;\red255\green255\blue255;} 530 | {\*\expandedcolortbl;;} 531 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 532 | 533 | \f0\fs24 \cf0 exp} 534 | VerticalPad 535 | 0.0 536 | 537 | Wrap 538 | NO 539 | 540 | 541 | Bounds 542 | {{307.625, 186}, {30, 14}} 543 | Class 544 | ShapedGraphic 545 | FitText 546 | YES 547 | Flow 548 | Resize 549 | ID 550 | 4 551 | Style 552 | 553 | fill 554 | 555 | Draws 556 | NO 557 | 558 | shadow 559 | 560 | Draws 561 | NO 562 | 563 | stroke 564 | 565 | Draws 566 | NO 567 | 568 | 569 | Text 570 | 571 | Text 572 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 573 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 574 | {\colortbl;\red255\green255\blue255;} 575 | {\*\expandedcolortbl;;} 576 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 577 | 578 | \f0\fs24 \cf0 INT} 579 | VerticalPad 580 | 0.0 581 | 582 | Wrap 583 | NO 584 | 585 | 586 | Bounds 587 | {{231, 229}, {26, 14}} 588 | Class 589 | ShapedGraphic 590 | FitText 591 | YES 592 | Flow 593 | Resize 594 | ID 595 | 3 596 | Style 597 | 598 | fill 599 | 600 | Draws 601 | NO 602 | 603 | shadow 604 | 605 | Draws 606 | NO 607 | 608 | stroke 609 | 610 | Draws 611 | NO 612 | 613 | 614 | Text 615 | 616 | Text 617 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 618 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 619 | {\colortbl;\red255\green255\blue255;} 620 | {\*\expandedcolortbl;;} 621 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 622 | 623 | \f0\fs24 \cf0 "+"} 624 | VerticalPad 625 | 0.0 626 | 627 | Wrap 628 | NO 629 | 630 | 631 | Bounds 632 | {{151.06200000000001, 186}, {30, 14}} 633 | Class 634 | ShapedGraphic 635 | FitText 636 | YES 637 | Flow 638 | Resize 639 | ID 640 | 15 641 | Style 642 | 643 | fill 644 | 645 | Draws 646 | NO 647 | 648 | shadow 649 | 650 | Draws 651 | NO 652 | 653 | stroke 654 | 655 | Draws 656 | NO 657 | 658 | 659 | Text 660 | 661 | Text 662 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 663 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 664 | {\colortbl;\red255\green255\blue255;} 665 | {\*\expandedcolortbl;;} 666 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 667 | 668 | \f0\fs24 \cf0 INT} 669 | VerticalPad 670 | 0.0 671 | 672 | Wrap 673 | NO 674 | 675 | 676 | GridInfo 677 | 678 | GuidesLocked 679 | NO 680 | GuidesVisible 681 | YES 682 | HPages 683 | 1 684 | ImageCounter 685 | 1 686 | KeepToScale 687 | 688 | Layers 689 | 690 | 691 | Lock 692 | NO 693 | Name 694 | Layer 1 695 | Print 696 | YES 697 | Slices 698 | NO 699 | View 700 | YES 701 | 702 | 703 | LayoutInfo 704 | 705 | Animate 706 | NO 707 | circoMinDist 708 | 18 709 | layoutEngine 710 | dot 711 | neatoLineLength 712 | 0.20000000298023224 713 | 714 | LinksVisible 715 | NO 716 | MagnetsVisible 717 | NO 718 | MasterSheets 719 | 720 | ModificationDate 721 | 2022-06-24 15:15:00 +0000 722 | Modifier 723 | Jeremy Siek 724 | NotesVisible 725 | NO 726 | Orientation 727 | 2 728 | OriginVisible 729 | NO 730 | OutlineStyle 731 | Basic 732 | PageBreaks 733 | YES 734 | PrintInfo 735 | 736 | NSBottomMargin 737 | 738 | float 739 | 11.9906 740 | 741 | NSHorizonalPagination 742 | 743 | coded 744 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG 745 | 746 | NSLeftMargin 747 | 748 | float 749 | 11.9906 750 | 751 | NSPaperSize 752 | 753 | size 754 | {611.99999904632568, 792} 755 | 756 | NSPrintReverseOrientation 757 | 758 | coded 759 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG 760 | 761 | NSRightMargin 762 | 763 | float 764 | 11.9906 765 | 766 | NSTopMargin 767 | 768 | float 769 | 11.9906 770 | 771 | 772 | PrintOnePage 773 | 774 | ReadOnly 775 | NO 776 | RowAlign 777 | 1 778 | RowSpacing 779 | 36 780 | SheetTitle 781 | Canvas 1 782 | SmartAlignmentGuidesActive 783 | YES 784 | SmartDistanceGuidesActive 785 | YES 786 | UniqueID 787 | 1 788 | UseEntirePage 789 | 790 | VPages 791 | 1 792 | WindowInfo 793 | 794 | CurrentSheet 795 | 0 796 | Expanded_Canvases 797 | 798 | Frame 799 | {{204, -0}, {949, 687}} 800 | ShowInfo 801 | 802 | Sidebar 803 | 804 | SidebarWidth 805 | 0 806 | TopSlabHeight 807 | 33 808 | VisibleRegion 809 | {{-31, 0}, {652, 590}} 810 | Zoom 811 | 1 812 | ZoomValues 813 | 814 | 815 | Canvas 1 816 | 1 817 | 1 818 | 819 | 820 | 821 | 822 | 823 | -------------------------------------------------------------------------------- /defs.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | 3 | \newcommand{\itm}[1]{\ensuremath{\mathit{#1}}} 4 | \newcommand{\ttm}[1]{\ensuremath{\text{\texttt{#1}}}} 5 | \newcommand{\sfm}[1]{\ensuremath{\mathsf{#1}}} 6 | 7 | \newcommand{\Lang}{\mathcal{L}} 8 | \newcommand{\CLang}{\mathcal{C}} 9 | 10 | \newcommand{\LangInt}{\ensuremath{\Lang_{\mathsf{Int}}}} % R0 11 | 12 | \newcommand{\LangVar}{$\Lang_{\mathsf{Var}}$} % R1 13 | \newcommand{\LangVarM}{\Lang_{\mathsf{Var}}} 14 | 15 | \newcommand{\RCO}{\mathit{mon}} % output of remove-complex-opera* 16 | 17 | \newcommand{\LangVarANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{Var}}}} 18 | \newcommand{\LangVarANFM}{\Lang^{\RCO}_{\mathsf{Var}}} 19 | 20 | \newcommand{\LangIf}{$\Lang_{\mathsf{If}}$} %R2 21 | \newcommand{\LangIfM}{\ensuremath{\Lang_{\mathsf{If}}}} %R2 22 | \newcommand{\LangIfANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{if}}}} %R2 23 | 24 | \newcommand{\LangCVar}{$\CLang_{\mathsf{Var}}$} % C0 25 | \newcommand{\LangCVarM}{\CLang_{\mathsf{Var}}} % C0 26 | \newcommand{\LangCIf}{$\CLang_{\mathsf{If}}$} %C1 27 | \newcommand{\LangCIfM}{\ensuremath{\CLang_{\mathsf{If}}}} %C1 28 | \newcommand{\LangVec}{$\Lang_{\mathsf{Tup}}$} %R3 29 | \newcommand{\LangVecM}{\Lang_{\mathsf{Tup}}} %R3 30 | \newcommand{\LangStruct}{\ensuremath{\Lang_{\mathsf{Struct}}}} %\Lang^s3 31 | \newcommand{\LangCVec}{$\CLang_{\mathsf{Tup}}$} %C2 32 | \newcommand{\LangCVecM}{\CLang_{\mathsf{Tup}}} %C2 33 | \newcommand{\LangVecANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{Tup}}}} %R3 34 | \newcommand{\LangVecANFM}{\Lang^{\RCO}_{\mathsf{Tup}}} %R3 35 | \newcommand{\LangAlloc}{\ensuremath{\Lang_{\mathsf{Alloc}}}} %R3' 36 | \newcommand{\LangAllocANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{Alloc}}}} %R3' 37 | \newcommand{\LangAllocANFM}{\Lang^{\RCO}_{\mathsf{Alloc}}} %R3' 38 | \newcommand{\LangFun}{$\Lang_{\mathsf{Fun}}$} %R4 39 | \newcommand{\LangFunM}{\Lang_{\mathsf{Fun}}} %R4 40 | \newcommand{\LangCFun}{$\CLang_{\mathsf{Fun}}$} %C3 41 | \newcommand{\LangCFunM}{\CLang_{\mathsf{Fun}}} %C3 42 | \newcommand{\LangFunANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{FunRef}}}} %R4 43 | \newcommand{\LangFunANFM}{\Lang^{\RCO}_{\mathsf{FunRef}}} %R4 44 | \newcommand{\LangFunRef}{$\Lang_{\mathsf{FunRef}}$} %F1 45 | \newcommand{\LangFunRefM}{\Lang_{\mathsf{FunRef}}} %F1 46 | \newcommand{\LangFunRefAlloc}{\ensuremath{\Lang^{\mathsf{Alloc}}_{\mathsf{FunRef}}}} %R'4 47 | \newcommand{\LangLam}{$\Lang_\lambda$} %R5 48 | \newcommand{\LangLamFunRef}{$\Lang_\lambda^{\mathsf{FunRef}}$} 49 | \newcommand{\LangLamM}{\ensuremath{\Lang_\lambda}} %R5 50 | \newcommand{\LangCLam}{$\CLang_{\mathsf{Clos}}$} %C4 51 | \newcommand{\LangCLamM}{\CLang_{\mathsf{Clos}}} %C4 52 | \newcommand{\LangAny}{$\Lang_{\mathsf{Any}}$} %R6 53 | \newcommand{\LangAnyM}{\Lang_{\mathsf{Any}}} %R6 54 | \newcommand{\LangAnyFunRef}{\ensuremath{\Lang^{\mathsf{FunRef}}_{\mathsf{Any}}}} %R'6 55 | \newcommand{\LangAnyAlloc}{\ensuremath{\Lang^{\mathsf{Alloc}}_{\mathsf{Any}}}} %R'6 56 | \newcommand{\LangCAny}{$\CLang_{\mathsf{Any}}$} %C5 57 | \newcommand{\LangCAnyM}{\CLang_{\mathsf{Any}}} %C5 58 | \newcommand{\LangDyn}{$\Lang_{\mathsf{Dyn}}$} %R7 59 | \newcommand{\LangDynM}{\Lang_{\mathsf{Dyn}}} %R7 60 | \newcommand{\LangDynFunRef}{\ensuremath{\Lang^{\mathsf{FunRef}}_{\mathsf{Dyn}}}} %R'7 61 | \newcommand{\LangLoop}{$\Lang_{\mathsf{While}}$} %R8 62 | \newcommand{\LangLoopM}{\Lang_{\mathsf{While}}} %R8 63 | \newcommand{\LangLoopFunRef}{\ensuremath{\Lang^{\mathsf{FunRef}}_{\mathsf{While}}}} %R'8 64 | \newcommand{\LangLoopAlloc}{\ensuremath{\Lang^{\mathsf{Alloc}}_{\mathsf{While}}}} %R'8 65 | \newcommand{\LangCLoop}{$\CLang_{\circlearrowleft}$} %C7 66 | \newcommand{\LangCLoopM}{\CLang_{\circlearrowleft}} %C7 67 | \newcommand{\LangLoopANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{While}}}} %R8 68 | \newcommand{\LangArray}{\ensuremath{\Lang_{\mathsf{Array}}}} %\Lang^s3 69 | \newcommand{\LangArrayM}{\Lang_{\mathsf{Array}}} %\Lang^s3 70 | \newcommand{\LangGrad}{$\Lang_{\mathsf{?}}$} %R9 71 | \newcommand{\LangGradM}{\Lang_{\mathsf{?}}} %R9 72 | \newcommand{\LangCast}{$\Lang_{\mathsf{Cast}}$} %R9' 73 | \newcommand{\LangCastM}{\Lang_{\mathsf{Cast}}} %R9' 74 | \newcommand{\LangProxy}{\ensuremath{\Lang_{\mathsf{Proxy}}}} %R8'' 75 | \newcommand{\LangPVec}{\ensuremath{\Lang_{\mathsf{POr}}}} %R8'' 76 | \newcommand{\LangPVecFunRef}{\ensuremath{\Lang^{\mathsf{FunRef}}_{\mathsf{POr}}}} %R8'' 77 | \newcommand{\LangPVecAlloc}{\ensuremath{\Lang^{\mathsf{Alloc}}_{\mathsf{POr}}}} %R8'' 78 | \newcommand{\LangPoly}{\ensuremath{\Lang_{\mathsf{Gen}}}} %R10 79 | \newcommand{\LangInst}{\ensuremath{\Lang_{\mathsf{Inst}}}} %R'10 80 | \newcommand{\LangCLoopPVec}{\ensuremath{\CLang^{\mathsf{POr}}_{\circlearrowleft}}} %Cp7 81 | 82 | \newcommand{\LangXVar}{$\mathrm{x86}_{\mathsf{Var}}$} % pseudo x86_0 83 | \newcommand{\LangXASTInt}{\ensuremath{\mathrm{x86}_{\mathsf{Int}}}} % x86_0 84 | \newcommand{\LangXInt}{$\mathrm{x86}_{\mathsf{Int}}$} %x86^{\dagger}_0 85 | \newcommand{\LangXIntM}{\mathrm{x86}_{\mathsf{Int}}} %x86^{\dagger}_0 86 | \newcommand{\LangXASTIf}{\ensuremath{\mathrm{x86}_{\mathsf{If}}}} %x86_1 87 | \newcommand{\LangXIf}{$\mathrm{x86}_{\mathsf{If}}$} %x86^{\dagger}_1 88 | \newcommand{\LangXIfM}{\mathrm{x86}_{\mathsf{If}}} %x86^{\dagger}_1 89 | \newcommand{\LangXIfVar}{\ensuremath{\mathrm{x86}^{\mathsf{Var}}_{\mathsf{If}}}} %x86^{*}_1 90 | \newcommand{\LangXASTGlobal}{\ensuremath{\mathrm{x86}_{\mathsf{Global}}}} %x86_2 91 | \newcommand{\LangXGlobal}{$\mathrm{x86}_{\mathsf{Global}}$} %x86^{\dagger}_2 92 | \newcommand{\LangXGlobalM}{\mathrm{x86}_{\mathsf{Global}}} %x86^{\dagger}_2 93 | \newcommand{\LangXGlobalVar}{\ensuremath{\mathrm{x86}^{\mathsf{Var}}_{\mathsf{Global}}}} %x86^{*}_2 94 | \newcommand{\LangXIndCall}{$\mathrm{x86}^{\mathsf{Def}}_{\mathsf{callq*}}$} %x86_3 95 | \newcommand{\LangXIndCallM}{\mathrm{x86}^{\mathsf{Def}}_{\mathsf{callq*}}} %x86_3 96 | \newcommand{\LangXIndCallFlat}{$\mathrm{x86}_{\mathsf{callq*}}$} %x86_3 97 | \newcommand{\LangXIndCallFlatM}{\mathrm{x86}_{\mathsf{callq*}}} %x86_3 98 | \newcommand{\LangXIndCallVar}{\ensuremath{\mathrm{x86}^{\mathsf{Var},\mathsf{Def}}_{\mathsf{callq*}}}} %x86^*_3 99 | 100 | \newcommand{\Stmt}{\itm{stmt}} 101 | \newcommand{\Exp}{\itm{exp}} 102 | \newcommand{\Def}{\itm{def}} 103 | \newcommand{\Type}{\itm{type}} 104 | \newcommand{\FType}{\itm{ftype}} 105 | \newcommand{\Instr}{\itm{instr}} 106 | \newcommand{\Block}{\itm{block}} 107 | \newcommand{\Blocks}{\itm{blocks}} 108 | \newcommand{\Param}{\itm{prm}} 109 | \newcommand{\Params}{\itm{params}} 110 | \newcommand{\Tail}{\itm{tail}} 111 | \newcommand{\Prog}{\itm{prog}} 112 | \newcommand{\Src}{\itm{src}} 113 | \newcommand{\Dst}{\itm{dst}} 114 | \newcommand{\Atm}{\itm{atm}} 115 | \newcommand{\Reg}{\itm{reg}} 116 | \newcommand{\Int}{\itm{int}} 117 | \newcommand{\Var}{\itm{var}} 118 | \newcommand{\Op}{\itm{op}} 119 | \newcommand{\key}[1]{\texttt{#1}} 120 | \newcommand{\skey}[1]{\texttt{\textquotesingle #1\textquotesingle}} 121 | \newcommand{\code}[1]{\texttt{#1}} 122 | \newcommand{\scode}[1]{\texttt{\textquotesingle #1\textquotesingle}} 123 | 124 | \newcommand{\LP}{\key{(}} 125 | \newcommand{\RP}{\key{)}} 126 | \newcommand{\LS}{\key{[}} 127 | \newcommand{\RS}{\key{]}} 128 | \newcommand{\LC}{\key{\{}} 129 | \newcommand{\RC}{\key{\}}} 130 | 131 | \newcommand{\MID}{\;\mid\;} 132 | 133 | \if\edition\racketEd 134 | \newcommand{\QUOTE}[1]{\code{\textquotesingle}#1} 135 | \newcommand{\INT}[1]{{\key{(Int}~#1\key{)}}} 136 | \newcommand{\READOP}{{\key{read}}} 137 | \newcommand{\READ}{{\key{(Prim}~\code{\textquotesingle read}~\key{())}}} 138 | \newcommand{\CREAD}{\key{(read)}} 139 | \newcommand{\NEG}[1]{{\key{(Prim}~\code{\textquotesingle -}~\code{(}#1\code{))}}} 140 | \newcommand{\ADD}[2]{{\key{(Prim}~\code{\textquotesingle +}~\code{(}#1~#2\code{))}}} 141 | \newcommand{\ADDP}[2]{{\key{(Prim}~\code{\textquotesingle +}~\code{(list}~#1~#2\code{))}}} 142 | \newcommand{\SUB}[2]{\key{(Prim}~\code{\textquotesingle -}~\code{(}#1~#2\code{))}} 143 | \newcommand{\PROGRAM}[2]{\LP\code{Program}~#1~#2\RP} 144 | \newcommand{\VAR}[1]{\key{(Var}~#1\key{)}} 145 | \newcommand{\BOOL}[1]{\key{(Bool}~#1\key{)}} 146 | \newcommand{\TRUE}{\key{\#t}} 147 | \newcommand{\FALSE}{\key{\#f}} 148 | \newcommand{\UNIOP}[2]{\key{(Prim}~#1~\code{(}#2\code{))}} 149 | \newcommand{\CUNIOP}[2]{\LP #1~#2 \RP} 150 | \newcommand{\BINOP}[3]{\key{(Prim}~#1~\code{(}#2~#3\code{))}} 151 | \newcommand{\CBINOP}[3]{\LP #1~#2~#3\RP} 152 | \newcommand{\EQNAME}{\key{eq?}} 153 | \newcommand{\CEQ}[2]{\LP\key{eq?}~#1~#2\RP} 154 | \newcommand{\IFNAME}{\key{If}} 155 | \newcommand{\IF}[3]{\key{(If}\,#1~#2~#3\key{)}} 156 | \newcommand{\CIF}[3]{\LP\key{if}~#1~#2~#3\RP} 157 | \newcommand{\ANDNAME}{\key{and}} 158 | \newcommand{\ORNAME}{\key{or}} 159 | \newcommand{\NOTNAME}{\key{not}} 160 | \newcommand{\AND}[2]{\key{(Prim}~\code{\textquotesingle and}~\code{(}#1~#2\code{))}} 161 | \newcommand{\OR}[2]{\key{(Prim}~\code{\textquotesingle or}~\code{(}#1~#2\code{))}} 162 | \newcommand{\CAND}[2]{\CBINOP{\key{and}}{#1}{#2}} 163 | \newcommand{\COR}[2]{\CBINOP{\key{or}}{#1}{#2}} 164 | \newcommand{\INTTY}{{\key{Integer}}} 165 | \newcommand{\INTTYPE}{{\key{Integer}}} 166 | \newcommand{\BOOLTY}{{\key{Boolean}}} 167 | \newcommand{\TUPLETYPENAME}{\key{Vector}} 168 | \newcommand{\ARRAYTYPENAME}{\key{Vectorof}} 169 | \newcommand{\VECTY}[1]{\LP\key{Vector}~#1\RP} 170 | \newcommand{\ARRAYTY}[1]{\LP\key{Vectorof}~#1\RP} 171 | \newcommand{\CARRAYTY}[1]{\LP\key{Vectorof}~#1\RP} 172 | \newcommand{\ANYTY}{\key{Any}} 173 | \newcommand{\CANYTY}{\key{Any}} 174 | \newcommand{\PTUPLETYNAME}{\key{PVector}} 175 | \newcommand{\PARRAYTYNAME}{\key{PVectorof}} 176 | \newcommand{\PTUPLETY}[1]{\LP\key{PVector}~#1\RP} 177 | \newcommand{\CPTUPLETY}[1]{\LP\key{PVector}~#1\RP} 178 | \newcommand{\CPROGRAM}[2]{\LP\code{CProgram}~#1~#2\RP} 179 | \newcommand{\CPROGRAMDEFS}[2]{\LP\code{CProgramDefs}~#1~#2\RP} 180 | \newcommand{\LET}[3]{\key{(Let}~#1~#2~#3\key{)}} 181 | \newcommand{\CLET}[3]{\LP\key{let}~\LP\LS#1~#2\RS\RP~#3\RP} 182 | \newcommand{\COLLECT}[1]{\LP\key{Collect}~#1\RP} 183 | \newcommand{\CCOLLECT}[1]{\LP\key{collect}~#1\RP} 184 | \newcommand{\ALLOCATE}[2]{\LP\key{Allocate}~#1~#2\RP} 185 | \newcommand{\CALLOCATE}[2]{\LP\key{allocate}~#1~#2\RP} 186 | \newcommand{\ALLOCARRAY}[2]{\LP\key{AllocateArray}~#1~#2\RP} 187 | \newcommand{\CALLOCARRAY}[2]{\LP\key{allocate\_array}~#1~#2\RP} 188 | \newcommand{\GLOBAL}[1]{\LP\key{Global}~#1\RP} 189 | \newcommand{\CGLOBAL}[1]{#1\key{(\%rip)}} 190 | \newcommand{\GLOBALVALUE}[1]{\LP\key{GlobalValue}~#1\RP} 191 | \newcommand{\CGLOBALVALUE}[1]{\LP\key{global-value}~#1\RP} 192 | \newcommand{\ARITY}[1]{\LP\key{Prim}~\code{\textquotesingle procedure-arity}~\LP#1\RP\RP} 193 | \newcommand{\CARITY}[1]{\LP\key{procedure-arity}~#1\RP} 194 | \fi 195 | 196 | \if\edition\pythonEd 197 | %% Use BEGIN instead of LET -Jeremy 198 | %% \newcommand{\LET}[3]{\key{Let}\LP #1 \key{,} #2 \key{,} #3 \RP} 199 | %% \newcommand{\CLET}[3]{\key{let}~#1~\key{=}~#2~\key{in}~#3} 200 | \newcommand{\PTUPLETYNAME}{\key{ProxyOrTupleType}} 201 | \newcommand{\PARRAYTYNAME}{\key{ProxyOrListType}} 202 | \newcommand{\PTUPLETY}[1]{\key{ProxyOrTupleType}\LP#1\RP} 203 | \newcommand{\CPTUPLETY}[1]{\key{ProxyOrTupleType}\LP#1\RP} 204 | \newcommand{\PARRAYTY}[1]{\key{ProxyOrListType}\LP#1\RP} 205 | \newcommand{\CPARRAYTY}[1]{\key{ProxyOrListType}\LP#1\RP} 206 | \newcommand{\QUOTE}[1]{\code{\textquotesingle}#1\code{\textquotesingle}} 207 | \newcommand{\INT}[1]{{\key{Constant}\LP#1\RP}} 208 | \newcommand{\READOP}{{\key{input\_int}}} 209 | \newcommand{\READ}{{\key{Call(Name(\textquotesingle input\_int\textquotesingle),[])}}} 210 | \newcommand{\CREAD}{\key{input\_int()}} 211 | \newcommand{\NEG}[1]{{\key{UnaryOp(USub(),} #1\code{)}}} 212 | \newcommand{\ADD}[2]{{\key{BinOp}\LP #1\code{,}\key{Add()}\key{,}#2\code{)}}} 213 | \newcommand{\ADDP}[2]{{\key{BinOp}\LP #1\code{,}\key{Add()}\key{,}#2\code{)}}} 214 | \newcommand{\SUB}[2]{{\key{BinOp}\LP #1\code{,}\key{Sub()}\key{,}#2\code{)}}} 215 | \newcommand{\PRINT}[1]{{\key{Expr}\LP\key{Call}\LP\key{Name}\LP\key{\textquotesingle print\textquotesingle}\RP\key{,}\LS#1\RS\RP\RP}} 216 | \newcommand{\CPRINT}[1]{\key{print}\LP #1\RP} 217 | \newcommand{\EXPR}[1]{{\key{Expr}\LP #1\RP}} 218 | \newcommand{\PROGRAM}[2]{\code{Module}\LP #2\RP} 219 | \newcommand{\CPROGRAM}[2]{\code{CProgram}\LP #2 \RP} 220 | \newcommand{\CPROGRAMDEFS}[1]{\code{CProgramDefs}\LP #1 \RP} 221 | \newcommand{\VAR}[1]{\key{Name}\LP #1\RP} 222 | \newcommand{\BOOL}[1]{\key{Constant}\LP #1 \RP} 223 | \newcommand{\UNIOP}[2]{\key{UnaryOp}\LP #1 \code{,} #2 \RP} 224 | \newcommand{\CUNIOP}[2]{#1~#2} 225 | \newcommand{\BINOP}[3]{\key{BinOp}\LP #1 \code{,} #2 \code{,} #3 \RP} 226 | \newcommand{\CBINOP}[3]{#2~#1~#3} 227 | \newcommand{\EQNAME}{\key{Eq}} 228 | \newcommand{\NOTEQNAME}{\key{NotEq}} 229 | \newcommand{\CEQ}[2]{\LP #1~\code{==}~#2 \RP} 230 | \newcommand{\CIS}[2]{#1~\code{is}~#2} 231 | \newcommand{\CGET}[2]{#1 \LS #2 \RS} 232 | \newcommand{\GET}[2]{\key{Subscript}\LP #1 \code{,} #2 \code{,} \code{Load()} \RP} 233 | \newcommand{\CLEN}[1]{\code{len}\LP #1 \RP} 234 | \newcommand{\LEN}[1]{\code{Call}\LP \code{Name(\textquotesingle len\textquotesingle)} \code{,} \LS #1 \RS \RP} 235 | \newcommand{\PUT}[2]{\key{Subscript}\LP #1 \code{,} #2 \code{,} \code{Store()} \RP} 236 | \newcommand{\CPUT}[2]{#1[#2]} 237 | \newcommand{\TUPLE}[1]{\key{Tuple}\LP #1 \code{,} \code{Load()} \RP} 238 | \newcommand{\BOOLOP}[3]{\key{BoolOp}\LP #1 \code{,} \LS #2 \code{,} #3 \RS \RP} 239 | \newcommand{\CMP}[3]{\key{Compare}\LP #1\code{,}\LS #2 \RS \code{,} \LS #3 \RS\RP} 240 | \newcommand{\CCMP}[3]{#2~#1~#3} 241 | \newcommand{\TRUE}{\key{True}} 242 | \newcommand{\FALSE}{\key{False}} 243 | \newcommand{\IFNAME}{\key{IfExp}} 244 | \newcommand{\IF}[3]{\key{IfExp}\LP #1 \code{,} #2 \code{,} #3 \RP} 245 | \newcommand{\CIF}[3]{#2~\key{if}~#1~\key{else}~#3} 246 | \newcommand{\ANDNAME}{\key{and}} 247 | \newcommand{\ORNAME}{\key{or}} 248 | \newcommand{\NOTNAME}{\key{not}} 249 | \newcommand{\AND}[2]{\BOOLOP{\key{And()}}{#1}{#2}} 250 | \newcommand{\CAND}[2]{#1~\key{and}~#2} 251 | \newcommand{\OR}[2]{\BOOLOP{\key{Or()}}{#1}{#2}} 252 | \newcommand{\COR}[2]{#1~\key{or}~#2} 253 | \newcommand{\INTTY}{{\key{int}}} 254 | \newcommand{\BOOLTY}{{\key{bool}}} 255 | \newcommand{\ANYTY}{{\key{AnyType}}} 256 | \newcommand{\CANYTY}{{\key{Any}}} 257 | \newcommand{\TUPLETYPENAME}{\key{TupleType}} 258 | \newcommand{\ARRAYTYPENAME}{\key{ListType}} 259 | \newcommand{\VECTY}[1]{{\key{TupleType}\LP\LS #1 \RS\RP}} 260 | \newcommand{\ARRAYTY}[1]{\key{ListType}\LP#1\RP} 261 | \newcommand{\CARRAYTY}[1]{\key{list}\LS#1\RS} 262 | \newcommand{\INTTYPE}{{\key{IntType}}} 263 | \newcommand{\COLLECT}[1]{\key{Collect}\LP#1\RP} 264 | \newcommand{\CCOLLECT}[1]{\key{collect}\LP#1\RP} 265 | \newcommand{\ALLOCATE}[2]{\key{Allocate}\LP#1,#2\RP} 266 | \newcommand{\CALLOCATE}[2]{\key{allocate}\LP#1,#2\RP} 267 | \newcommand{\ALLOCARRAY}[2]{\key{AllocateArray}\LP#1\code{, }#2\RP} 268 | \newcommand{\CALLOCARRAY}[2]{\key{allocate\_arrray}\LP#1,#2\RP} 269 | \newcommand{\GLOBALVALUE}[1]{\key{GlobalValue}\LP#1\RP} 270 | \newcommand{\CGLOBALVALUE}[1]{\key{global\_value}\LP#1\RP} 271 | \newcommand{\GLOBAL}[1]{\key{Global}\LP#1\RP} 272 | \newcommand{\CGLOBAL}[1]{#1\LP\key{\%rip}\RP} 273 | \newcommand{\CNEG}[1]{\key{-}~#1} 274 | \newcommand{\CNOT}[1]{\key{not}~#1} 275 | \newcommand{\CALL}[2]{\key{Call}\LP#1\code{, }#2\RP} 276 | \newcommand{\APPLY}[2]{\key{Call}\LP#1\code{, }#2\RP} 277 | \newcommand{\CAPPLY}[2]{#1\LP#2\RP} 278 | \newcommand{\FUNREF}[2]{\key{FunRef}\LP#1\code{, }#2\RP} 279 | \newcommand{\CFUNREF}[2]{#1\code{(\%rip)}} 280 | \newcommand{\CLOSURE}[2]{\key{Closure}\LP#1\code{, }#2\RP} 281 | \newcommand{\ARITY}[1]{\key{Call}\LP\key{Name}\LP\code{\textquotesingle arity\textquotesingle}\RP \code{, }\LS#1\RS\RP} 282 | \newcommand{\CARITY}[1]{\key{arity}\LP#1\RP} 283 | \newcommand{\CMUL}[2]{#1~\key{*}~#2} 284 | \newcommand{\MUL}[2]{{\key{BinOp}\LP #1\code{,} \key{Mult()}\key{,}#2\code{)}}} 285 | \fi % pythonEd 286 | 287 | \if\edition\racketEd 288 | \newcommand{\BEGIN}[2]{\LP\key{Begin}~#1~#2\RP} 289 | \newcommand{\CBEGIN}[2]{\LP\key{begin}~#1~#2\RP} 290 | \newcommand{\CNEG}[1]{\LP\key{-}~#1\RP} 291 | \newcommand{\CNOT}[1]{\LP\key{not}~#1\RP} 292 | \newcommand{\CALL}[2]{\LP\key{Call}~#1~#2\RP} 293 | \newcommand{\APPLY}[2]{\LP\key{Apply}~#1~#2\RP} 294 | \newcommand{\CAPPLY}[2]{\LP#1~#2\RP} 295 | \newcommand{\FUNREF}[2]{\LP\key{FunRef}~#1~#2\RP} 296 | \newcommand{\CFUNREF}[2]{\LP\key{fun-ref}~#1~#2\RP} 297 | \newcommand{\CLOSURE}[2]{\LP\key{Closure}~#1~#2\RP} 298 | \newcommand{\CMUL}[2]{\LP\key{*}~#1~#2\RP} 299 | \newcommand{\MUL}[2]{{\key{(Prim}~\code{\textquotesingle *}~\code{(}#1~#2\code{))}}} 300 | \fi 301 | \newcommand{\PRIM}[2]{\LP\key{Prim}~#1~\LP #2\RP\RP} 302 | \newcommand{\PROGRAMDEFSEXP}[3]{\code{(ProgramDefsExp}~#1~#2~#3\code{)}} 303 | \newcommand{\PROGRAMDEFS}[2]{\code{(ProgramDefs}~#1~#2\code{)}} 304 | \newcommand{\CADD}[2]{\LP\key{+}~#1~#2\RP} 305 | \newcommand{\CSUB}[2]{\LP\key{-}~#1~#2\RP} 306 | \newcommand{\CWHILE}[2]{\LP\key{while}~#1~#2\RP} 307 | \newcommand{\WHILE}[2]{\LP\key{WhileLoop}~#1~#2\RP} 308 | \newcommand{\CMAKEVEC}[2]{\LP\key{make-vector}~#1~#2\RP} 309 | \newcommand{\MAKEVEC}[2]{\LP\key{make-vector}~#1~#2\RP} 310 | \newcommand{\CSETBANG}[2]{\LP\key{set!}~#1~#2\RP} 311 | \newcommand{\SETBANG}[2]{\LP\key{SetBang}~#1~#2\RP} 312 | \newcommand{\GETBANG}[1]{\LP\key{GetBang}~#1\RP} 313 | \newcommand{\NOT}[1]{\key{(Prim}~\code{not}~\code{(}#1~\code{))}} 314 | \newcommand{\CAST}[3]{\LP\key{Cast}~#1~#2~#3\RP} 315 | \newcommand{\VECTOR}[1]{\LP\key{Prim}~\code{vector}~\LP~#1\RP\RP} 316 | \newcommand{\VECREF}[2]{\LP\key{Prim}~\code{vector-ref}~\LP #1~#2\RP\RP} 317 | \newcommand{\VECSET}[3]{\LP\key{Prim}~\code{vector-set!}~\LP #1~#2~#3\RP\RP} 318 | \newcommand{\VECLEN}[1]{\LP\key{Prim}~\code{vector-length}~\LP #1\RP\RP} 319 | \newcommand{\ANYVECREF}[2]{\LP\key{Prim}~\code{any-vector-ref}~\LP #1~#2\RP\RP} 320 | \newcommand{\ANYVECSET}[3]{\LP\key{Prim}~\code{any-vector-set!}~\LP #1~#2~#3\RP\RP} 321 | \newcommand{\ANYVECLEN}[1]{\LP\key{Prim}~\code{any-vector-length}~\LP #1\RP\RP} 322 | 323 | \newcommand{\VOID}{\key{(Void)}} 324 | \newcommand{\VALUEOF}[2]{\LP\key{ValueOf}~#1~#2\RP} 325 | 326 | \if\edition\racketEd 327 | \newcommand{\CGLAMBDA}[3]{\LP\key{lambda:}\,#1\,#2~\Exp\RP} 328 | \newcommand{\ALLOC}[2]{\LP\key{Allocate}~#1~#2\RP} 329 | \newcommand{\ALLOCCLOS}[3]{\LP\key{AllocateClosure}~#1~#2~#3\RP} 330 | \newcommand{\INJECT}[2]{\LP\key{Inject}~#1~#2\RP} 331 | \newcommand{\PROJECT}[2]{\LP\key{Project}~#1~#2\RP} 332 | \newcommand{\CINJECT}[2]{\LP\key{inject}~#1~#2\RP} 333 | \newcommand{\CPROJECT}[2]{\LP\key{project}~#1~#2\RP} 334 | \newcommand{\LAMBDA}[3]{\key{(Lambda}~#1~#2~#3\code{)}} 335 | \newcommand{\CLAMBDA}[3]{\LP\key{lambda:}\,#1\,\key{:}\,#2~\Exp\RP} 336 | \newcommand{\TAILCALL}[2]{\key{(TailCall}~#1~#2\code{)}} 337 | \newcommand{\CASSIGN}[2]{#1~\key{=}~#2\key{;}} 338 | \newcommand{\ASSIGN}[2]{\key{(Assign}~#1~#2\key{)}} 339 | \newcommand{\IFSTMTNAME}{\key{IfStmt}} 340 | \newcommand{\IFSTMT}[3]{\key{(IfStmt}\,#1~#2~#3\key{)}} 341 | \newcommand{\RETURN}[1]{\key{(Return}~#1\key{)}} 342 | \newcommand{\CRETURN}[1]{\key{return}~#1\key{;}} 343 | \newcommand{\GOTO}[1]{\key{(Goto}~#1\key{)}} 344 | \newcommand{\CGOTO}[1]{\key{goto}~#1\key{;}} 345 | \newcommand{\FUNDEF}[5]{\key{(Def}~#1~#2~#3~#4~#5\code{)}} 346 | \fi 347 | \if\edition\pythonEd 348 | \newcommand{\CGLAMBDA}[3]{\key{lambda}\,#1\,#2\code{:}~\Exp} 349 | \newcommand{\ALLOC}[2]{\key{Allocate}\LP#1\code{, }#2\RP} 350 | \newcommand{\ALLOCCLOS}[3]{\key{AllocateClosure}\LP#1\code{, }#2\code{, }#3\RP} 351 | \newcommand{\INJECT}[2]{\key{Inject}\LP#1\key{, }#2\RP} 352 | \newcommand{\PROJECT}[2]{\key{Project}\LP#1\key{, }#2\RP} 353 | \newcommand{\CINJECT}[2]{\sfm{inject}\LP#1\key{, }#2\RP} 354 | \newcommand{\CPROJECT}[2]{\sfm{project}\LP#1\key{, }~#2\RP} 355 | \newcommand{\LAMBDA}[2]{\key{Lambda}\LP#1\code{, }#2\RP} 356 | \newcommand{\CLAMBDA}[2]{\key{lambda}\,#1\,\key{:}\,#2} 357 | \newcommand{\TAILCALL}[2]{\key{TailCall}\LP#1\code{, }#2\RP} 358 | \newcommand{\CASSIGN}[2]{#1~\key{=}~#2} 359 | \newcommand{\ASSIGN}[2]{\key{Assign}\LP\LS #1\RS\key{, }#2\RP} 360 | \newcommand{\CANNASSIGN}[3]{#1~\key{:}~#2~\key{=}~#3} 361 | \newcommand{\ANNASSIGN}[3]{\key{AnnAssign}\LP#1\key{, }#2\key{, }#3\key{, 0}\RP} 362 | \newcommand{\IFSTMTNAME}{\key{If}} 363 | \newcommand{\IFSTMT}[3]{\key{If}\LP #1 \code{, } #2 \code{, } #3 \RP} 364 | \newcommand{\CIFSTMT}[3]{\key{if}~#1\code{:}~#2~\code{else:}~#3} 365 | \newcommand{\CBEGIN}[2]{\key{begin:}~#1~#2} 366 | \newcommand{\BEGIN}[2]{\key{Begin}\LP#1\code{, }#2\RP} 367 | \newcommand{\WHILESTMT}[2]{\key{While}\LP #1 \code{, } #2 \code{, []}\RP} 368 | \newcommand{\RETURN}[1]{\key{Return}\LP #1 \RP} 369 | \newcommand{\CRETURN}[1]{\key{return}~#1} 370 | \newcommand{\GOTO}[1]{\key{Goto}\LP #1 \RP} 371 | \newcommand{\CGOTO}[1]{\key{goto}~#1} 372 | \newcommand{\FUNDEF}[5]{\key{FunctionDef}\LP#1\key{, }#2\key{, }#5\key{, None}\key{, }#3\key{, None}\RP} 373 | \fi 374 | 375 | \newcommand{\SEQ}[2]{\key{(Seq}~#1~#2\key{)}} 376 | 377 | \if\edition\racketEd 378 | \newcommand{\XVAR}[1]{\key{(Var}~#1\key{)}} 379 | \newcommand{\CGDEF}[4]{\LP\key{define}~\LP#1~#2\RP\,#3~#4\RP} 380 | \newcommand{\IMM}[1]{\key{(Imm}~#1\key{)}} 381 | \newcommand{\REG}[1]{\key{(Reg}~#1\key{)}} 382 | \newcommand{\DEREF}[2]{\key{(Deref}~#1~#2\key{)}} 383 | \newcommand{\BININSTR}[3]{\key{(Instr}~#1~\key{(}#2~#3\key{))}} 384 | \newcommand{\UNIINSTR}[2]{\key{(Instr}~#1~\key{(}#2\key{))}} 385 | \newcommand{\CALLQ}[2]{\LP\key{Callq}~#1~#2\RP} 386 | \newcommand{\PUSHQ}[1]{\LP\key{Instr}~\key{pushq}~\LP#1\RP\RP} 387 | \newcommand{\POPQ}[1]{\LP\key{Instr}~\key{popq}~\LP#1\RP\RP} 388 | \newcommand{\JMP}[1]{\key{(Jmp}~#1\key{)}} 389 | \newcommand{\JMPIF}[2]{\key{(JmpIf}~#1~#2\key{)}} 390 | \newcommand{\RETQ}{\key{(Retq)}} 391 | \newcommand{\XPROGRAM}[2]{\LP\code{X86Program}~#1~#2\RP} 392 | \newcommand{\XPROGRAMDEFS}[2]{\LP\code{X86ProgramDefs}~#1~#2\RP} 393 | \newcommand{\BYTEREG}[1]{\key{(ByteReg}~#1\key{)}} 394 | \newcommand{\CDEF}[4]{\LP\key{define}~\LP#1~#2\RP\,\key{:}\,#3~#4\RP} 395 | \newcommand{\DEF}[5]{\LP\key{Def}~#1~#2~#3~#4~#5\RP} 396 | \newcommand{\INDCALLQ}[2]{\key{(IndirectCallq}~#1~#2\key{)}} 397 | \newcommand{\TAILJMP}[2]{\key{(TailJmp}~#1~#2\key{)}} 398 | \newcommand{\INST}[3]{\LP\key{Inst}~#1~#2~#3\RP} 399 | \fi 400 | \if\edition\pythonEd 401 | \newcommand{\XVAR}[1]{\key{Variable}\LP #1 \RP} 402 | \newcommand{\CGDEF}[4]{\key{def}~#1\LP #2 \RP~#3 \code{:}~#4} 403 | \newcommand{\TAILJMP}[2]{\key{TailJmp}\LP#1\code{, }#2\RP} 404 | \newcommand{\INDCALLQ}[2]{\key{IndirectCallq}\LP#1\code{, }#2\RP} 405 | \newcommand{\IMM}[1]{\key{Immediate}\LP #1\RP} 406 | \newcommand{\REG}[1]{\key{Reg}\LP #1\RP} 407 | \newcommand{\DEREF}[2]{\key{Deref}\LP #1 \key{,} #2 \RP} 408 | \newcommand{\BININSTR}[3]{\key{Instr}\LP #1 \key{,} \LS #2 \key{,} #3 \RS \RP} 409 | \newcommand{\UNIINSTR}[2]{\key{Instr}\LP #1 \key{,} \LS #2 \RS \RP} 410 | \newcommand{\CALLQ}[2]{\key{Callq}\LP #1 \key{,} #2 \RP} 411 | \newcommand{\PUSHQ}[1]{\key{Instr}\LP \skey{pushq} \key{,} \LS #1 \RS \RP} 412 | \newcommand{\POPQ}[1]{\key{Instr}\LP \skey{popq} \key{,} \LS #1 \RS \RP} 413 | \newcommand{\JMP}[1]{\key{Jump}\LP #1 \RP} 414 | \newcommand{\JMPIF}[2]{\key{JumpIf}\LP #1 \key{,} #2 \RP} 415 | \newcommand{\RETQ}{\key{Instr}\LP \skey{retq} \key{,} \LS \RS \RP} 416 | % TODO: change \XPROGRAM to 1 parameter 417 | \newcommand{\XPROGRAM}[2]{\code{X86Program}\LP #2 \RP} 418 | \newcommand{\XPROGRAMDEFS}[1]{\code{X86ProgramDefs}\LP #1 \RP} 419 | \newcommand{\BYTEREG}[1]{\key{ByteReg}\LP #1 \RP} 420 | \newcommand{\CDEF}[4]{\key{def}~#1\LP #2 \RP ~\key{->}~ #3 \key{:}~#4} 421 | \newcommand{\CDEFU}[3]{\key{def}~#1\LP #2 \RP \key{:}~#3} 422 | \newcommand{\DEF}[6]{\key{FunctionDef}\LP#1\key{, }#2\key{, }#3\key{, }#4\key{, }#5\key{, }#6\RP} 423 | \newcommand{\INST}[2]{\key{Inst}\LP#1\key{, }#2\RP} 424 | \fi 425 | 426 | 427 | 428 | \newcommand{\DECL}[2]{\LP\key{Decl}~#1~#2\RP} 429 | \newcommand{\CFG}[1]{\key{(CFG}~#1\key{)}} 430 | \newcommand{\BLOCK}[2]{\key{(Block}~#1~#2\key{)}} 431 | \newcommand{\STACKLOC}[1]{(\key{stack}~#1)} 432 | 433 | 434 | 435 | \newcommand{\TTKEY}[1]{{\normalfont\tt #1}} 436 | 437 | \newenvironment{transformation}{ 438 | \newcommand{\compilesto}{% 439 | \end{minipage}&$\Rightarrow$&\begin{minipage}{0.4\textwidth}} 440 | \begin{center}\begin{tabular}{lll}\begin{minipage}{0.4\textwidth} 441 | }{% 442 | \end{minipage}\end{tabular}\end{center}% 443 | } 444 | -------------------------------------------------------------------------------- /figs/derivation.graffle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActiveLayerIndex 6 | 0 7 | AutoAdjust 8 | 9 | CanvasColor 10 | 11 | w 12 | 1 13 | 14 | CanvasOrigin 15 | {0, 0} 16 | CanvasScale 17 | 1 18 | ColumnAlign 19 | 1 20 | ColumnSpacing 21 | 36 22 | CreationDate 23 | 2008-09-03 09:39:51 -0600 24 | Creator 25 | Jeremy Siek 26 | DisplayScale 27 | 1 in = 1 in 28 | GraphDocumentVersion 29 | 5 30 | GraphicsList 31 | 32 | 33 | Class 34 | LineGraphic 35 | Head 36 | 37 | ID 38 | 34 39 | 40 | ID 41 | 37 42 | Points 43 | 44 | {1071.85, 65} 45 | {1018.15, 36} 46 | 47 | Style 48 | 49 | stroke 50 | 51 | HeadArrow 52 | 0 53 | TailArrow 54 | 0 55 | 56 | 57 | Tail 58 | 59 | ID 60 | 33 61 | 62 | 63 | 64 | Class 65 | LineGraphic 66 | Head 67 | 68 | ID 69 | 33 70 | 71 | ID 72 | 13 73 | Points 74 | 75 | {1084.81, 108} 76 | {1084.81, 79} 77 | 78 | Style 79 | 80 | stroke 81 | 82 | HeadArrow 83 | 0 84 | TailArrow 85 | 0 86 | 87 | 88 | Tail 89 | 90 | ID 91 | 31 92 | 93 | 94 | 95 | Class 96 | LineGraphic 97 | Head 98 | 99 | ID 100 | 34 101 | 102 | ID 103 | 36 104 | Points 105 | 106 | {1005.19, 108} 107 | {1005.19, 36} 108 | 109 | Style 110 | 111 | stroke 112 | 113 | HeadArrow 114 | 0 115 | TailArrow 116 | 0 117 | 118 | 119 | Tail 120 | 121 | ID 122 | 30 123 | 124 | 125 | 126 | Class 127 | LineGraphic 128 | Head 129 | 130 | ID 131 | 34 132 | 133 | ID 134 | 35 135 | Points 136 | 137 | {940.773, 65} 138 | {992.661, 36} 139 | 140 | Style 141 | 142 | stroke 143 | 144 | HeadArrow 145 | 0 146 | TailArrow 147 | 0 148 | 149 | 150 | Tail 151 | 152 | ID 153 | 32 154 | 155 | 156 | 157 | Class 158 | LineGraphic 159 | Head 160 | 161 | ID 162 | 32 163 | 164 | ID 165 | 10 166 | Points 167 | 168 | {928.248, 108} 169 | {928.248, 79} 170 | 171 | Style 172 | 173 | stroke 174 | 175 | HeadArrow 176 | 0 177 | TailArrow 178 | 0 179 | 180 | 181 | Tail 182 | 183 | ID 184 | 2 185 | 186 | 187 | 188 | Bounds 189 | {{950.186, 22}, {110, 14}} 190 | Class 191 | ShapedGraphic 192 | FitText 193 | YES 194 | Flow 195 | Resize 196 | ID 197 | 34 198 | Shape 199 | Rectangle 200 | Style 201 | 202 | fill 203 | 204 | Draws 205 | NO 206 | 207 | shadow 208 | 209 | Draws 210 | NO 211 | 212 | stroke 213 | 214 | Draws 215 | NO 216 | 217 | 218 | Text 219 | 220 | Text 221 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 222 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 223 | {\colortbl;\red255\green255\blue255;} 224 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 225 | 226 | \f0\fs24 \cf0 expression (rule 1)} 227 | 228 | Wrap 229 | NO 230 | 231 | 232 | Bounds 233 | {{1029.81, 65}, {110, 14}} 234 | Class 235 | ShapedGraphic 236 | FitText 237 | YES 238 | Flow 239 | Resize 240 | ID 241 | 33 242 | Shape 243 | Rectangle 244 | Style 245 | 246 | fill 247 | 248 | Draws 249 | NO 250 | 251 | shadow 252 | 253 | Draws 254 | NO 255 | 256 | stroke 257 | 258 | Draws 259 | NO 260 | 261 | 262 | Text 263 | 264 | Text 265 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 266 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 267 | {\colortbl;\red255\green255\blue255;} 268 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 269 | 270 | \f0\fs24 \cf0 expression (rule 2)} 271 | 272 | Wrap 273 | NO 274 | 275 | 276 | Bounds 277 | {{873.248, 65}, {110, 14}} 278 | Class 279 | ShapedGraphic 280 | FitText 281 | YES 282 | Flow 283 | Resize 284 | ID 285 | 32 286 | Shape 287 | Rectangle 288 | Style 289 | 290 | fill 291 | 292 | Draws 293 | NO 294 | 295 | shadow 296 | 297 | Draws 298 | NO 299 | 300 | stroke 301 | 302 | Draws 303 | NO 304 | 305 | 306 | Text 307 | 308 | Text 309 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 310 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 311 | {\colortbl;\red255\green255\blue255;} 312 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 313 | 314 | \f0\fs24 \cf0 expression (rule 2)} 315 | 316 | Wrap 317 | NO 318 | 319 | 320 | Bounds 321 | {{1057.31, 108}, {55, 14}} 322 | Class 323 | ShapedGraphic 324 | FitText 325 | YES 326 | Flow 327 | Resize 328 | ID 329 | 31 330 | Shape 331 | Rectangle 332 | Style 333 | 334 | fill 335 | 336 | Draws 337 | NO 338 | 339 | shadow 340 | 341 | Draws 342 | NO 343 | 344 | stroke 345 | 346 | Draws 347 | NO 348 | 349 | 350 | Text 351 | 352 | Text 353 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 354 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 355 | {\colortbl;\red255\green255\blue255;} 356 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 357 | 358 | \f0\fs24 \cf0 "3" : INT} 359 | 360 | Wrap 361 | NO 362 | 363 | 364 | Bounds 365 | {{971.686, 108}, {67, 14}} 366 | Class 367 | ShapedGraphic 368 | FitText 369 | YES 370 | Flow 371 | Resize 372 | ID 373 | 30 374 | Shape 375 | Rectangle 376 | Style 377 | 378 | fill 379 | 380 | Draws 381 | NO 382 | 383 | shadow 384 | 385 | Draws 386 | NO 387 | 388 | stroke 389 | 390 | Draws 391 | NO 392 | 393 | 394 | Text 395 | 396 | Text 397 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 398 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 399 | {\colortbl;\red255\green255\blue255;} 400 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 401 | 402 | \f0\fs24 \cf0 "+" : PLUS} 403 | 404 | Wrap 405 | NO 406 | 407 | 408 | Bounds 409 | {{900.748, 108}, {55, 14}} 410 | Class 411 | ShapedGraphic 412 | FitText 413 | YES 414 | Flow 415 | Resize 416 | ID 417 | 2 418 | Shape 419 | Rectangle 420 | Style 421 | 422 | fill 423 | 424 | Draws 425 | NO 426 | 427 | shadow 428 | 429 | Draws 430 | NO 431 | 432 | stroke 433 | 434 | Draws 435 | NO 436 | 437 | 438 | Text 439 | 440 | Text 441 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 442 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 443 | {\colortbl;\red255\green255\blue255;} 444 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 445 | 446 | \f0\fs24 \cf0 "1" : INT} 447 | 448 | Wrap 449 | NO 450 | 451 | 452 | Bounds 453 | {{804, 54}, {48, 36}} 454 | Class 455 | ShapedGraphic 456 | ID 457 | 29 458 | Shape 459 | HorizontalArrow 460 | Style 461 | 462 | shadow 463 | 464 | Draws 465 | NO 466 | 467 | 468 | 469 | 470 | Class 471 | LineGraphic 472 | Head 473 | 474 | ID 475 | 4 476 | 477 | ID 478 | 28 479 | Points 480 | 481 | {727.752, 79} 482 | {727.752, 108} 483 | 484 | Style 485 | 486 | stroke 487 | 488 | HeadArrow 489 | 0 490 | TailArrow 491 | 0 492 | 493 | 494 | Tail 495 | 496 | ID 497 | 27 498 | 499 | 500 | 501 | Bounds 502 | {{700.252, 108}, {55, 14}} 503 | Class 504 | ShapedGraphic 505 | FitText 506 | YES 507 | Flow 508 | Resize 509 | ID 510 | 4 511 | Shape 512 | Rectangle 513 | Style 514 | 515 | fill 516 | 517 | Draws 518 | NO 519 | 520 | shadow 521 | 522 | Draws 523 | NO 524 | 525 | stroke 526 | 527 | Draws 528 | NO 529 | 530 | 531 | Text 532 | 533 | Text 534 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 535 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 536 | {\colortbl;\red255\green255\blue255;} 537 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 538 | 539 | \f0\fs24 \cf0 "3" : INT} 540 | 541 | Wrap 542 | NO 543 | 544 | 545 | Class 546 | LineGraphic 547 | Head 548 | 549 | ID 550 | 22 551 | 552 | ID 553 | 25 554 | Points 555 | 556 | {711.453, 65} 557 | {643.926, 36} 558 | 559 | Style 560 | 561 | stroke 562 | 563 | HeadArrow 564 | 0 565 | TailArrow 566 | 0 567 | 568 | 569 | Tail 570 | 571 | ID 572 | 27 573 | 574 | 575 | 576 | Class 577 | LineGraphic 578 | Head 579 | 580 | ID 581 | 22 582 | 583 | ID 584 | 24 585 | Points 586 | 587 | {627.627, 108} 588 | {627.627, 36} 589 | 590 | Style 591 | 592 | stroke 593 | 594 | HeadArrow 595 | 0 596 | TailArrow 597 | 0 598 | 599 | 600 | Tail 601 | 602 | ID 603 | 19 604 | 605 | 606 | 607 | Class 608 | LineGraphic 609 | Head 610 | 611 | ID 612 | 22 613 | 614 | ID 615 | 23 616 | Points 617 | 618 | {563.214, 65} 619 | {615.102, 36} 620 | 621 | Style 622 | 623 | stroke 624 | 625 | HeadArrow 626 | 0 627 | TailArrow 628 | 0 629 | 630 | 631 | Tail 632 | 633 | ID 634 | 20 635 | 636 | 637 | 638 | Bounds 639 | {{572.627, 22}, {110, 14}} 640 | Class 641 | ShapedGraphic 642 | FitText 643 | YES 644 | Flow 645 | Resize 646 | ID 647 | 22 648 | Shape 649 | Rectangle 650 | Style 651 | 652 | fill 653 | 654 | Draws 655 | NO 656 | 657 | shadow 658 | 659 | Draws 660 | NO 661 | 662 | stroke 663 | 664 | Draws 665 | NO 666 | 667 | 668 | Text 669 | 670 | Text 671 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 672 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 673 | {\colortbl;\red255\green255\blue255;} 674 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 675 | 676 | \f0\fs24 \cf0 expression (rule 1)} 677 | 678 | Wrap 679 | NO 680 | 681 | 682 | Bounds 683 | {{516.189, 65}, {69, 14}} 684 | Class 685 | ShapedGraphic 686 | FitText 687 | YES 688 | Flow 689 | Resize 690 | ID 691 | 20 692 | Shape 693 | Rectangle 694 | Style 695 | 696 | fill 697 | 698 | Draws 699 | NO 700 | 701 | shadow 702 | 703 | Draws 704 | NO 705 | 706 | stroke 707 | 708 | Draws 709 | NO 710 | 711 | 712 | Text 713 | 714 | Text 715 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 716 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 717 | {\colortbl;\red255\green255\blue255;} 718 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 719 | 720 | \f0\fs24 \cf0 expression} 721 | 722 | Wrap 723 | NO 724 | 725 | 726 | Bounds 727 | {{594.127, 108}, {67, 14}} 728 | Class 729 | ShapedGraphic 730 | FitText 731 | YES 732 | Flow 733 | Resize 734 | ID 735 | 19 736 | Shape 737 | Rectangle 738 | Style 739 | 740 | fill 741 | 742 | Draws 743 | NO 744 | 745 | shadow 746 | 747 | Draws 748 | NO 749 | 750 | stroke 751 | 752 | Draws 753 | NO 754 | 755 | 756 | Text 757 | 758 | Text 759 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 760 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 761 | {\colortbl;\red255\green255\blue255;} 762 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 763 | 764 | \f0\fs24 \cf0 "+" : PLUS} 765 | 766 | Wrap 767 | NO 768 | 769 | 770 | Bounds 771 | {{446, 54}, {48, 36}} 772 | Class 773 | ShapedGraphic 774 | ID 775 | 18 776 | Shape 777 | HorizontalArrow 778 | Style 779 | 780 | shadow 781 | 782 | Draws 783 | NO 784 | 785 | 786 | 787 | 788 | Bounds 789 | {{126, 54}, {48, 36}} 790 | Class 791 | ShapedGraphic 792 | ID 793 | 17 794 | Shape 795 | HorizontalArrow 796 | Style 797 | 798 | shadow 799 | 800 | Draws 801 | NO 802 | 803 | 804 | 805 | 806 | Bounds 807 | {{36, 22}, {69, 14}} 808 | Class 809 | ShapedGraphic 810 | FitText 811 | YES 812 | Flow 813 | Resize 814 | ID 815 | 15 816 | Shape 817 | Rectangle 818 | Style 819 | 820 | fill 821 | 822 | Draws 823 | NO 824 | 825 | shadow 826 | 827 | Draws 828 | NO 829 | 830 | stroke 831 | 832 | Draws 833 | NO 834 | 835 | 836 | Text 837 | 838 | Text 839 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 840 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 841 | {\colortbl;\red255\green255\blue255;} 842 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 843 | 844 | \f0\fs24 \cf0 expression} 845 | 846 | Wrap 847 | NO 848 | 849 | 850 | Class 851 | LineGraphic 852 | Head 853 | 854 | ID 855 | 7 856 | 857 | ID 858 | 14 859 | Points 860 | 861 | {376.349, 65} 862 | {322.648, 36} 863 | 864 | Style 865 | 866 | stroke 867 | 868 | HeadArrow 869 | 0 870 | TailArrow 871 | 0 872 | 873 | 874 | Tail 875 | 876 | ID 877 | 6 878 | 879 | 880 | 881 | Class 882 | LineGraphic 883 | Head 884 | 885 | ID 886 | 7 887 | 888 | ID 889 | 12 890 | Points 891 | 892 | {309.686, 108} 893 | {309.686, 36} 894 | 895 | Style 896 | 897 | stroke 898 | 899 | HeadArrow 900 | 0 901 | TailArrow 902 | 0 903 | 904 | 905 | Tail 906 | 907 | ID 908 | 3 909 | 910 | 911 | 912 | Class 913 | LineGraphic 914 | Head 915 | 916 | ID 917 | 7 918 | 919 | ID 920 | 11 921 | Points 922 | 923 | {245.273, 65} 924 | {297.161, 36} 925 | 926 | Style 927 | 928 | stroke 929 | 930 | HeadArrow 931 | 0 932 | TailArrow 933 | 0 934 | 935 | 936 | Tail 937 | 938 | ID 939 | 5 940 | 941 | 942 | 943 | Bounds 944 | {{254.686, 22}, {110, 14}} 945 | Class 946 | ShapedGraphic 947 | FitText 948 | YES 949 | Flow 950 | Resize 951 | ID 952 | 7 953 | Shape 954 | Rectangle 955 | Style 956 | 957 | fill 958 | 959 | Draws 960 | NO 961 | 962 | shadow 963 | 964 | Draws 965 | NO 966 | 967 | stroke 968 | 969 | Draws 970 | NO 971 | 972 | 973 | Text 974 | 975 | Text 976 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 977 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 978 | {\colortbl;\red255\green255\blue255;} 979 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 980 | 981 | \f0\fs24 \cf0 expression (rule 1)} 982 | 983 | Wrap 984 | NO 985 | 986 | 987 | Bounds 988 | {{354.811, 65}, {69, 14}} 989 | Class 990 | ShapedGraphic 991 | FitText 992 | YES 993 | Flow 994 | Resize 995 | ID 996 | 6 997 | Shape 998 | Rectangle 999 | Style 1000 | 1001 | fill 1002 | 1003 | Draws 1004 | NO 1005 | 1006 | shadow 1007 | 1008 | Draws 1009 | NO 1010 | 1011 | stroke 1012 | 1013 | Draws 1014 | NO 1015 | 1016 | 1017 | Text 1018 | 1019 | Text 1020 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 1021 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 1022 | {\colortbl;\red255\green255\blue255;} 1023 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 1024 | 1025 | \f0\fs24 \cf0 expression} 1026 | 1027 | Wrap 1028 | NO 1029 | 1030 | 1031 | Bounds 1032 | {{198.248, 65}, {69, 14}} 1033 | Class 1034 | ShapedGraphic 1035 | FitText 1036 | YES 1037 | Flow 1038 | Resize 1039 | ID 1040 | 5 1041 | Shape 1042 | Rectangle 1043 | Style 1044 | 1045 | fill 1046 | 1047 | Draws 1048 | NO 1049 | 1050 | shadow 1051 | 1052 | Draws 1053 | NO 1054 | 1055 | stroke 1056 | 1057 | Draws 1058 | NO 1059 | 1060 | 1061 | Text 1062 | 1063 | Text 1064 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 1065 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 1066 | {\colortbl;\red255\green255\blue255;} 1067 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 1068 | 1069 | \f0\fs24 \cf0 expression} 1070 | 1071 | Wrap 1072 | NO 1073 | 1074 | 1075 | Bounds 1076 | {{276.186, 108}, {67, 14}} 1077 | Class 1078 | ShapedGraphic 1079 | FitText 1080 | YES 1081 | Flow 1082 | Resize 1083 | ID 1084 | 3 1085 | Shape 1086 | Rectangle 1087 | Style 1088 | 1089 | fill 1090 | 1091 | Draws 1092 | NO 1093 | 1094 | shadow 1095 | 1096 | Draws 1097 | NO 1098 | 1099 | stroke 1100 | 1101 | Draws 1102 | NO 1103 | 1104 | 1105 | Text 1106 | 1107 | Text 1108 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 1109 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 1110 | {\colortbl;\red255\green255\blue255;} 1111 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 1112 | 1113 | \f0\fs24 \cf0 "+" : PLUS} 1114 | 1115 | Wrap 1116 | NO 1117 | 1118 | 1119 | Bounds 1120 | {{672.752, 65}, {110, 14}} 1121 | Class 1122 | ShapedGraphic 1123 | FitText 1124 | YES 1125 | Flow 1126 | Resize 1127 | ID 1128 | 27 1129 | Shape 1130 | Rectangle 1131 | Style 1132 | 1133 | fill 1134 | 1135 | Draws 1136 | NO 1137 | 1138 | shadow 1139 | 1140 | Draws 1141 | NO 1142 | 1143 | stroke 1144 | 1145 | Draws 1146 | NO 1147 | 1148 | 1149 | Text 1150 | 1151 | Text 1152 | {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf440 1153 | {\fonttbl\f0\fswiss\fcharset77 Helvetica;} 1154 | {\colortbl;\red255\green255\blue255;} 1155 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural 1156 | 1157 | \f0\fs24 \cf0 expression (rule 2)} 1158 | 1159 | Wrap 1160 | NO 1161 | 1162 | 1163 | GridInfo 1164 | 1165 | GuidesLocked 1166 | NO 1167 | GuidesVisible 1168 | YES 1169 | HPages 1170 | 2 1171 | ImageCounter 1172 | 1 1173 | IsPalette 1174 | NO 1175 | KeepToScale 1176 | 1177 | Layers 1178 | 1179 | 1180 | Lock 1181 | NO 1182 | Name 1183 | Layer 1 1184 | Print 1185 | YES 1186 | View 1187 | YES 1188 | 1189 | 1190 | LayoutInfo 1191 | 1192 | LinksVisible 1193 | NO 1194 | MagnetsVisible 1195 | NO 1196 | MasterSheet 1197 | Master 1 1198 | MasterSheets 1199 | 1200 | 1201 | ActiveLayerIndex 1202 | 0 1203 | AutoAdjust 1204 | 1205 | CanvasColor 1206 | 1207 | w 1208 | 1 1209 | 1210 | CanvasOrigin 1211 | {0, 0} 1212 | CanvasScale 1213 | 1 1214 | ColumnAlign 1215 | 1 1216 | ColumnSpacing 1217 | 36 1218 | DisplayScale 1219 | 1 in = 1 in 1220 | GraphicsList 1221 | 1222 | GridInfo 1223 | 1224 | HPages 1225 | 1 1226 | IsPalette 1227 | NO 1228 | KeepToScale 1229 | 1230 | Layers 1231 | 1232 | 1233 | Lock 1234 | NO 1235 | Name 1236 | Layer 1 1237 | Print 1238 | YES 1239 | View 1240 | YES 1241 | 1242 | 1243 | LayoutInfo 1244 | 1245 | Orientation 1246 | 2 1247 | OutlineStyle 1248 | Basic 1249 | RowAlign 1250 | 1 1251 | RowSpacing 1252 | 36 1253 | SheetTitle 1254 | Master 1 1255 | UniqueID 1256 | 1 1257 | VPages 1258 | 1 1259 | 1260 | 1261 | ModificationDate 1262 | 2008-09-03 09:47:27 -0600 1263 | Modifier 1264 | Jeremy Siek 1265 | NotesVisible 1266 | NO 1267 | Orientation 1268 | 2 1269 | OriginVisible 1270 | NO 1271 | OutlineStyle 1272 | Basic 1273 | PageBreaks 1274 | YES 1275 | PrintInfo 1276 | 1277 | NSBottomMargin 1278 | 1279 | float 1280 | 0 1281 | 1282 | NSLeftMargin 1283 | 1284 | float 1285 | 0 1286 | 1287 | NSPaperSize 1288 | 1289 | size 1290 | {612, 792} 1291 | 1292 | NSRightMargin 1293 | 1294 | float 1295 | 0 1296 | 1297 | NSTopMargin 1298 | 1299 | float 1300 | 0 1301 | 1302 | 1303 | ReadOnly 1304 | NO 1305 | RowAlign 1306 | 1 1307 | RowSpacing 1308 | 36 1309 | SheetTitle 1310 | Canvas 1 1311 | SmartAlignmentGuidesActive 1312 | YES 1313 | SmartDistanceGuidesActive 1314 | YES 1315 | UniqueID 1316 | 1 1317 | UseEntirePage 1318 | 1319 | VPages 1320 | 1 1321 | WindowInfo 1322 | 1323 | CurrentSheet 1324 | 0 1325 | DrawerOpen 1326 | 1327 | DrawerTab 1328 | Outline 1329 | DrawerWidth 1330 | 209 1331 | FitInWindow 1332 | 1333 | Frame 1334 | {{562, 375}, {921, 771}} 1335 | ShowRuler 1336 | 1337 | ShowStatusBar 1338 | 1339 | VisibleRegion 1340 | {{270, 0}, {906, 657}} 1341 | Zoom 1342 | 1 1343 | 1344 | 1345 | 1346 | -------------------------------------------------------------------------------- /figs/shift-reduce-conflict.graffle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ActiveLayerIndex 6 | 0 7 | ApplicationVersion 8 | 9 | com.omnigroup.OmniGraffle6 10 | 169.23.0.276662 11 | 12 | AutoAdjust 13 | 14 | BackgroundGraphic 15 | 16 | Bounds 17 | {{0, 0}, {588.018798828125, 768.018798828125}} 18 | Class 19 | SolidGraphic 20 | ID 21 | 2 22 | Style 23 | 24 | stroke 25 | 26 | Draws 27 | NO 28 | 29 | 30 | 31 | BaseZoom 32 | 0 33 | CanvasOrigin 34 | {0, 0} 35 | ColumnAlign 36 | 1 37 | ColumnSpacing 38 | 36 39 | CreationDate 40 | 2007-09-02 01:52:53 +0000 41 | Creator 42 | Jeremy Siek 43 | DisplayScale 44 | 1 in = 1 in 45 | GraphDocumentVersion 46 | 12 47 | GraphicsList 48 | 49 | 50 | Bounds 51 | {{308.13159999999999, 451.19816805590568}, {189, 140}} 52 | Class 53 | ShapedGraphic 54 | FitText 55 | Vertical 56 | Flow 57 | Resize 58 | ID 59 | 41 60 | Style 61 | 62 | fill 63 | 64 | Draws 65 | NO 66 | 67 | shadow 68 | 69 | Draws 70 | NO 71 | 72 | 73 | Text 74 | 75 | Align 76 | 0 77 | Text 78 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 79 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 80 | {\colortbl;\red255\green255\blue255;} 81 | {\*\expandedcolortbl;;} 82 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 83 | 84 | \f0\b\fs24 \cf0 \ul \ulc0 Action 85 | \f1\b0 \ulnone \ 86 | shift to state 1\ 87 | shift to state 4\ 88 | reduce by rule 3 to state 1, goto 3\ 89 | shift to state 5\ 90 | shift to state 4\ 91 | reduce by rule 3 to state 5, goto 6\ 92 | reduce by rule 2 to state 1, goto 3\ 93 | reduce by rule 1 to state 0, goto 2\ 94 | accept} 95 | VerticalPad 96 | 0.0 97 | 98 | 99 | 100 | Bounds 101 | {{215.13160000000002, 451.19816805590568}, {93, 140}} 102 | Class 103 | ShapedGraphic 104 | FitText 105 | Vertical 106 | Flow 107 | Resize 108 | ID 109 | 40 110 | Style 111 | 112 | fill 113 | 114 | Draws 115 | NO 116 | 117 | shadow 118 | 119 | Draws 120 | NO 121 | 122 | 123 | Text 124 | 125 | Align 126 | 0 127 | Text 128 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 129 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 130 | {\colortbl;\red255\green255\blue255;} 131 | {\*\expandedcolortbl;;} 132 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 133 | 134 | \f0\b\fs24 \cf0 \ul \ulc0 Input 135 | \f1\b0 \ulnone \ 136 | 'print 1 + 2'\ 137 | '1 + 2'\ 138 | '+ 2'\ 139 | '+ 2'\ 140 | '2'\ 141 | ''\ 142 | ''\ 143 | ''\ 144 | ''} 145 | VerticalPad 146 | 0.0 147 | 148 | 149 | 150 | Bounds 151 | {{21.069600000000001, 451.19816805590568}, {194.06180000000001, 140}} 152 | Class 153 | ShapedGraphic 154 | FitText 155 | Vertical 156 | Flow 157 | Resize 158 | ID 159 | 39 160 | Style 161 | 162 | fill 163 | 164 | Draws 165 | NO 166 | 167 | shadow 168 | 169 | Draws 170 | NO 171 | 172 | 173 | Text 174 | 175 | Align 176 | 0 177 | Text 178 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 179 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 180 | {\colortbl;\red255\green255\blue255;} 181 | {\*\expandedcolortbl;;} 182 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 183 | 184 | \f0\b\fs24 \cf0 \ul \ulc0 Stack 185 | \f1\b0 \ulnone \ 186 | []\ 187 | [(1,"print")]\ 188 | [(1,"print"),(4,INT)]\ 189 | [(1,"print"),(3,exp)]\ 190 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 191 | \cf0 [(1,"print"),(3,exp),(5,+)]\ 192 | [(1,"print"),(3,exp),(5,+),(4,INT)]\ 193 | [(1,"print"),(3,exp),(5,+),(6,exp)]\ 194 | [(1,"print"),(3,exp)]\ 195 | [(2,stmt)]} 196 | VerticalPad 197 | 0.0 198 | 199 | 200 | 201 | Bounds 202 | {{21.069600000000001, 437.19816805590568}, {176, 14}} 203 | Class 204 | ShapedGraphic 205 | FitText 206 | YES 207 | Flow 208 | Resize 209 | ID 210 | 38 211 | Style 212 | 213 | fill 214 | 215 | Draws 216 | NO 217 | 218 | shadow 219 | 220 | Draws 221 | NO 222 | 223 | stroke 224 | 225 | Draws 226 | NO 227 | 228 | 229 | Text 230 | 231 | Text 232 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 233 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;} 234 | {\colortbl;\red255\green255\blue255;} 235 | {\*\expandedcolortbl;;} 236 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 237 | 238 | \f0\b\fs24 \cf0 Example parse of 'print 1 + 2'} 239 | VerticalPad 240 | 0.0 241 | 242 | Wrap 243 | NO 244 | 245 | 246 | Bounds 247 | {{6.9304199999999998, 8}, {124, 70}} 248 | Class 249 | ShapedGraphic 250 | FitText 251 | YES 252 | Flow 253 | Resize 254 | ID 255 | 36 256 | Style 257 | 258 | fill 259 | 260 | Draws 261 | NO 262 | 263 | shadow 264 | 265 | Draws 266 | NO 267 | 268 | stroke 269 | 270 | Width 271 | 2 272 | 273 | 274 | Text 275 | 276 | Align 277 | 0 278 | Text 279 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 280 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 281 | {\colortbl;\red255\green255\blue255;} 282 | {\*\expandedcolortbl;;} 283 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 284 | 285 | \f0\fs24 \cf0 Grammar:\ 286 | 0. start ::= stmt\ 287 | 1. stmt ::= \'93print\'94 exp\ 288 | 2. exp ::= exp \'93+\'94 exp\ 289 | 3. exp ::= INT} 290 | VerticalPad 291 | 0.0 292 | 293 | Wrap 294 | NO 295 | 296 | 297 | Bounds 298 | {{186.75255414798218, 396.11162722642376}, {61, 14}} 299 | Class 300 | ShapedGraphic 301 | FitText 302 | YES 303 | Flow 304 | Resize 305 | FontInfo 306 | 307 | Color 308 | 309 | b 310 | 0 311 | g 312 | 0 313 | r 314 | 0 315 | 316 | Font 317 | Helvetica 318 | Size 319 | 12 320 | 321 | ID 322 | 30 323 | Line 324 | 325 | ID 326 | 28 327 | Position 328 | 0.13972456753253937 329 | RotationType 330 | 0 331 | 332 | Style 333 | 334 | shadow 335 | 336 | Draws 337 | NO 338 | 339 | stroke 340 | 341 | Draws 342 | NO 343 | 344 | 345 | Text 346 | 347 | RTFD 348 | 349 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 350 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 351 | bmcBlIQBKwoiKyIsIHNoaWZ0hoQCaUkBCpKEhIQMTlNE 352 | aWN0aW9uYXJ5AJSEAWkDkoSWlgdOU0NvbG9yhpKEhIQH 353 | TlNDb2xvcgCUhAFjAYQEZmZmZgAAAAGGkoSWlhBOU1Bh 354 | cmFncmFwaFN0eWxlhpKEhIQXTlNNdXRhYmxlUGFyYWdy 355 | YXBoU3R5bGUAhIQQTlNQYXJhZ3JhcGhTdHlsZQCUhARD 356 | Q0BTAgCEhIQHTlNBcnJheQCUmQyShISECU5TVGV4dFRh 357 | YgCUhAJDZgAchpKEo6IAOIaShKOiAFSGkoSjogBwhpKE 358 | o6IAgYwAhpKEo6IAgagAhpKEo6IAgcQAhpKEo6IAgeAA 359 | hpKEo6IAgfwAhpKEo6IAgRgBhpKEo6IAgTQBhpKEo6IA 360 | gVABhoYAhpKElpYGTlNGb250hpKEhIQGTlNGb250HpSZ 361 | KIQFWzQwY10GAAAAHgAAAP/+SABlAGwAdgBlAHQAaQBj 362 | AGEALQBCAG8AbABkAAAAhAFmDJsAmwGbAJsAhoaG 363 | 364 | Text 365 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 366 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;} 367 | {\colortbl;\red255\green255\blue255;\red0\green0\blue0;} 368 | {\*\expandedcolortbl;;\cssrgb\c0\c0\c0;} 369 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 370 | 371 | \f0\b\fs24 \cf2 "+", shift} 372 | VerticalPad 373 | 0.0 374 | 375 | Wrap 376 | NO 377 | 378 | 379 | Class 380 | LineGraphic 381 | Head 382 | 383 | ID 384 | 16 385 | 386 | ID 387 | 28 388 | Points 389 | 390 | {206.9408186443008, 391.12150637740746} 391 | {240.93000000000001, 421.387} 392 | {295.38191220546872, 391.03245543105913} 393 | 394 | Style 395 | 396 | shadow 397 | 398 | Draws 399 | NO 400 | 401 | stroke 402 | 403 | HeadArrow 404 | FilledArrow 405 | Legacy 406 | 407 | LineType 408 | 1 409 | TailArrow 410 | 0 411 | 412 | 413 | Tail 414 | 415 | ID 416 | 24 417 | 418 | 419 | 420 | Bounds 421 | {{313.51897408719032, 411.68510098106117}, {60, 14}} 422 | Class 423 | ShapedGraphic 424 | FitText 425 | YES 426 | Flow 427 | Resize 428 | FontInfo 429 | 430 | Font 431 | Helvetica 432 | Size 433 | 12 434 | 435 | ID 436 | 26 437 | Line 438 | 439 | ID 440 | 25 441 | Position 442 | 0.17646275460720062 443 | RotationType 444 | 0 445 | 446 | Style 447 | 448 | shadow 449 | 450 | Draws 451 | NO 452 | 453 | stroke 454 | 455 | Draws 456 | NO 457 | 458 | 459 | Text 460 | 461 | Text 462 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 463 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 464 | {\colortbl;\red255\green255\blue255;} 465 | {\*\expandedcolortbl;;} 466 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 467 | 468 | \f0\fs24 \cf0 exp, goto} 469 | VerticalPad 470 | 0.0 471 | 472 | Wrap 473 | NO 474 | 475 | 476 | Class 477 | LineGraphic 478 | Head 479 | 480 | ID 481 | 24 482 | 483 | ID 484 | 25 485 | Points 486 | 487 | {344.20929342477388, 391.25860591833538} 488 | {332.82999999999998, 422.387} 489 | {223.65242880066489, 374.45977971637694} 490 | 491 | Style 492 | 493 | shadow 494 | 495 | Draws 496 | NO 497 | 498 | stroke 499 | 500 | HeadArrow 501 | FilledArrow 502 | Legacy 503 | 504 | LineType 505 | 1 506 | TailArrow 507 | 0 508 | 509 | 510 | Tail 511 | 512 | ID 513 | 16 514 | 515 | 516 | 517 | Bounds 518 | {{84.375, 296.78899999999999}, {138.81960000000007, 94}} 519 | Class 520 | ShapedGraphic 521 | FontInfo 522 | 523 | Color 524 | 525 | b 526 | 0 527 | g 528 | 0 529 | r 530 | 0 531 | 532 | 533 | ID 534 | 24 535 | Style 536 | 537 | shadow 538 | 539 | Draws 540 | NO 541 | 542 | 543 | Text 544 | 545 | Align 546 | 0 547 | RTFD 548 | 549 | BAtzdHJlYW10eXBlZIHoA4QBQISEhBJOU0F0dHJpYnV0 550 | ZWRTdHJpbmcAhIQITlNPYmplY3QAhZKEhIQITlNTdHJp 551 | bmcBlIQBK2BTdGF0ZSA2CmV4cCA6Oj0gZXhwICIrIiBl 552 | eHAgLgpleHAgOjo9IGV4cCAuICIrIiBleHAKCmVuZCwg 553 | cmVkdWNlIGJ5IHJ1bGUgMgoiKyIsIHJlZHVjZSBieSBy 554 | dWxlIDKGhAJpSQEHkoSEhAxOU0RpY3Rpb25hcnkAlIQB 555 | aQSShJaWEE5TUGFyYWdyYXBoU3R5bGWGkoSEhBdOU011 556 | dGFibGVQYXJhZ3JhcGhTdHlsZQCEhBBOU1BhcmFncmFw 557 | aFN0eWxlAJSEBENDQFMAAISEhAdOU0FycmF5AJSZDJKE 558 | hIQJTlNUZXh0VGFiAJSEAkNmAByGkoSgnwA4hpKEoJ8A 559 | VIaShKCfAHCGkoSgnwCBjACGkoSgnwCBqACGkoSgnwCB 560 | xACGkoSgnwCB4ACGkoSgnwCB/ACGkoSgnwCBGAGGkoSg 561 | nwCBNAGGkoSgnwCBUAGGhgCGkoSWlhBOU1VuZGVybGlu 562 | ZUNvbG9yhpKEhIQHTlNDb2xvcgCUhAFjA4QCZmYAAYaS 563 | hJaWC05TVW5kZXJsaW5lhpKEhIQITlNOdW1iZXIAhIQH 564 | TlNWYWx1ZQCUhAEqhIQBcaYBhpKElpYGTlNGb250hpKE 565 | hIQGTlNGb250HpSZKIQFWzQwY10GAAAAHgAAAP/+SABl 566 | AGwAdgBlAHQAaQBjAGEALQBCAG8AbABkAAAAhAFmDKEA 567 | oQGhAKEAhoaXAkSShJiZA5Kskq2SmZKakrSShLaZHIQF 568 | WzI4Y10GAAAAFAAAAP/+SABlAGwAdgBlAHQAaQBjAGEA 569 | qQyhAKEBoQChAIaGlwMVkoSYmQSStJK1kpmShJucAACE 570 | npkMkp+SoZKikqOSpJKlkqaSp5KokqmSqpKrhgCGkqyS 571 | rZKElpYHTlNDb2xvcoaShK6hAYQEZmZmZgAAAAGGhoY= 572 | 573 | Text 574 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 575 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 576 | {\colortbl;\red255\green255\blue255;\red0\green0\blue0;} 577 | {\*\expandedcolortbl;;\cssrgb\c0\c0\c0;} 578 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 579 | 580 | \f0\b\fs24 \cf0 \ul \ulc0 State 6 581 | \f1\b0 \ulnone \ 582 | exp ::= exp "+" exp .\ 583 | exp ::= exp . "+" exp\ 584 | \ 585 | end, reduce by rule 2\ 586 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 587 | 588 | \f0\b \cf2 "+", reduce by rule 2} 589 | VerticalPad 590 | 0.0 591 | 592 | 593 | 594 | Bounds 595 | {{345.24725535179027, 284.44919883778113}, {55, 14}} 596 | Class 597 | ShapedGraphic 598 | FitText 599 | YES 600 | Flow 601 | Resize 602 | FontInfo 603 | 604 | Font 605 | Helvetica 606 | Size 607 | 12 608 | 609 | ID 610 | 20 611 | Line 612 | 613 | ID 614 | 19 615 | Position 616 | 0.45416185259819031 617 | RotationType 618 | 0 619 | 620 | Style 621 | 622 | shadow 623 | 624 | Draws 625 | NO 626 | 627 | stroke 628 | 629 | Draws 630 | NO 631 | 632 | 633 | Text 634 | 635 | Text 636 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 637 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 638 | {\colortbl;\red255\green255\blue255;} 639 | {\*\expandedcolortbl;;} 640 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 641 | 642 | \f0\fs24 \cf0 "+", shift} 643 | VerticalPad 644 | 0.0 645 | 646 | Wrap 647 | NO 648 | 649 | 650 | Class 651 | LineGraphic 652 | Head 653 | 654 | ID 655 | 16 656 | 657 | ID 658 | 19 659 | Points 660 | 661 | {379.08911933179019, 265.77745757128127} 662 | {365.50423363666948, 322.30417128716539} 663 | 664 | Style 665 | 666 | shadow 667 | 668 | Draws 669 | NO 670 | 671 | stroke 672 | 673 | HeadArrow 674 | FilledArrow 675 | Legacy 676 | 677 | TailArrow 678 | 0 679 | 680 | 681 | Tail 682 | 683 | ID 684 | 10 685 | 686 | 687 | 688 | Bounds 689 | {{273.72281587911232, 289.5436733345519}, {57, 14}} 690 | Class 691 | ShapedGraphic 692 | FitText 693 | YES 694 | Flow 695 | Resize 696 | FontInfo 697 | 698 | Font 699 | Helvetica 700 | Size 701 | 12 702 | 703 | ID 704 | 18 705 | Line 706 | 707 | ID 708 | 17 709 | Position 710 | 0.45588919520378113 711 | RotationType 712 | 0 713 | 714 | Style 715 | 716 | shadow 717 | 718 | Draws 719 | NO 720 | 721 | stroke 722 | 723 | Draws 724 | NO 725 | 726 | 727 | Text 728 | 729 | Text 730 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 731 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 732 | {\colortbl;\red255\green255\blue255;} 733 | {\*\expandedcolortbl;;} 734 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 735 | 736 | \f0\fs24 \cf0 INT, shift} 737 | VerticalPad 738 | 0.0 739 | 740 | Wrap 741 | NO 742 | 743 | 744 | Class 745 | LineGraphic 746 | Head 747 | 748 | ID 749 | 11 750 | 751 | ID 752 | 17 753 | Points 754 | 755 | {325.70660922935861, 322.41826462523846} 756 | {274.34499419231014, 265.66122190033178} 757 | 758 | Style 759 | 760 | shadow 761 | 762 | Draws 763 | NO 764 | 765 | stroke 766 | 767 | HeadArrow 768 | FilledArrow 769 | Legacy 770 | 771 | TailArrow 772 | 0 773 | 774 | 775 | Tail 776 | 777 | ID 778 | 16 779 | 780 | 781 | 782 | Bounds 783 | {{294.80999999999995, 322.78899999999999}, {124, 68}} 784 | Class 785 | ShapedGraphic 786 | ID 787 | 16 788 | Style 789 | 790 | shadow 791 | 792 | Draws 793 | NO 794 | 795 | 796 | Text 797 | 798 | Align 799 | 0 800 | Text 801 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 802 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 803 | {\colortbl;\red255\green255\blue255;} 804 | {\*\expandedcolortbl;;} 805 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 806 | 807 | \f0\b\fs24 \cf0 \ul \ulc0 State 5 808 | \f1\b0 \ulnone \ 809 | exp ::= exp "+" . exp\ 810 | exp ::= . exp "+" exp\ 811 | exp ::= . INT} 812 | VerticalPad 813 | 0.0 814 | 815 | 816 | 817 | Bounds 818 | {{345.36728813394535, 151.1869500536155}, {60, 14}} 819 | Class 820 | ShapedGraphic 821 | FitText 822 | YES 823 | Flow 824 | Resize 825 | FontInfo 826 | 827 | Font 828 | Helvetica 829 | Size 830 | 12 831 | 832 | ID 833 | 15 834 | Line 835 | 836 | ID 837 | 14 838 | Position 839 | 0.31142687797546387 840 | RotationType 841 | 0 842 | 843 | Style 844 | 845 | shadow 846 | 847 | Draws 848 | NO 849 | 850 | stroke 851 | 852 | Draws 853 | NO 854 | 855 | 856 | Text 857 | 858 | Text 859 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 860 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 861 | {\colortbl;\red255\green255\blue255;} 862 | {\*\expandedcolortbl;;} 863 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 864 | 865 | \f0\fs24 \cf0 exp, goto} 866 | VerticalPad 867 | 0.0 868 | 869 | Wrap 870 | NO 871 | 872 | 873 | Class 874 | LineGraphic 875 | Head 876 | 877 | ID 878 | 10 879 | 880 | ID 881 | 14 882 | Points 883 | 884 | {373.07560003032933, 146.19090253321772} 885 | {381.05581821514761, 184.70894890504354} 886 | 887 | Style 888 | 889 | shadow 890 | 891 | Draws 892 | NO 893 | 894 | stroke 895 | 896 | HeadArrow 897 | FilledArrow 898 | Legacy 899 | 900 | TailArrow 901 | 0 902 | 903 | 904 | Tail 905 | 906 | ID 907 | 3 908 | 909 | 910 | 911 | Bounds 912 | {{281.87742778354777, 153.87706345732582}, {57, 14}} 913 | Class 914 | ShapedGraphic 915 | FitText 916 | YES 917 | Flow 918 | Resize 919 | FontInfo 920 | 921 | Font 922 | Helvetica 923 | Size 924 | 12 925 | 926 | ID 927 | 13 928 | Line 929 | 930 | ID 931 | 12 932 | Position 933 | 0.38223019242286682 934 | RotationType 935 | 0 936 | 937 | Style 938 | 939 | shadow 940 | 941 | Draws 942 | NO 943 | 944 | stroke 945 | 946 | Draws 947 | NO 948 | 949 | 950 | Text 951 | 952 | Text 953 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 954 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 955 | {\colortbl;\red255\green255\blue255;} 956 | {\*\expandedcolortbl;;} 957 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 958 | 959 | \f0\fs24 \cf0 INT, shift} 960 | VerticalPad 961 | 0.0 962 | 963 | Wrap 964 | NO 965 | 966 | 967 | Class 968 | LineGraphic 969 | Head 970 | 971 | ID 972 | 11 973 | 974 | ID 975 | 12 976 | Points 977 | 978 | {327.21263468634334, 146.03302985985863} 979 | {283.41514482990004, 184.86944287789356} 980 | 981 | Style 982 | 983 | shadow 984 | 985 | Draws 986 | NO 987 | 988 | stroke 989 | 990 | HeadArrow 991 | FilledArrow 992 | Legacy 993 | 994 | TailArrow 995 | 0 996 | 997 | 998 | Tail 999 | 1000 | ID 1001 | 3 1002 | 1003 | 1004 | 1005 | Bounds 1006 | {{152.59299999999999, 185.19999999999999}, {170, 80.091300000000004}} 1007 | Class 1008 | ShapedGraphic 1009 | ID 1010 | 11 1011 | Style 1012 | 1013 | shadow 1014 | 1015 | Draws 1016 | NO 1017 | 1018 | 1019 | Text 1020 | 1021 | Align 1022 | 0 1023 | Text 1024 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 1025 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 1026 | {\colortbl;\red255\green255\blue255;} 1027 | {\*\expandedcolortbl;;} 1028 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 1029 | 1030 | \f0\b\fs24 \cf0 \ul \ulc0 State 4 1031 | \f1\b0 \ulnone \ 1032 | exp ::= INT .\ 1033 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 1034 | \cf0 \ 1035 | end, reduce by rule 3\ 1036 | "+", reduce by rule 3} 1037 | VerticalPad 1038 | 0.0 1039 | 1040 | 1041 | 1042 | Bounds 1043 | {{326.82999999999993, 185.19999999999999}, {124, 80.091300000000004}} 1044 | Class 1045 | ShapedGraphic 1046 | ID 1047 | 10 1048 | Style 1049 | 1050 | shadow 1051 | 1052 | Draws 1053 | NO 1054 | 1055 | 1056 | Text 1057 | 1058 | Align 1059 | 0 1060 | Text 1061 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 1062 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 1063 | {\colortbl;\red255\green255\blue255;} 1064 | {\*\expandedcolortbl;;} 1065 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 1066 | 1067 | \f0\b\fs24 \cf0 \ul \ulc0 State 3 1068 | \f1\b0 \ulnone \ 1069 | stmt ::="print" exp .\ 1070 | exp ::= exp . "+" exp\ 1071 | \ 1072 | end, reduce by rule 1} 1073 | VerticalPad 1074 | 0.0 1075 | 1076 | 1077 | 1078 | Bounds 1079 | {{58.698604288403899, 150.123735864352}, {63, 14}} 1080 | Class 1081 | ShapedGraphic 1082 | FitText 1083 | YES 1084 | Flow 1085 | Resize 1086 | FontInfo 1087 | 1088 | Font 1089 | Helvetica 1090 | Size 1091 | 12 1092 | 1093 | ID 1094 | 9 1095 | Line 1096 | 1097 | ID 1098 | 8 1099 | Position 1100 | 0.44184160232543945 1101 | RotationType 1102 | 0 1103 | 1104 | Style 1105 | 1106 | shadow 1107 | 1108 | Draws 1109 | NO 1110 | 1111 | stroke 1112 | 1113 | Draws 1114 | NO 1115 | 1116 | 1117 | Text 1118 | 1119 | Text 1120 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 1121 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 1122 | {\colortbl;\red255\green255\blue255;} 1123 | {\*\expandedcolortbl;;} 1124 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 1125 | 1126 | \f0\fs24 \cf0 stmt, goto} 1127 | VerticalPad 1128 | 0.0 1129 | 1130 | Wrap 1131 | NO 1132 | 1133 | 1134 | Class 1135 | LineGraphic 1136 | Head 1137 | 1138 | ID 1139 | 7 1140 | 1141 | ID 1142 | 8 1143 | Points 1144 | 1145 | {94.824951687395568, 137.87295834640142} 1146 | {84.354359783094935, 181.44236681861972} 1147 | 1148 | Style 1149 | 1150 | shadow 1151 | 1152 | Draws 1153 | NO 1154 | 1155 | stroke 1156 | 1157 | HeadArrow 1158 | FilledArrow 1159 | Legacy 1160 | 1161 | TailArrow 1162 | 0 1163 | 1164 | 1165 | Tail 1166 | 1167 | ID 1168 | 42 1169 | 1170 | 1171 | 1172 | Bounds 1173 | {{21.069600000000001, 183.387}, {116.74299999999999, 37}} 1174 | Class 1175 | ShapedGraphic 1176 | ID 1177 | 7 1178 | Style 1179 | 1180 | shadow 1181 | 1182 | Draws 1183 | NO 1184 | 1185 | stroke 1186 | 1187 | GapRatio 1188 | 0.5 1189 | Width 1190 | 4 1191 | 1192 | 1193 | Text 1194 | 1195 | Align 1196 | 0 1197 | Text 1198 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 1199 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 1200 | {\colortbl;\red255\green255\blue255;} 1201 | {\*\expandedcolortbl;;} 1202 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 1203 | 1204 | \f0\b\fs24 \cf0 \ul \ulc0 State 2 1205 | \f1\b0 \ulnone \ 1206 | start ::= stmt .} 1207 | VerticalPad 1208 | 0.0 1209 | 1210 | 1211 | 1212 | Bounds 1213 | {{209.41963498747648, 104.09973501235491}, {71, 14}} 1214 | Class 1215 | ShapedGraphic 1216 | FitText 1217 | YES 1218 | Flow 1219 | Resize 1220 | FontInfo 1221 | 1222 | Font 1223 | Helvetica 1224 | Size 1225 | 12 1226 | 1227 | ID 1228 | 6 1229 | Line 1230 | 1231 | ID 1232 | 5 1233 | Position 1234 | 0.45317202806472778 1235 | RotationType 1236 | 0 1237 | 1238 | Style 1239 | 1240 | shadow 1241 | 1242 | Draws 1243 | NO 1244 | 1245 | stroke 1246 | 1247 | Draws 1248 | NO 1249 | 1250 | 1251 | Text 1252 | 1253 | Text 1254 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 1255 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 1256 | {\colortbl;\red255\green255\blue255;} 1257 | {\*\expandedcolortbl;;} 1258 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc\partightenfactor0 1259 | 1260 | \f0\fs24 \cf0 "print", shift} 1261 | VerticalPad 1262 | 0.0 1263 | 1264 | Wrap 1265 | NO 1266 | 1267 | 1268 | Class 1269 | LineGraphic 1270 | Head 1271 | 1272 | ID 1273 | 3 1274 | 1275 | ID 1276 | 5 1277 | Points 1278 | 1279 | {196.43041384266974, 110.85826972220971} 1280 | {303.43000623023926, 111.38929152609602} 1281 | 1282 | Style 1283 | 1284 | shadow 1285 | 1286 | Draws 1287 | NO 1288 | 1289 | stroke 1290 | 1291 | HeadArrow 1292 | FilledArrow 1293 | Legacy 1294 | 1295 | TailArrow 1296 | 0 1297 | 1298 | 1299 | Tail 1300 | 1301 | ID 1302 | 42 1303 | 1304 | 1305 | 1306 | Bounds 1307 | {{303.93000000000006, 77.701300000000003}, {124, 68}} 1308 | Class 1309 | ShapedGraphic 1310 | ID 1311 | 3 1312 | Style 1313 | 1314 | shadow 1315 | 1316 | Draws 1317 | NO 1318 | 1319 | 1320 | Text 1321 | 1322 | Align 1323 | 0 1324 | Text 1325 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 1326 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 1327 | {\colortbl;\red255\green255\blue255;} 1328 | {\*\expandedcolortbl;;} 1329 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 1330 | 1331 | \f0\b\fs24 \cf0 \ul \ulc0 State 1 1332 | \f1\b0 \ulnone \ 1333 | stmt ::= "print" . exp\ 1334 | exp ::= . exp "+" exp\ 1335 | exp ::= . INT} 1336 | VerticalPad 1337 | 0.0 1338 | 1339 | 1340 | 1341 | Bounds 1342 | {{6.9304199999999998, 83.386799999999994}, {189, 54}} 1343 | Class 1344 | ShapedGraphic 1345 | ID 1346 | 42 1347 | Style 1348 | 1349 | shadow 1350 | 1351 | Draws 1352 | NO 1353 | 1354 | 1355 | Text 1356 | 1357 | Align 1358 | 0 1359 | Text 1360 | {\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 1361 | {\fonttbl\f0\fswiss\fcharset0 Helvetica-Bold;\f1\fswiss\fcharset0 Helvetica;} 1362 | {\colortbl;\red255\green255\blue255;} 1363 | {\*\expandedcolortbl;;} 1364 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 1365 | 1366 | \f0\b\fs24 \cf0 \ul \ulc0 State 0 1367 | \f1\b0 \ulnone \ 1368 | start ::= . stmt\ 1369 | stmt ::= . \'93print\'94 exp} 1370 | VerticalPad 1371 | 0.0 1372 | 1373 | 1374 | 1375 | GridInfo 1376 | 1377 | GuidesLocked 1378 | NO 1379 | GuidesVisible 1380 | YES 1381 | HPages 1382 | 1 1383 | ImageCounter 1384 | 1 1385 | KeepToScale 1386 | 1387 | Layers 1388 | 1389 | 1390 | Lock 1391 | NO 1392 | Name 1393 | Layer 1 1394 | Print 1395 | YES 1396 | Slices 1397 | NO 1398 | View 1399 | YES 1400 | 1401 | 1402 | LayoutInfo 1403 | 1404 | Animate 1405 | NO 1406 | circoMinDist 1407 | 18 1408 | layoutEngine 1409 | dot 1410 | neatoLineLength 1411 | 0.20000000298023224 1412 | 1413 | LinksVisible 1414 | NO 1415 | MagnetsVisible 1416 | NO 1417 | MasterSheets 1418 | 1419 | ModificationDate 1420 | 2022-11-03 12:51:45 +0000 1421 | Modifier 1422 | Jeremy Siek 1423 | NotesVisible 1424 | NO 1425 | Orientation 1426 | 2 1427 | OriginVisible 1428 | NO 1429 | OutlineStyle 1430 | Basic 1431 | PageBreaks 1432 | YES 1433 | PrintInfo 1434 | 1435 | NSBottomMargin 1436 | 1437 | float 1438 | 11.9906 1439 | 1440 | NSHorizonalPagination 1441 | 1442 | coded 1443 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG 1444 | 1445 | NSLeftMargin 1446 | 1447 | float 1448 | 11.9906 1449 | 1450 | NSPaperSize 1451 | 1452 | size 1453 | {611.99999904632568, 792} 1454 | 1455 | NSPrintReverseOrientation 1456 | 1457 | coded 1458 | BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG 1459 | 1460 | NSRightMargin 1461 | 1462 | float 1463 | 11.9906 1464 | 1465 | NSTopMargin 1466 | 1467 | float 1468 | 11.9906 1469 | 1470 | 1471 | PrintOnePage 1472 | 1473 | ReadOnly 1474 | NO 1475 | RowAlign 1476 | 1 1477 | RowSpacing 1478 | 36 1479 | SheetTitle 1480 | Canvas 1 1481 | SmartAlignmentGuidesActive 1482 | YES 1483 | SmartDistanceGuidesActive 1484 | YES 1485 | UniqueID 1486 | 1 1487 | UseEntirePage 1488 | 1489 | VPages 1490 | 1 1491 | WindowInfo 1492 | 1493 | CurrentSheet 1494 | 0 1495 | Expanded_Canvases 1496 | 1497 | Frame 1498 | {{259, 0}, {1005, 745}} 1499 | ShowInfo 1500 | 1501 | Sidebar 1502 | 1503 | SidebarWidth 1504 | 0 1505 | TopSlabHeight 1506 | 33 1507 | VisibleRegion 1508 | {{-59, 0}, {708, 648}} 1509 | Zoom 1510 | 1 1511 | ZoomValues 1512 | 1513 | 1514 | Canvas 1 1515 | 1 1516 | 1 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | -------------------------------------------------------------------------------- /book.bib: -------------------------------------------------------------------------------- 1 | 2 | @book{Pierce:2004fk, 3 | editor = {Benjamin C. Pierce}, 4 | publisher = {MIT Press}, 5 | title = {Advanced Topics in Types and Programming Languages}, 6 | year = {2004}} 7 | 8 | @book{Pierce:SF2, 9 | author = {Benjamin C. Pierce and Arthur Azevedo de Amorim 10 | and Chris Casinghino and Marco Gaboardi and 11 | Michael Greenberg and C\v{a}t\v{a}lin Hri\c{t}cu 12 | and Vilhelm Sj\"{o}berg and Andrew Tolmach 13 | and Brent Yorgey}, 14 | title = {Programming Language Foundations}, 15 | series = {Software Foundations}, 16 | volume = {2}, 17 | year = {2018}, 18 | publisher = {Electronic textbook}, 19 | keys = {verification,books}, 20 | url = {https://softwarefoundations.cis.upenn.edu/plf-current/index.html} 21 | } 22 | 23 | @Book{Harper2016, 24 | author = {Robert Harper}, 25 | title = {Practical Foundations for Programming Languages}, 26 | publisher = {Cambridge University Press}, 27 | year = 2016, 28 | edition = {2nd edition}} 29 | 30 | @Article{Appel90, 31 | author = {Appel, Andrew W.}, 32 | title = {A {Runtime} {System}}, 33 | journal = {{LISP} and Symbolic Computation}, 34 | year = 1990, 35 | volume = 3, 36 | number = 4, 37 | pages = {343--380} 38 | } 39 | 40 | @book{Appel91, 41 | place={Cambridge}, 42 | title={Compiling with Continuations}, 43 | publisher={Cambridge University Press}, 44 | author={Appel, Andrew W.}, 45 | year={1991} 46 | } 47 | 48 | @inproceedings{Hatcliff:1994ea, 49 | author = {John Hatcliff and Olivier Danvy}, 50 | booktitle = {Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '94}, 51 | pages = {458--471}, 52 | publisher = {Association for Computing Machinery}, 53 | title = {A Generic Account of Continuation-Passing Styles}, 54 | year = {1994}} 55 | 56 | @article{Plotkin:1975, 57 | author = {G. D. Plotkin}, 58 | journal = {Theoretical Computer Science}, 59 | number = {2}, 60 | pages = {125--159}, 61 | rating = {5}, 62 | read = {Yes}, 63 | title = {Call-by-{N}ame, {C}all-by-{V}alue and the {L}ambda-{C}alculus}, 64 | volume = {1}, 65 | year = {1975}} 66 | 67 | @inproceedings{Lawall:1993, 68 | author = {Lawall, Julia L. and Danvy, Olivier}, 69 | title = {Separating Stages in the Continuation-Passing Style 70 | Transformation}, 71 | year = 1993, 72 | publisher = {Association for Computing Machinery}, 73 | booktitle = {Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on 74 | Principles of Programming Languages, POPL '93}, 75 | pages = {124--136}, 76 | numpages = 13 77 | } 78 | 79 | @book{Friedman:2001, 80 | author = {Daniel P. Friedman and 81 | Mitchell Wand and 82 | Christopher T. Haynes}, 83 | title = {Essentials of {Programming} {Languages}}, 84 | edition = {2nd edition}, 85 | publisher = {{MIT} Press}, 86 | year = 2001, 87 | timestamp = {Fri, 15 Apr 2011 13:37:34 +0200}, 88 | biburl = {https://dblp.org/rec/books/daglib/0017436.bib}, 89 | bibsource = {dblp computer science bibliography, https://dblp.org} 90 | } 91 | 92 | @inproceedings{Fischer:1972, 93 | author = {Fischer, Michael J.}, 94 | title = {Lambda Calculus Schemata}, 95 | year = 1972, 96 | publisher = {Association for Computing Machinery}, 97 | booktitle = {Proceedings of ACM Conference on Proving Assertions about 98 | Programs}, 99 | pages = {104--109} 100 | } 101 | 102 | @InProceedings{Wijngaarden:1966, 103 | author = {Adriaan {van Wijngaarden}}, 104 | title = {Recursive Definition of Syntax and Semantics}, 105 | booktitle = {Formal Language Description Languages for Computer Programming}, 106 | year = 1966, 107 | editor = {T. B. Steel Jr.}, 108 | pages = {13--24}, 109 | publisher = {North-Holland}} 110 | 111 | @book{Aho:2006wb, 112 | author = {Aho, Alfred V. and Lam, Monica S. and Sethi, Ravi and Ullman, Jeffrey D.}, 113 | date-added = {2021-10-22 09:38:52 -0400}, 114 | date-modified = {2021-10-22 09:38:59 -0400}, 115 | publisher = {Addison-Wesley Longman}, 116 | title = {Compilers: Principles, Techniques, and Tools}, 117 | edition = {2nd edition}, 118 | year = {2006}} 119 | 120 | @article{Logothetis:1981, 121 | author = {Logothetis, George and Mishra, Prateek}, 122 | title = {Compiling {S}hort-{C}ircuit {B}oolean {E}xpressions in {O}ne {P}ass}, 123 | journal = {Software: Practice and Experience}, 124 | volume = {11}, 125 | number = {11}, 126 | pages = {1197--1214}, 127 | year = {1981} 128 | } 129 | 130 | @article{Clarke:1989, 131 | author = {Clarke, Keith}, 132 | title = {One-Pass Code Generation Using Continuations}, 133 | year = {1989}, 134 | issue_date = {Dec. 1989}, 135 | publisher = {John Wiley & Sons}, 136 | volume = {19}, 137 | number = {12}, 138 | journal = {Softw. Pract. Exper.}, 139 | pages = {1175--1192}, 140 | numpages = {18} 141 | } 142 | 143 | @article{Moggi:1991in, 144 | author = {Eugenio Moggi}, 145 | journal = {Inf. Comput.}, 146 | number = {1}, 147 | pages = {55--92}, 148 | publisher = {Academic Press}, 149 | title = {Notions of {C}omputation and {M}onads}, 150 | volume = {93}, 151 | year = {1991} 152 | } 153 | 154 | @article{Flatt:2019tb, 155 | articleno = {78}, 156 | author = {Flatt, Matthew and Derici, Caner and Dybvig, R. Kent and Keep, Andrew W. and Massaccesi, Gustavo E. and Spall, Sarah and Tobin-Hochstadt, Sam and Zeppieri, Jon}, 157 | journal = {Proc. ACM Program. Lang., ICFP (August)}, 158 | numpages = {15}, 159 | pages = {1--15}, 160 | publisher = {Association for Computing Machinery}, 161 | title = {Rebuilding Racket on Chez Scheme (Experience Report)}, 162 | volume = {3}, 163 | year = {2019}} 164 | 165 | @inproceedings{Danvy:2003fk, 166 | author = {Danvy, Olivier}, 167 | booktitle = {Compiler Construction: Proceedings of the 12th 168 | International Conference, CC '03, Held as Part of 169 | the Joint European Conferences on Theory and 170 | Practice of Software, ETAPS '03. \normalfont{Lecture Notes in 171 | Computer Science 2622}}, 172 | pages = {77--89}, 173 | title = {A New One-Pass Transformation into Monadic Normal Form}, 174 | publisher = {Springer}, 175 | year = {2003} 176 | } 177 | 178 | @article{PeytonJones:1998, 179 | author = {Simon L. {Peyton Jones} and Andr{\'e} L. M. Santos}, 180 | journal = {Science of Computer Programming}, 181 | number = {1}, 182 | pages = {3--47}, 183 | title = {A {T}ransformation-{B}ased {O}ptimiser for {H}askell}, 184 | volume = {32}, 185 | year = {1998}} 186 | 187 | @book{Russell2003, 188 | author = {Russell, Stuart J. and Norvig, Peter}, 189 | title = {Artificial Intelligence: A Modern Approach}, 190 | year = {2003}, 191 | publisher = {Pearson Education}, 192 | edition = {2} 193 | } 194 | 195 | 196 | @book{Kernighan:1988nx, 197 | author = {Brian W. Kernighan and Dennis M. Ritchie}, 198 | publisher = {Prentice Hall}, 199 | title = {The C {P}rogramming {L}anguage}, 200 | year = {1988} 201 | } 202 | 203 | @book{Dybvig:1987aa, 204 | author = {Dybvig, R. Kent}, 205 | publisher = {Prentice Hall}, 206 | title = {The Scheme Programming Language}, 207 | year = {1987} 208 | } 209 | 210 | @book{Abelson:1996uq, 211 | author = {Abelson, Harold and Sussman, Gerald J.}, 212 | edition = {2nd edition}, 213 | publisher = {MIT Press}, 214 | title = {Structure and Interpretation of Computer Programs}, 215 | year = {1996} 216 | } 217 | 218 | @book{Friedman:1996aa, 219 | author = {Friedman, Daniel P. and Felleisen, Matthias}, 220 | publisher = {MIT Press}, 221 | title = {The Little Schemer}, 222 | edition = {4th edition}, 223 | year = {1996} 224 | } 225 | 226 | @book{Felleisen:2001aa, 227 | author = {Felleisen, Matthias and Findler, Robert Bruce and 228 | Flatt, Matthew and Krishnamurthi, Shriram}, 229 | publisher = {MIT Press}, 230 | title = {How to Design Programs: An Introduction to 231 | Programming and Computing}, 232 | year = {2001} 233 | } 234 | 235 | @book{Felleisen:2013aa, 236 | author = {Felleisen, Matthias and Conrad, M.D. Barski and 237 | Horn, David Van and 238 | Eight Students of Northeastern University}, 239 | publisher = {No Starch Press}, 240 | title = {Realm of Racket: Learn to Program, One Game at a 241 | Time!}, 242 | year = {2013} 243 | } 244 | 245 | @techreport{Flatt:2014aa, 246 | author = {Matthew Flatt and Robert Bruce Findler and PLT}, 247 | institution = {PLT}, 248 | number = {6.0}, 249 | title = {The Racket Guide}, 250 | year = {2014} 251 | } 252 | 253 | @manual{Intel:2015aa, 254 | author = {Intel}, 255 | institution = {Intel}, 256 | title = {Intel 64 and IA-32 Architectures Software Developer's 257 | Manual Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B, 3C 258 | and 3D}, 259 | year = {2015} 260 | } 261 | 262 | @book{Bryant:2010aa, 263 | author = {Randal Bryant and David O'Hallaron}, 264 | edition = {2nd edition}, 265 | publisher = {Addison-Wesley}, 266 | title = {Computer Systems: A Programmer's Perspective}, 267 | year = {2010} 268 | } 269 | 270 | @manual{Bryant:2005aa, 271 | author = {Randal Bryant and David O'Hallaron}, 272 | organization = {Carnegie Mellon University}, 273 | title = {x86-64 Machine-Level Programming}, 274 | year = {2005} 275 | } 276 | 277 | @manual{Matz:2013aa, 278 | author = {Michael Matz and Jan Hubicka and Andreas Jaeger and 279 | Mark Mitchell}, 280 | title = {System V Application Binary Interface, AMD64 281 | Architecture Processor Supplement}, 282 | publisher = {Linux Foundation}, 283 | year = {2013} 284 | } 285 | 286 | @misc{Microsoft:2018aa, 287 | author = {Microsoft}, 288 | url = {https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/x64-architecture}, 289 | title = {x64 Architecture}, 290 | year = {2018} 291 | } 292 | 293 | @misc{Microsoft:2020aa, 294 | author = {Microsoft}, 295 | url = {https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention}, 296 | title = {x64 {C}alling {C}onvention}, 297 | year = {2020} 298 | } 299 | 300 | @inproceedings{Dybvig:2006aa, 301 | author = {Dybvig, R. Kent}, 302 | booktitle = {Proceedings of the Eleventh ACM SIGPLAN International 303 | Conference on Functional Programming, ICFP '06}, 304 | pages = {1--12}, 305 | publisher = {Association for Computing Machinery}, 306 | title = {The Development of {Chez} {Scheme}}, 307 | year = {2006} 308 | } 309 | 310 | @inproceedings{Sarkar:2004fk, 311 | author = {Dipanwita Sarkar and Oscar Waddell and 312 | R. Kent Dybvig}, 313 | booktitle = {Proceedings of the Ninth ACM SIGPLAN International 314 | Conference on Functional Programming, ICFP '04}, 315 | pages = {201--212}, 316 | publisher = {Association for Computing Machinery}, 317 | title = {A {N}anopass {I}nfrastructure for {C}ompiler {E}ducation}, 318 | year = {2004} 319 | } 320 | 321 | @phdthesis{Keep:2012aa, 322 | author = {Andrew W. Keep}, 323 | school = {Indiana University}, 324 | title = {A Nanopass Framework for Commercial Compiler 325 | Development}, 326 | year = {2012} 327 | } 328 | 329 | @techreport{Dybvig:2010aa, 330 | author = {R. Kent Dybvig and Andrew Keep}, 331 | institution = {Indiana University}, 332 | title = {P523 Compiler Assignments}, 333 | year = {2010} 334 | } 335 | 336 | @inproceedings{Ghuloum:2006bh, 337 | author = {Abdulaziz Ghuloum}, 338 | booktitle = {Scheme '06: Proceedings of the Workshop on Scheme and Functional Programming}, 339 | url = {http://www.schemeworkshop.org/2006/}, 340 | title = {An Incremental Approach to Compiler Construction}, 341 | year = {2006} 342 | } 343 | 344 | @article{Backus:1960aa, 345 | author = {Backus, J. W. and Bauer, F. L. and Green, J. and 346 | Katz, C. and McCarthy, J. and Perlis, A. J. and 347 | Rutishauser, H. and Samelson, K. and Vauquois, B. and 348 | Wegstein, J. H. and van Wijngaarden, A. and 349 | Woodger, M.}, 350 | editor = {Naur, Peter}, 351 | journal = {Commun. ACM}, 352 | number = {5}, 353 | pages = {299--314}, 354 | publisher = {Association for Computing Machinery}, 355 | title = {Report on the Algorithmic Language ALGOL 60}, 356 | volume = {3}, 357 | year = {1960} 358 | } 359 | 360 | @article{Knuth:1964aa, 361 | author = {Knuth, Donald E.}, 362 | journal = {Commun. ACM}, 363 | number = {12}, 364 | pages = {735--736}, 365 | publisher = {Association for Computing Machinery}, 366 | title = {Backus Normal Form vs. Backus Naur Form}, 367 | volume = {7}, 368 | year = {1964} 369 | } 370 | 371 | @article{SPERBER:2009aa, 372 | author = {Sperber, Michael and Dybvig, R. Kent and Flatt, Matthew and 373 | van Straaten, Anton and Findler, Robby and 374 | Matthews, Jacob}, 375 | journal = {Journal of Functional Programming}, 376 | pages = {1--301}, 377 | title = {Revised$^6$ Report on the Algorithmic Language 378 | Scheme}, 379 | volume = {19}, 380 | year = {2009} 381 | } 382 | 383 | @techreport{plt-tr, 384 | author = {Matthew Flatt and PLT}, 385 | institution = {PLT}, 386 | url = {https://docs.racket-lang.org/reference/index.html}, 387 | title = {The {R}acket Reference~6.0}, 388 | year = {2014} 389 | } 390 | 391 | @inproceedings{reynolds72:_def_interp, 392 | author = {John C. Reynolds}, 393 | booktitle = {{ACM} '72: Proceedings of the {ACM} Annual 394 | Conference}, 395 | pages = {717--740}, 396 | publisher = {Association for Computing Machinery}, 397 | title = {Definitional Interpreters for Higher-Order 398 | Programming Languages}, 399 | year = {1972} 400 | } 401 | 402 | @book{Jones:1993uq, 403 | author = {Neil D. Jones and Carsten K. Gomard and 404 | Peter Sestoft}, 405 | publisher = {Prentice Hall}, 406 | title = {Partial {Evaluation} and {Automatic} {Program} {Generation}}, 407 | year = {1993} 408 | } 409 | 410 | @techreport{Danvy:1991fk, 411 | author = {Olivier Danvy}, 412 | institution = {Kansas State University}, 413 | number = {CIS-92-02}, 414 | title = {Three Steps for the {CPS} Transformation}, 415 | year = {1991} 416 | } 417 | 418 | @inproceedings{Flanagan:1993cg, 419 | author = {Cormac Flanagan and Amr Sabry and Bruce F. Duba and 420 | Matthias Felleisen}, 421 | booktitle = {Proceedings of the ACM SIGPLAN 1993 Conference on 422 | {P}rogramming {L}anguage {D}esign and 423 | {I}mplementation, PLDI '93}, 424 | pages = {502--514}, 425 | title = {The {Essence} of {Compiling} with {Continuations}}, 426 | publisher = {Association for Computing Machinery}, 427 | year = {1993} 428 | } 429 | 430 | @book{Cooper:2011aa, 431 | author = {Keith Cooper and Linda Torczon}, 432 | edition = {2nd edition}, 433 | publisher = {Morgan Kaufmann}, 434 | title = {Engineering a Compiler}, 435 | year = {2011} 436 | } 437 | 438 | @book{Appel:2003fk, 439 | author = {Andrew W. Appel and Jens Palsberg}, 440 | publisher = {Cambridge University Press}, 441 | title = {Modern Compiler Implementation in Java}, 442 | year = {2003} 443 | } 444 | 445 | @book{Balakrishnan:1996ve, 446 | author = {Balakrishnan, V. K.}, 447 | publisher = {Dover}, 448 | title = {Introductory Discrete Mathematics}, 449 | year = {1996} 450 | } 451 | 452 | @book{Rosen:2002bh, 453 | author = {Rosen, Kenneth H.}, 454 | publisher = {McGraw-Hill Higher Education}, 455 | title = {Discrete Mathematics and Its Applications}, 456 | year = {2002} 457 | } 458 | 459 | @article{Brelaz:1979eu, 460 | author = {Br\'{e}laz, Daniel}, 461 | journal = {Commun. ACM}, 462 | number = {4}, 463 | pages = {251--256}, 464 | publisher = {Association for Computing Machinery}, 465 | title = {New {Methods} to {Color} the {Vertices} of a {Graph}}, 466 | volume = {22}, 467 | year = {1979} 468 | } 469 | 470 | @article{Horwitz:1966aa, 471 | author = {Horwitz, L. P. and Karp, R. M. and Miller, R. E. and 472 | Winograd, S.}, 473 | journal = {J. ACM}, 474 | number = {1}, 475 | pages = {43--61}, 476 | publisher = {Association for Computing Machinery}, 477 | title = {Index Register Allocation}, 478 | volume = {13}, 479 | year = {1966} 480 | } 481 | 482 | 483 | 484 | @inbook{Backus:1978aa, 485 | author = {Backus, John}, 486 | booktitle = {History of Programming Languages}, 487 | pages = {25--74}, 488 | publisher = {Association for Computing Machinery}, 489 | title = {The History of Fortran I, II, and III}, 490 | year = {1978} 491 | } 492 | 493 | @article{Chaitin:1981vl, 494 | author = {Gregory J. Chaitin and Marc A. Auslander and 495 | Ashok K. Chandra and John Cocke and Martin E. Hopkins and 496 | Peter W. Markstein}, 497 | journal = {Computer Languages}, 498 | pages = {47--57}, 499 | title = {Register {Allocation} via {Coloring}}, 500 | volume = {6}, 501 | year = {1981} 502 | } 503 | 504 | @article{Kempe:1879aa, 505 | author = {A. B. Kempe}, 506 | journal = {American Journal of Mathematics}, 507 | number = {3}, 508 | pages = {193--200}, 509 | publisher = {Johns Hopkins University Press}, 510 | title = {On the Geographical Problem of the Four Colours}, 511 | volume = {2}, 512 | year = {1879} 513 | } 514 | 515 | @inproceedings{Chaitin:1982vn, 516 | author = {G. J. Chaitin}, 517 | booktitle = {SIGPLAN '82: Proceedings of the 1982 {SIGPLAN} 518 | Symposium on Compiler Construction}, 519 | pages = {98--105}, 520 | publisher = {Association for Computing Machinery}, 521 | title = {Register {Allocation} \& {Spilling} via {Graph} {Coloring}}, 522 | year = {1982} 523 | } 524 | 525 | @article{Briggs:1994kx, 526 | author = {Preston Briggs and Keith D. Cooper and Linda Torczon}, 527 | journal = {ACM Trans. Program. Lang. Syst.}, 528 | number = {3}, 529 | pages = {428--455}, 530 | publisher = {Association for Computing Machinery}, 531 | title = {Improvements to Graph Coloring Register Allocation}, 532 | volume = {16}, 533 | year = {1994} 534 | } 535 | 536 | @article{George:1996aa, 537 | author = {George, Lal and Appel, Andrew W.}, 538 | journal = {ACM Trans. Program. Lang. Syst.}, 539 | number = {3}, 540 | pages = {300--324}, 541 | publisher = {Association for Computing Machinery}, 542 | title = {Iterated Register Coalescing}, 543 | volume = {18}, 544 | year = {1996} 545 | } 546 | 547 | @incollection{Matula:1972aa, 548 | author = {David W. Matula and George Marble and Joel D. Isaacson}, 549 | booktitle = {Graph Theory and Computing}, 550 | pages = {109--122}, 551 | publisher = {Academic Press}, 552 | title = {Graph Coloring Algorithms}, 553 | year = {1972} 554 | } 555 | 556 | @inproceedings{Chow:1984ys, 557 | author = {Frederick Chow and John Hennessy}, 558 | booktitle = {Proceedings of the 1984 SIGPLAN 559 | {Symposium} on {Compiler} {Construction}}, 560 | pages = {222--232}, 561 | publisher = {Association for Computing Machinery}, 562 | title = {Register {Allocation} by {Priority-Based} {Coloring}}, 563 | year = {1984} 564 | } 565 | 566 | @inproceedings{Cooper:1998ly, 567 | author = {Keith D. Cooper and L. Taylor Simpson}, 568 | booktitle = {Compiler Construction: Proceedings of the 7th International Conference, CC '98, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS '98. \normalfont{Lecture Notes in Computer Science 1383}}, 569 | publisher = {Springer}, 570 | title = {Live {Range} {Splitting} in a {Graph} {Coloring} {Register} 571 | {Allocator}}, 572 | year = {1998} 573 | } 574 | 575 | @inproceedings{Palsberg:2007si, 576 | author = {Palsberg, Jens}, 577 | booktitle = {Proceedings of the {T}hirteenth {A}ustralasian 578 | {S}ymposium on {T}heory of {C}omputing}, 579 | pages = {3--3}, 580 | publisher = {Australian Computer Society}, 581 | title = {Register {A}llocation via {C}oloring of {C}hordal {G}raphs}, 582 | year = {2007} 583 | } 584 | 585 | @article{Poletto:1999uq, 586 | author = {Massimiliano Poletto and Vivek Sarkar}, 587 | journal = {ACM Trans. Program. Lang. Syst.}, 588 | number = {5}, 589 | pages = {895--913}, 590 | publisher = {Association for Computing Machinery}, 591 | title = {Linear {S}can {R}egister {A}llocation}, 592 | volume = {21}, 593 | year = {1999} 594 | } 595 | 596 | @inproceedings{Allen:1970uq, 597 | author = {Frances E. Allen}, 598 | booktitle = {Proceedings of a Symposium on Compiler Optimization}, 599 | publisher = {Association for Computing Machinery}, 600 | pages = {1--19}, 601 | title = {Control {Flow} {Analysis}}, 602 | year = {1970} 603 | } 604 | 605 | @techreport{Friedman:1976aa, 606 | author = {Daniel P. Friedman and David S. Wise}, 607 | institution = {Indiana University}, 608 | number = {TR44}, 609 | title = {Cons {Should} {Not} {Evaluate} {Its} {Arguments}}, 610 | year = {1976} 611 | } 612 | 613 | @book{Pierce:2002hj, 614 | author = {Benjamin C. Pierce}, 615 | publisher = {MIT Press}, 616 | title = {Types and {P}rogramming {L}anguages}, 617 | year = {2002} 618 | } 619 | 620 | @article{Lieberman:1983aa, 621 | author = {Lieberman, Henry and Hewitt, Carl}, 622 | journal = {Commun. ACM}, 623 | number = {6}, 624 | pages = {419--429}, 625 | publisher = {Association for Computing Machinery}, 626 | title = {A Real-Time Garbage Collector Based on the Lifetimes 627 | of Objects}, 628 | volume = {26}, 629 | year = {1983} 630 | } 631 | 632 | @inproceedings{Ungar:1984aa, 633 | author = {Ungar, David}, 634 | booktitle = {Proceedings of the First ACM SIGSOFT/SIGPLAN Software 635 | Engineering Symposium on Practical Software 636 | Development Environments, SDE 1}, 637 | pages = {157--167}, 638 | publisher = {Association for Computing Machinery}, 639 | title = {Generation Scavenging: A Non-Disruptive High 640 | Performance Storage Reclamation Algorithm}, 641 | year = {1984} 642 | } 643 | 644 | @book{Jones:1996aa, 645 | author = {Jones, Richard and Lins, Rafael}, 646 | publisher = {John Wiley \& Sons}, 647 | title = {Garbage Collection: Algorithms for Automatic Dynamic 648 | Memory Management}, 649 | year = {1996} 650 | } 651 | 652 | @inproceedings{Detlefs:2004aa, 653 | author = {Detlefs, David and Flood, Christine and Heller, Steve and 654 | Printezis, Tony}, 655 | booktitle = {Proceedings of the 4th International Symposium on 656 | Memory Management, ISMM '04}, 657 | pages = {37--48}, 658 | publisher = {Association for Computing Machinery}, 659 | title = {Garbage-{F}irst {Garbage} {Collection}}, 660 | year = {2004} 661 | } 662 | 663 | @inproceedings{Tene:2011kx, 664 | author = {Tene, Gil and Iyengar, Balaji and Wolf, Michael}, 665 | booktitle = {Proceedings of the International Symposium on Memory 666 | Management, ISMM '11}, 667 | pages = {79--88}, 668 | publisher = {Association for Computing Machinery}, 669 | title = {C4: The {C}ontinuously {C}oncurrent {C}ompacting 670 | {C}ollector}, 671 | year = {2011} 672 | } 673 | 674 | @incollection{Wilson:1992fk, 675 | author = {Wilson, Paul}, 676 | booktitle = {Memory Management}, 677 | editor = {Bekkers, Yves and Cohen, Jacques}, 678 | pages = {1--42}, 679 | publisher = {Springer}, 680 | title = {Uniprocessor Garbage Collection Techniques. 681 | \normalfont{Lecture Notes in Computer Science 637}}, 682 | year = {1992} 683 | } 684 | 685 | @article{Cheney:1970aa, 686 | author = {C. J. Cheney}, 687 | journal = {Commun. of the {ACM}}, 688 | number = {11}, 689 | title = {A Nonrecursive List Compacting Algorithm}, 690 | volume = {13}, 691 | year = {1970} 692 | } 693 | 694 | @article{McCarthy:1960dz, 695 | author = {McCarthy, John}, 696 | journal = {Commun. ACM}, 697 | number = {4}, 698 | pages = {184--195}, 699 | publisher = {Association for Computing Machinery}, 700 | title = {Recursive {F}unctions of {S}ymbolic {E}xpressions and their 701 | {C}omputation by {M}achine, Part I}, 702 | volume = {3}, 703 | year = {1960} 704 | } 705 | 706 | @article{Collins:1960aa, 707 | author = {Collins, George E.}, 708 | journal = {Commun. ACM}, 709 | number = {12}, 710 | pages = {655--657}, 711 | publisher = {Association for Computing Machinery}, 712 | title = {A Method for Overlapping and Erasure of Lists}, 713 | volume = {3}, 714 | year = {1960} 715 | } 716 | 717 | @inproceedings{Blackburn:2004aa, 718 | author = {Blackburn, Stephen M. and Cheng, Perry and 719 | McKinley, Kathryn S.}, 720 | booktitle = {Proceedings of the Joint International Conference 721 | on Measurement and Modeling of Computer Systems, 722 | SIGMETRICS '04/Performance '04}, 723 | pages = {25--36}, 724 | publisher = {Association for Computing Machinery}, 725 | title = {Myths and Realities: The Performance Impact of 726 | Garbage Collection}, 727 | year = {2004} 728 | } 729 | 730 | @book{Jones:2011aa, 731 | author = {Jones, Richard and Hosking, Antony and Moss, Eliot}, 732 | publisher = {Chapman \& Hall/CRC}, 733 | title = {The Garbage Collection Handbook: The Art of Automatic 734 | Memory Management}, 735 | year = {2011} 736 | } 737 | 738 | @inproceedings{Shahriyar:2013aa, 739 | author = {Shahriyar, Rifat and Blackburn, Stephen M. and 740 | Yang, Xi and McKinley, Kathryn M.}, 741 | booktitle = {Proceedings of the 24th ACM SIGPLAN 742 | Conference on Object Oriented Programming Systems 743 | Languages and Applications, OOPSLA '13}, 744 | publisher = {Association for Computing Machinery}, 745 | title = {Taking Off the Gloves with Reference Counting Immix}, 746 | year = {2013} 747 | } 748 | 749 | @inproceedings{Cutler:2015aa, 750 | author = {Cutler, Cody and Morris, Robert}, 751 | booktitle = {Proceedings of the 2015 International Symposium on 752 | Memory Management, ISMM '15}, 753 | pages = {131--142}, 754 | publisher = {Association for Computing Machinery}, 755 | title = {Reducing Pause Times with Clustered Collection}, 756 | year = {2015} 757 | } 758 | 759 | @inproceedings{Shidal:2015aa, 760 | author = {Shidal, Jonathan and Spilo, Ari J. and 761 | Scheid, Paul T. and Cytron, Ron K. and 762 | Kavi, Krishna M.}, 763 | booktitle = {Proceedings of the 2015 International Symposium on 764 | Memory Management, ISMM '15}, 765 | pages = {118--130}, 766 | publisher = {Association for Computing Machinery}, 767 | title = {Recycling Trash in Cache}, 768 | year = {2015} 769 | } 770 | 771 | @inproceedings{Osterlund:2016aa, 772 | author = {\"{O}sterlund, Erik and L\"{o}we, Welf}, 773 | booktitle = {Proceedings of the 2016 ACM SIGPLAN International 774 | Symposium on Memory Management, ISMM '16}, 775 | pages = {1--12}, 776 | publisher = {Association for Computing Machinery}, 777 | title = {Block-Free Concurrent GC: Stack Scanning and Copying}, 778 | year = {2016} 779 | } 780 | 781 | @inproceedings{Jacek:2019aa, 782 | author = {Jacek, Nicholas and Moss, J. Eliot B.}, 783 | booktitle = {Proceedings of the 2019 ACM SIGPLAN International 784 | Symposium on Memory Management, ISMM '19}, 785 | pages = {53--63}, 786 | publisher = {Association for Computing Machinery}, 787 | title = {Learning When to Garbage Collect with Random Forests}, 788 | year = {2019} 789 | } 790 | 791 | @inproceedings{Gamari:2020aa, 792 | author = {Gamari, Ben and Dietz, Laura}, 793 | booktitle = {Proceedings of the 2020 ACM SIGPLAN International 794 | Symposium on Memory Management, ISMM '20}, 795 | pages = {87--99}, 796 | publisher = {Association for Computing Machinery}, 797 | title = {Alligator Collector: A Latency-Optimized Garbage 798 | Collector for Functional Programming Languages}, 799 | year = {2020} 800 | } 801 | 802 | @inproceedings{Moore:1959aa, 803 | author = {E.F. Moore}, 804 | booktitle = {Proceedings of an International Symposium on the 805 | Theory of Switching}, 806 | title = {The {S}hortest {P}ath {T}hrough a {M}aze}, 807 | publisher = {Harvard University Press}, 808 | year = {1959} 809 | } 810 | 811 | @book{Cormen:2001uq, 812 | author = {Thomas H. Cormen and Clifford Stein and 813 | Ronald L. Rivest and Charles E. Leiserson}, 814 | publisher = {McGraw-Hill Higher Education}, 815 | title = {Introduction to Algorithms}, 816 | year = {2001} 817 | } 818 | 819 | @techreport{Steele:1977ab, 820 | author = {Guy L. Steele}, 821 | institution = {MIT Artificial Intelligence Lab}, 822 | number = {420}, 823 | type = {AI Memo}, 824 | title = {Data Representations in PDP-10 MacLISP}, 825 | year = {1977} 826 | } 827 | 828 | @article{Appel:1989aa, 829 | author = {Appel, Andrew W.}, 830 | journal = {LISP and Symbolic Computation}, 831 | number = {2}, 832 | pages = {153--162}, 833 | publisher = {Kluwer Academic Publishers}, 834 | title = {Runtime {Tags} {Aren't} {Necessary}}, 835 | volume = {2}, 836 | year = {1989} 837 | } 838 | 839 | @inproceedings{Goldberg:1991aa, 840 | author = {Goldberg, Benjamin}, 841 | booktitle = {Proceedings of the ACM SIGPLAN 1991 Conference on 842 | Programming Language Design and Implementation, PLDI '91}, 843 | pages = {165--176}, 844 | publisher = {Association for Computing Machinery}, 845 | title = {Tag-free Garbage Collection for Strongly Typed 846 | Programming Languages}, 847 | year = {1991} 848 | } 849 | 850 | @inproceedings{Diwan:1992aa, 851 | author = {Diwan, Amer and Moss, Eliot and Hudson, Richard}, 852 | booktitle = {Proceedings of the ACM SIGPLAN 1992 Conference on 853 | Programming Language Design and Implementation, PLDI '92}, 854 | pages = {273--282}, 855 | publisher = {Association for Computing Machinery}, 856 | title = {Compiler Support for Garbage Collection in a 857 | Statically Typed Language}, 858 | year = {1992} 859 | } 860 | 861 | @inproceedings{Siebert:2001aa, 862 | author = {Siebert, Fridtjof}, 863 | title = {Constant-Time Root Scanning for Deterministic Garbage 864 | Collection}, 865 | pages = {304--318}, 866 | publisher = {Springer}, 867 | editor = {Reinhard Wilhelm}, 868 | booktitle = {Proceedings of Compiler Construction: 10th 869 | International Conference, CC 2001, Held as Part of 870 | the Joint European Conferences on Theory and 871 | Practice of Software, ETAPS '01}, 872 | year = {2001} 873 | } 874 | 875 | @inproceedings{Henderson:2002aa, 876 | author = {Henderson, Fergus}, 877 | booktitle = {Proceedings of the 3rd International Symposium on 878 | Memory Management, ISMM '02}, 879 | pages = {150--156}, 880 | publisher = {Association for Computing Machinery}, 881 | title = {Accurate Garbage Collection in an Uncooperative 882 | Environment}, 883 | year = {2002} 884 | } 885 | 886 | @article{Baker:2009aa, 887 | author = {Baker, J. and Cunei, A. and Kalibera, T. and 888 | Pizlo, F. and Vitek, J.}, 889 | journal = {Concurr. Comput.: Pract. Exper.}, 890 | number = {12}, 891 | pages = {1572--1606}, 892 | publisher = {John Wiley and Sons Ltd.}, 893 | title = {Accurate Garbage Collection in Uncooperative 894 | Environments Revisited}, 895 | volume = {21}, 896 | year = {2009} 897 | } 898 | 899 | @techreport{Dijkstra:1982aa, 900 | author = {E. W. Dijkstra}, 901 | institution = {University of Texas at Austin}, 902 | number = {EWD831}, 903 | title = {Why {Numbering} {Should} {Start} at {Zero}}, 904 | year = {1982} 905 | } 906 | 907 | @article{Kelsey:1998di, 908 | editor = {R. Kelsey and W. Clinger and J. Rees}, 909 | journal = {Higher-Order and Symbolic Computation}, 910 | number = {1}, 911 | title = {Revised$^5$ Report on the Algorithmic Language 912 | Scheme}, 913 | volume = {11}, 914 | year = {1998} 915 | } 916 | 917 | @techreport{Cardelli:1983aa, 918 | author = {Luca Cardelli}, 919 | institution = {AT\&T Bell Laboratories}, 920 | number = {TR-107}, 921 | title = {The Functional Abstract Machine}, 922 | year = {1983} 923 | } 924 | 925 | @inproceedings{Minamide:1996ys, 926 | author = {Minamide, Yasuhiko and Morrisett, Greg and 927 | Harper, Robert}, 928 | booktitle = {Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium 929 | on Principles of Programming Languages, POPL '96}, 930 | pages = {271--283}, 931 | publisher = {Association for Computing Machinery}, 932 | title = {Typed {C}losure {C}onversion}, 933 | year = {1996} 934 | } 935 | 936 | @inproceedings{Shivers:1988aa, 937 | author = {Shivers, O.}, 938 | booktitle = {Proceedings of the ACM SIGPLAN 1988 Conference on 939 | Programming Language Design and Implementation, PLDI '88}, 940 | pages = {164--174}, 941 | publisher = {Association for Computing Machinery}, 942 | title = {Control Flow Analysis in {Scheme}}, 943 | year = {1988} 944 | } 945 | 946 | @inproceedings{Gilray:2016aa, 947 | author = {Gilray, Thomas and Lyde, Steven and Adams, Michael D. and 948 | Might, Matthew and Van Horn, David}, 949 | booktitle = {Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT 950 | Symposium on Principles of Programming Languages, POPL '16}, 951 | pages = {691--704}, 952 | publisher = {Association for Computing Machinery}, 953 | title = {Pushdown Control-Flow Analysis for Free}, 954 | year = {2016} 955 | } 956 | 957 | @inproceedings{Keep:2012ab, 958 | author = {Keep, Andrew W. and Hearn, Alex and Dybvig, R. Kent}, 959 | booktitle = {Scheme '12: Proceedings of the Workshop on Scheme and Functional Programming}, 960 | title = {Optimizing Closures in {O}(0)-time}, 961 | publisher = {Association for Computing Machinery}, 962 | year = {2012} 963 | } 964 | 965 | @article{Church:1932aa, 966 | author = {Church, Alonzo}, 967 | journal = {Ann. Math.}, 968 | number = {2}, 969 | pages = {346--366}, 970 | publisher = {Annals of Mathematics}, 971 | series = {Second Series}, 972 | title = {A Set of Postulates for the Foundation of Logic}, 973 | volume = {33}, 974 | year = {1932} 975 | } 976 | 977 | @techreport{Guy-L.-Steele:1978yq, 978 | author = {Guy L. Steele}, 979 | institution = {MIT}, 980 | title = {Rabbit: A Compiler for {Scheme}}, 981 | year = {1978} 982 | } 983 | 984 | @inproceedings{Cardelli:1984aa, 985 | author = {Cardelli, Luca}, 986 | booktitle = {ACM Symposium on LISP and Functional Programming, LFP '84}, 987 | publisher = {Association for Computing Machinery}, 988 | title = {Compiling a Functional Language}, 989 | pages = {208--221}, 990 | year = {1984} 991 | } 992 | 993 | @inproceedings{Gordon:1978aa, 994 | author = {Gordon, M. and Milner, R. and Morris, L. and 995 | Newey, M. and Wadsworth, C.}, 996 | booktitle = {Proceedings of the 5th ACM SIGACT-SIGPLAN Symposium 997 | on Principles of Programming Languages, POPL '78}, 998 | pages = {119--130}, 999 | publisher = {Association for Computing Machinery}, 1000 | title = {A Metalanguage for Interactive Proof in LCF}, 1001 | year = {1978} 1002 | } 1003 | 1004 | @book{Milner:1990fk, 1005 | author = {Robin Milner and Mads Tofte and Robert Harper}, 1006 | publisher = {MIT Press}, 1007 | title = {The {D}efinition of Standard ML}, 1008 | year = {1990} 1009 | } 1010 | 1011 | @phdthesis{Dybvig:1987ab, 1012 | author = {R. Kent Dybvig}, 1013 | school = {University of North Carolina at Chapel Hill}, 1014 | title = {Three Implementation Models for Scheme}, 1015 | year = {1987} 1016 | } 1017 | 1018 | @article{Cardelli:1985kx, 1019 | author = {Luca Cardelli and Peter Wegner}, 1020 | journal = {ACM Comput. Surv.}, 1021 | number = {4}, 1022 | pages = {471--523}, 1023 | publisher = {Association for Computing Machinery}, 1024 | title = {On {Understanding} {Types}, {Data} {Abstraction}, and 1025 | {Polymorphism}}, 1026 | volume = {17}, 1027 | year = {1985} 1028 | } 1029 | 1030 | @inproceedings{Kildall:1973vn, 1031 | author = {Gary A. Kildall}, 1032 | booktitle = {Proceedings of the 1st {A}nnual ACM 1033 | SIGACT-SIGPLAN {S}ymposium on {P}rinciples of {P}rogramming 1034 | {L}anguages, POPL '73}, 1035 | pages = {194--206}, 1036 | publisher = {Association for Computing Machinery}, 1037 | title = {A {U}nified {A}pproach to {G}lobal {P}rogram {O}ptimization}, 1038 | year = {1973} 1039 | } 1040 | 1041 | @book{Kleene:1952aa, 1042 | author = {Kleene, S.}, 1043 | publisher = {Van Nostrand}, 1044 | title = {Introduction to {M}etamathematics}, 1045 | year = {1952} 1046 | } 1047 | 1048 | @inproceedings{Tobin-Hochstadt:2006fk, 1049 | author = {Sam Tobin-Hochstadt and Matthias Felleisen}, 1050 | booktitle = {Companion to the 21st ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications (Dynamic Languages Symposium), DLS '06}, 1051 | title = {Interlanguage Migration: From Scripts to Programs}, 1052 | publisher = {Association for Computing Machinery}, 1053 | year = {2006} 1054 | } 1055 | 1056 | @inproceedings{Matthews:2007zr, 1057 | author = {Jacob Matthews and Robert Bruce Findler}, 1058 | booktitle = {Proceedings of the 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '07}, 1059 | title = {Operational Semantics for Multi-Language Programs}, 1060 | publisher = {Association for Computing Machinery}, 1061 | year = {2007} 1062 | } 1063 | 1064 | @inproceedings{Flanagan:2006mn, 1065 | author = {Cormac Flanagan}, 1066 | booktitle = {Proceedings of the 33rd {ACM SIGPLAN-SIGACT} Symposium 1067 | on Principles of Programming Languages, POPL '06}, 1068 | pages = {245--256}, 1069 | title = {Hybrid Type Checking}, 1070 | publisher = {Association for Computing Machinery}, 1071 | year = {2006} 1072 | } 1073 | 1074 | @inproceedings{Gronski:2006uq, 1075 | author = {Jessica Gronski and Kenneth Knowles and Aaron Tomb and 1076 | Stephen N. Freund and Cormac Flanagan}, 1077 | booktitle = {Scheme '06: Proceedings of the Workshop on Scheme and Functional Programming}, 1078 | pages = {93--104}, 1079 | title = {Sage: Hybrid Checking for Flexible Specifications}, 1080 | url = {http://www.schemeworkshop.org/2006/}, 1081 | year = {2006} 1082 | } 1083 | 1084 | @article{Anderson:2002kd, 1085 | author = {Christopher Anderson and Sophia Drossopoulou}, 1086 | journal = {Electron. Notes Theor. Comput. Sci.}, 1087 | number = {8}, 1088 | publisher = {Elsevier}, 1089 | title = {{BabyJ}: From Object Based to Class Based 1090 | Programming via Types}, 1091 | volume = {82}, 1092 | pages = {53--81}, 1093 | year = {2003} 1094 | } 1095 | 1096 | @inproceedings{Siek:2006bh, 1097 | author = {Jeremy G. Siek and Walid Taha}, 1098 | booktitle = {Scheme '06: Proceedings of the Workshop on Scheme and Functional Programming}, 1099 | pages = {81--92}, 1100 | title = {Gradual {T}yping for {F}unctional {L}anguages}, 1101 | url = {http://www.schemeworkshop.org/2006/}, 1102 | year = {2006} 1103 | } 1104 | 1105 | @inproceedings{Wadler:2009qv, 1106 | author = {Philip Wadler and Robert Bruce Findler}, 1107 | booktitle = {Proceedings of Programming Languages and Systems, 31st European 1108 | Symposium on Programming, ESOP '09, Held as Part of 1109 | the Joint European Conferences on Theory and 1110 | Practice of Software, ETAPS '09}, 1111 | editor = {Giuseppe Castagna}, 1112 | publisher = {Springer}, 1113 | pages = {1--16}, 1114 | title = {Well-Typed Programs Can't Be Blamed}, 1115 | year = {2009} 1116 | } 1117 | 1118 | @inproceedings{Herman:2006uq, 1119 | author = {David Herman and Aaron Tomb and Cormac Flanagan}, 1120 | booktitle = {Trends in Functional Programming, TFP '07}, 1121 | title = {Space-{E}fficient {G}radual {T}yping}, 1122 | year = {2007} 1123 | } 1124 | 1125 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1126 | 1127 | @article{Herman:2010aa, 1128 | author = {Herman, David and Tomb, Aaron and Flanagan, Cormac}, 1129 | journal = {Higher-Order and Symbolic Computation}, 1130 | number = {2}, 1131 | pages = {167--189}, 1132 | publisher = {Springer US}, 1133 | title = {Space-{E}fficient {G}radual {T}yping}, 1134 | volume = {23}, 1135 | year = {2010} 1136 | } 1137 | 1138 | @article{Henglein:1994nz, 1139 | author = {Fritz Henglein}, 1140 | journal = {Science of Computer Programming}, 1141 | number = {3}, 1142 | pages = {197--230}, 1143 | title = {Dynamic Typing: Syntax and Proof Theory}, 1144 | volume = {22}, 1145 | year = {1994} 1146 | } 1147 | 1148 | @inproceedings{Siek:2015ab, 1149 | author = {Jeremy G. Siek and Peter Thiemann and Philip Wadler}, 1150 | booktitle = {Proceedings of the ACM SIGPLAN 2015 Conference on 1151 | Programming Language Design and Implementation, PLDI 1152 | '15}, 1153 | title = {Blame and {C}oercion: {T}ogether {A}gain for the {F}irst 1154 | {T}ime}, 1155 | publisher = {Association for Computing Machinery}, 1156 | year = {2015} 1157 | } 1158 | 1159 | @inproceedings{Kuhlenschmidt:2019aa, 1160 | author = {Andre Kuhlenschmidt and Deyaaeldeen Almahallawi and 1161 | Jeremy G. Siek}, 1162 | booktitle = {Proceedings of the ACM SIGPLAN 2019 Conference on 1163 | Programming Language Design and Implementation, PLDI 1164 | '19}, 1165 | publisher = {Association for Computing Machinery}, 1166 | title = {Toward Efficient Gradual Typing for Structural Types 1167 | via Coercions}, 1168 | year = {2019} 1169 | } 1170 | 1171 | @inproceedings{stroustrup88:_param_types, 1172 | author = {Bjarne Stroustrup}, 1173 | booktitle = {Proceedings of the USENIX {C++} Conference}, 1174 | title = {Parameterized Types for {C++}}, 1175 | publisher = {USENIX}, 1176 | year = {1988} 1177 | } 1178 | 1179 | @inproceedings{Blelloch:1993aa, 1180 | author = {Blelloch, Guy E. and Hardwick, Jonathan C. and 1181 | Chatterjee, Siddhartha and Sipelstein, Jay and 1182 | Zagha, Marco}, 1183 | booktitle = {Proceedings of the Fourth ACM SIGPLAN Symposium on 1184 | Principles and Practice of Parallel Programming, PPOPP '93}, 1185 | publisher = {Association for Computing Machinery}, 1186 | title = {Implementation of a Portable Nested Data-Parallel 1187 | Language}, 1188 | pages = {102--111}, 1189 | year = {1993} 1190 | } 1191 | 1192 | @inproceedings{Weeks:2006aa, 1193 | author = {Weeks, Stephen}, 1194 | booktitle = {Proceedings of the 2006 Workshop on ML '06}, 1195 | pages = {1}, 1196 | publisher = {Association for Computing Machinery}, 1197 | title = {Whole-Program Compilation in MLton}, 1198 | year = {2006} 1199 | } 1200 | 1201 | @techreport{liskov79:_clu_ref, 1202 | author = {Barbara Liskov and Russ Atkinson and Toby Bloom and 1203 | Eliot Moss and Craig Schaffert and Bob Scheifler and 1204 | Alan Snyder}, 1205 | institution = {MIT}, 1206 | number = {LCS-TR-225}, 1207 | publisher = {Massachusetts Institute of Technology}, 1208 | title = {{CLU} Reference Manual}, 1209 | year = {1979} 1210 | } 1211 | 1212 | @inproceedings{Liskov:1993dk, 1213 | author = {Liskov, Barbara}, 1214 | booktitle = {The {S}econd ACM SIGPLAN {C}onference on {H}istory 1215 | of {P}rogramming {L}anguages, HOPL-II}, 1216 | pages = {133--147}, 1217 | publisher = {Association for Computing Machinery}, 1218 | title = {A {H}istory of {CLU}}, 1219 | year = {1993} 1220 | } 1221 | 1222 | @inbook{Appel:1987aa, 1223 | author = {Appel, Andrew W. and MacQueen, David B.}, 1224 | booktitle = {Functional Programming Languages and Computer 1225 | Architecture}, 1226 | pages = {301--324}, 1227 | publisher = {Springer}, 1228 | title = {A Standard ML Compiler}, 1229 | year = {1987} 1230 | } 1231 | 1232 | @inproceedings{Bracha:1998fk, 1233 | author = {Bracha, Gilad and Odersky, Martin and 1234 | Stoutamire, David and Wadler, Philip}, 1235 | booktitle = {Proceedings of the 13th ACM SIGPLAN {Conference} on 1236 | {Object-Oriented} {Programming}, {Systems}, {Languages}, and 1237 | {Applications}, OOPSLA '98}, 1238 | publisher = {Association for Computing Machinery}, 1239 | title = {Making the {Future} {Safe} for the {Past}: {Adding} 1240 | {Genericity} to the {Java} {Programming} {Language}}, 1241 | pages = {183--200}, 1242 | year = {1998} 1243 | } 1244 | 1245 | @inproceedings{Leroy:1992qb, 1246 | author = {Xavier Leroy}, 1247 | booktitle = {Proceedings of the 19th ACM SIGPLAN-SIGACT 1248 | {Symposium} on {Principles} of {Programming} 1249 | {Languages}, POPL '92}, 1250 | pages = {177--188}, 1251 | publisher = {Association for Computing Machinery}, 1252 | title = {Unboxed {Objects} and {Polymorphic} {Typing}}, 1253 | year = {1992} 1254 | } 1255 | 1256 | @article{Morrison:1991aa, 1257 | author = {Morrison, R. and Dearle, A. and Connor, R. C. H. and 1258 | Brown, A. L.}, 1259 | journal = {ACM Trans. Program. Lang. Syst.}, 1260 | number = {3}, 1261 | pages = {342--371}, 1262 | publisher = {Association for Computing Machinery}, 1263 | title = {An Ad Hoc Approach to the Implementation of 1264 | Polymorphism}, 1265 | volume = {13}, 1266 | year = {1991} 1267 | } 1268 | 1269 | @inproceedings{Harper:1995um, 1270 | author = {Robert Harper and Greg Morrisett}, 1271 | booktitle = {Proceedings of the 22nd ACM SIGPLAN-SIGACT 1272 | {Symposium} on {Principles} of {Programming} 1273 | {Languages}, POPL '95}, 1274 | pages = {130--141}, 1275 | publisher = {Association for Computing Machinery}, 1276 | title = {Compiling {Polymorphism} {Using} {Intensional} {Type} 1277 | {Analysis}}, 1278 | year = {1995} 1279 | } 1280 | 1281 | --------------------------------------------------------------------------------