Explorar o código

Merge branch 'master' into pjt

Peter Thiemann %!s(int64=3) %!d(string=hai) anos
pai
achega
085d0ff942
Modificáronse 3 ficheiros con 634 adicións e 202 borrados
  1. 181 0
      book.bib
  2. 417 192
      book.tex
  3. 36 10
      defs.tex

+ 181 - 0
book.bib

@@ -1,3 +1,184 @@
+@inproceedings{Hatcliff:1994ea,
+	address = {New York, NY, USA},
+	author = {John Hatcliff and Olivier Danvy},
+	booktitle = {POPL '94: Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages},
+	date-added = {2005-11-25 10:47:59 -0600},
+	date-modified = {2010-12-17 10:23:11 -0700},
+	isbn = {0-89791-636-0},
+	location = {Portland, Oregon, United States},
+	pages = {458--471},
+	publisher = {ACM Press},
+	title = {A generic account of continuation-passing styles},
+	year = {1994}}
+
+@article{Plotkin:1975,
+	author = {G. D. Plotkin},
+	date-added = {2005-11-25 10:55:03 -0600},
+	date-modified = {2009-08-25 22:28:20 -0600},
+	journal = {Theoretical Computer Science},
+	month = {December},
+	number = {2},
+	pages = {125-159},
+	rating = {5},
+	read = {Yes},
+	title = {Call-by-name, call-by-value and the lambda-calculus},
+	volume = {1},
+	year = {1975}}
+
+@inproceedings{Lawall:1993,
+author = {Lawall, Julia L. and Danvy, Olivier},
+title = {Separating Stages in the Continuation-Passing Style Transformation},
+year = 1993,
+isbn = 0897915607,
+publisher = {Association for Computing Machinery},
+address = {New York, NY, USA},
+url = {https://doi.org/10.1145/158511.158613},
+doi = {10.1145/158511.158613},
+booktitle = {Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages},
+pages = {124–136},
+numpages = 13,
+location = {Charleston, South Carolina, USA},
+series = {POPL '93}
+}
+
+@book{Friedman:2001,
+  author    = {Daniel P. Friedman and
+               Mitchell Wand and
+               Christopher T. Haynes},
+  title     = {Essentials of programming languages {(2.} ed.)},
+  publisher = {{MIT} Press},
+  year      = 2001,
+  isbn      = {978-0-262-06217-6},
+  timestamp = {Fri, 15 Apr 2011 13:37:34 +0200},
+  biburl    = {https://dblp.org/rec/books/daglib/0017436.bib},
+  bibsource = {dblp computer science bibliography, https://dblp.org}
+}
+
+@inproceedings{Fischer:1972,
+author = {Fischer, Michael J.},
+title = {Lambda Calculus Schemata},
+year = 1972,
+isbn = 9781450378918,
+publisher = {Association for Computing Machinery},
+address = {New York, NY, USA},
+url = {https://doi.org/10.1145/800235.807077},
+doi = {10.1145/800235.807077},
+booktitle = {Proceedings of ACM Conference on Proving Assertions about
+                  Programs},
+pages = {104–109},
+numpages = 6,
+location = {Las Cruces, New Mexico, USA}
+}
+  
+@InProceedings{Wijngaarden:1966,
+  author = 	 {Adriaan {van Wijngaarden}},
+  title = 	 {Recursive definition of syntax and semantics},
+  booktitle = {Formal Language Description Languages for Computer Programming},
+  year = 	 1966,
+  editor = 	 {T. B. Steel, Jr.},
+  pages = 	 {13-24},
+  publisher = {North-Holland}}
+
+@book{Aho:2006wb,
+	address = {USA},
+	author = {Aho, Alfred V. and Lam, Monica S. and Sethi, Ravi and Ullman, Jeffrey D.},
+	date-added = {2021-10-22 09:38:52 -0400},
+	date-modified = {2021-10-22 09:38:59 -0400},
+	isbn = {0321486811},
+	publisher = {Addison-Wesley Longman Publishing Co., Inc.},
+	title = {Compilers: Principles, Techniques, and Tools (2nd Edition)},
+	year = {2006}}
+
+@article{Logothetis:1981,
+author = {Logothetis, George and Mishra, Prateek},
+title = {Compiling short-circuit boolean expressions in one pass},
+journal = {Software: Practice and Experience},
+volume = {11},
+number = {11},
+pages = {1197-1214},
+keywords = {Short-circuit evaluation, One-pass compilation, Boolean expressions, Code generation},
+doi = {https://doi.org/10.1002/spe.4380111104},
+url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/spe.4380111104},
+eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/spe.4380111104},
+abstract = {Abstract We present a very simple scheme for compiling boolean expressions in the short-circuit manner in one pass. The generated code is of very high quality and avoids most inefficiencies commonly associated with one-pass code generation. In particular, redundant conditional and unconditional branches are kept to a minimum. The scheme is general enough to compile the boolean expressions of a typical high-level language such as Pascal. It is presented in a format suited for syntax-directed translation and can be used with both top-down and bottom-up parsing.},
+year = {1981}
+}
+
+@article{Clarke:1989,
+author = {Clarke, Keith},
+title = {One-Pass Code Generation Using Continuations},
+year = {1989},
+issue_date = {Dec. 1989},
+publisher = {John Wiley & Sons, Inc.},
+address = {USA},
+volume = {19},
+number = {12},
+issn = {0038-0644},
+journal = {Softw. Pract. Exper.},
+month = nov,
+pages = {1175–1192},
+numpages = {18}
+}
+
+@article{Moggi:1991in,
+	address = {Duluth, MN, USA},
+	annote = {Journal version of the 1989 Computational Lambda-Calculus and Monads},
+	author = {Eugenio Moggi},
+	date-added = {2005-11-25 10:58:45 -0600},
+	date-modified = {2010-12-17 10:23:11 -0700},
+	issn = {0890-5401},
+	journal = {Inf. Comput.},
+	number = {1},
+	pages = {55--92},
+	publisher = {Academic Press, Inc.},
+	title = {Notions of computation and monads},
+	volume = {93},
+	year = {1991},
+	Bdsk-File-1 = {YnBsaXN0MDDRAQJccmVsYXRpdmVQYXRoWGljOTEucGRmCAsYAAAAAAAAAQEAAAAAAAAAAwAAAAAAAAAAAAAAAAAAACE=},
+	Bdsk-Url-1 = {http://dx.doi.org/10.1016/0890-5401(91)90052-4}}
+
+@article{Flatt:2019tb,
+	abstract = {We rebuilt Racket on Chez Scheme, and it works well---as long as we're allowed
+a few patches to Chez Scheme. DrRacket runs, the Racket distribution can build itself,
+and nearly all of the core Racket test suite passes. Maintainability and performance
+of the resulting implementation are good, although some work remains to improve end-to-end
+performance. The least predictable part of our effort was how big the differences
+between Racket and Chez Scheme would turn out to be and how we would manage those
+differences. We expect Racket on Chez Scheme to become the main Racket implementation,
+and we encourage other language implementers to consider Chez Scheme as a target virtual
+machine.},
+	address = {New York, NY, USA},
+	articleno = {78},
+	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},
+	date-added = {2021-10-21 14:03:11 -0400},
+	date-modified = {2021-10-21 14:03:16 -0400},
+	doi = {10.1145/3341642},
+	issue_date = {August 2019},
+	journal = {Proc. ACM Program. Lang.},
+	keywords = {Racket, Scheme},
+	month = jul,
+	number = {ICFP},
+	numpages = {15},
+	publisher = {Association for Computing Machinery},
+	title = {Rebuilding Racket on Chez Scheme (Experience Report)},
+	url = {https://doi.org/10.1145/3341642},
+	volume = {3},
+	year = {2019},
+	Bdsk-File-1 = {YnBsaXN0MDDRAQJccmVsYXRpdmVQYXRoWzMzNDE2NDIucGRmCAsYAAAAAAAAAQEAAAAAAAAAAwAAAAAAAAAAAAAAAAAAACQ=},
+	Bdsk-Url-1 = {https://doi.org/10.1145/3341642}}
+
+@incollection{Danvy:2003fk,
+	author = {Danvy, Olivier},
+	booktitle = {Compiler Construction},
+	date-added = {2013-01-02 15:56:48 -0700},
+	date-modified = {2013-01-02 15:58:19 -0700},
+	pages = {77-89},
+	series = {LNCS},
+	title = {A New One-Pass Transformation into Monadic Normal Form},
+	volume = {2622},
+	year = {2003},
+	Bdsk-File-1 = {YnBsaXN0MDDRAQJccmVsYXRpdmVQYXRoXxA0RGFudnkyMDAzX0NoYXB0ZXJfQU5ld09uZS1QYXNzVHJhbnNmb3JtYXRpb25JbnRvLnBkZggLGAAAAAAAAAEBAAAAAAAAAAMAAAAAAAAAAAAAAAAAAABP},
+	Bdsk-Url-1 = {http://dx.doi.org/10.1007/3-540-36579-6_6}}
 
 @article{PeytonJones:1998,
 	author = {Simon L. {Peyton Jones} and Andr{\'e}L.M. Santos},

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 417 - 192
book.tex


+ 36 - 10
defs.tex

@@ -11,12 +11,14 @@
 \newcommand{\LangVar}{$\Lang_{\mathsf{Var}}$} % R1
 \newcommand{\LangVarM}{\Lang_{\mathsf{Var}}}
 
-\newcommand{\LangVarANF}{\ensuremath{\Lang^{\mathsf{ANF}}_{\mathsf{Var}}}}
-\newcommand{\LangVarANFM}{\Lang^{\mathsf{ANF}}_{\mathsf{Var}}}
+\newcommand{\RCO}{\mathit{mon}} % output of remove-complex-opera*
+
+\newcommand{\LangVarANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{Var}}}}
+\newcommand{\LangVarANFM}{\Lang^{\RCO}_{\mathsf{Var}}}
 
 \newcommand{\LangIf}{$\Lang_{\mathsf{If}}$} %R2
 \newcommand{\LangIfM}{\ensuremath{\Lang_{\mathsf{If}}}} %R2
-\newcommand{\LangIfANF}{\ensuremath{\Lang^{\mathsf{ANF}}_{\mathsf{if}}}} %R2
+\newcommand{\LangIfANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{if}}}} %R2
 
 \newcommand{\LangCVar}{$\CLang_{\mathsf{Var}}$} % C0
 \newcommand{\LangCVarM}{\CLang_{\mathsf{Var}}} % C0
@@ -27,18 +29,20 @@
 \newcommand{\LangStruct}{\ensuremath{\Lang^{\mathsf{Struct}}_{\mathsf{Tup}}}} %\Lang^s3
 \newcommand{\LangCVec}{$\CLang_{\mathsf{Tup}}$} %C2
 \newcommand{\LangCVecM}{\CLang_{\mathsf{Tup}}} %C2
-\newcommand{\LangVecANF}{\ensuremath{\Lang^{\mathsf{ANF}}_{\mathsf{Tup}}}} %R3
-\newcommand{\LangVecANFM}{\Lang^{\mathsf{ANF}}_{\mathsf{Tup}}} %R3
+\newcommand{\LangVecANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{Tup}}}} %R3
+\newcommand{\LangVecANFM}{\Lang^{\RCO}_{\mathsf{Tup}}} %R3
 \newcommand{\LangAlloc}{\ensuremath{\Lang_{\mathsf{Alloc}}}} %R3'
+\newcommand{\LangAllocANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{Alloc}}}} %R3'
 \newcommand{\LangFun}{$\Lang_{\mathsf{Fun}}$} %R4
 \newcommand{\LangFunM}{\Lang_{\mathsf{Fun}}} %R4
 \newcommand{\LangCFun}{$\CLang_{\mathsf{Fun}}$} %C3
 \newcommand{\LangCFunM}{\CLang_{\mathsf{Fun}}} %C3
-\newcommand{\LangFunANF}{\ensuremath{\Lang^{\mathsf{ANF}}_{\mathsf{Fun}}}} %R4
+\newcommand{\LangFunANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{FunRef}}}} %R4
 \newcommand{\LangFunRef}{$\Lang_{\mathsf{FunRef}}$} %F1
 \newcommand{\LangFunRefM}{\Lang_{\mathsf{FunRef}}} %F1
 \newcommand{\LangFunRefAlloc}{\ensuremath{\Lang^{\mathsf{Alloc}}_{\mathsf{FunRef}}}} %R'4
 \newcommand{\LangLam}{$\Lang_\lambda$} %R5
+\newcommand{\LangLamFunRef}{$\Lang_\lambda^{\mathsf{FunRef}}$} 
 \newcommand{\LangLamM}{\ensuremath{\Lang_\lambda}} %R5
 \newcommand{\LangCLam}{$\CLang_{\mathsf{Clos}}$} %C4
 \newcommand{\LangCLamM}{\CLang_{\mathsf{Clos}}} %C4
@@ -57,7 +61,7 @@
 \newcommand{\LangLoopAlloc}{\ensuremath{\Lang^{\mathsf{Alloc}}_{\mathsf{While}}}} %R'8
 \newcommand{\LangCLoop}{$\CLang_{\circlearrowleft}$} %C7
 \newcommand{\LangCLoopM}{\CLang_{\circlearrowleft}} %C7
-\newcommand{\LangLoopANF}{\ensuremath{\Lang^{\mathsf{ANF}}_{\mathsf{While}}}} %R8
+\newcommand{\LangLoopANF}{\ensuremath{\Lang^{\RCO}_{\mathsf{While}}}} %R8
 \newcommand{\LangArray}{\ensuremath{\Lang^{\mathsf{Vecof}}_{\mathsf{While}}}} %\Lang^s3
 \newcommand{\LangGrad}{$\Lang_{\mathsf{?}}$} %R9
 \newcommand{\LangGradM}{\Lang_{\mathsf{?}}} %R9
@@ -140,9 +144,18 @@
 \newcommand{\COR}[2]{\CBINOP{\key{or}}{#1}{#2}}
 \newcommand{\INTTY}{{\key{Integer}}}
 \newcommand{\BOOLTY}{{\key{Boolean}}}
+\newcommand{\VECTY}[1]{{\LP\key{Vector}#1\RP}}
 \newcommand{\CPROGRAM}[2]{\LP\code{CProgram}~#1~#2\RP}
 \newcommand{\LET}[3]{\key{(Let}~#1~#2~#3\key{)}}
 \newcommand{\CLET}[3]{\LP\key{let}~\LP\LS#1~#2\RS\RP~#3\RP}
+\newcommand{\COLLECT}[1]{\LP\key{Collect}~#1\RP}
+\newcommand{\CCOLLECT}[1]{\LP\key{collect}~#1\RP}
+\newcommand{\ALLOCATE}[2]{\LP\key{Allocate}~#1~#2\RP}
+\newcommand{\CALLOCATE}[2]{\LP\key{allocate}~#1\RP}
+\newcommand{\GLOBAL}[1]{\LP\key{Global}~#1\RP}
+\newcommand{\CGLOBAL}[1]{#1\key{(\%rip)}}
+\newcommand{\GLOBALVALUE}[1]{\LP\key{GlobalValue}~#1\RP}
+\newcommand{\CGLOBALVALUE}[1]{\LP\key{global-value}~#1\RP}
 \fi
 
 \if\edition\pythonEd
@@ -184,8 +197,21 @@
 \newcommand{\COR}[2]{#1~\key{or}~#2}
 \newcommand{\INTTY}{{\key{int}}}
 \newcommand{\BOOLTY}{{\key{bool}}}
-\fi
+\newcommand{\VECTY}[1]{{\key{Tuple}\LS #1 \RS}}
+\newcommand{\COLLECT}[1]{\key{Collect}\LP#1\RP}
+\newcommand{\CCOLLECT}[1]{\key{collect}\LP#1\RP}
+\newcommand{\ALLOCATE}[2]{\key{Allocate}\LP#1,#2\RP}
+\newcommand{\CALLOCATE}[2]{\key{allocate}\LP#1\RP}
+\newcommand{\GLOBALVALUE}[1]{\key{GlobalValue}\LP#1\RP}
+\newcommand{\CGLOBALVALUE}[1]{\key{global\_value}\LP#1\RP}
+\newcommand{\GLOBAL}[1]{\key{Global}\LP#1\RP}
+\newcommand{\CGLOBAL}[1]{#1\LP\key{\%rip}\RP}
+\fi % pythonEd
 
+\if\edition\racketEd
+\newcommand{\BEGIN}[2]{\LP\key{Begin}~#1~#2\RP}
+\newcommand{\CBEGIN}[2]{\LP\key{begin}~#1~#2\RP}
+\fi
 \newcommand{\PRIM}[2]{\LP\key{Prim}~#1~\LP #2\RP\RP}
 \newcommand{\CNEG}[1]{\LP\key{-}~#1\RP}
 \newcommand{\PROGRAMDEFSEXP}[3]{\code{(ProgramDefsExp}~#1~#2~#3\code{)}}
@@ -195,9 +221,7 @@
 \newcommand{\CSUB}[2]{\LP\key{-}~#1~#2\RP}
 \newcommand{\CWHILE}[2]{\LP\key{while}~#1~#2\RP}
 \newcommand{\WHILE}[2]{\LP\key{WhileLoop}~#1~#2\RP}
-\newcommand{\CBEGIN}[2]{\LP\key{begin}~#1~#2\RP}
 \newcommand{\CMAKEVEC}[2]{\LP\key{make-vector}~#1~#2\RP}
-\newcommand{\BEGIN}[2]{\LP\key{Begin}~#1~#2\RP}
 \newcommand{\CSETBANG}[2]{\LP\key{set!}~#1~#2\RP}
 \newcommand{\SETBANG}[2]{\LP\key{SetBang}~#1~#2\RP}
 \newcommand{\GETBANG}[1]{\LP\key{GetBang}~#1\RP}
@@ -243,6 +267,8 @@
 \newcommand{\CASSIGN}[2]{#1~\key{=}~#2}
 \newcommand{\ASSIGN}[2]{\key{Assign}\LP\LS #1\RS\key{, }#2\RP}
 \newcommand{\IFSTMT}[3]{\key{If}\LP #1 \code{, } #2 \code{, } #3 \RP}
+\newcommand{\CBEGIN}[2]{\key{begin:}~#1~#2}
+\newcommand{\BEGIN}[2]{\key{Begin}\LP#1\code{, }#2\RP}
 \newcommand{\WHILESTMT}[2]{\key{While}\LP #1 \code{, } #2 \code{, []}\RP}
 \newcommand{\RETURN}[1]{\key{Return}\LP #1 \RP}
 \newcommand{\GOTO}[1]{\key{Goto}\LP #1 \RP}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio