Print Email Facebook Twitter Compiling with Command Trees Title Compiling with Command Trees Author Bot, Bernard (TU Delft Electrical Engineering, Mathematics and Computer Science) Contributor Poulsen, C.B. (mentor) Visser, Eelco (graduation committee) Ozkan, B. (graduation committee) Degree granting institution Delft University of Technology Programme Computer Science Date 2021-05-19 Abstract Compilers translate high-level source code into low-level machine code. To represent source code a compiler uses a language called the intermediate representation (IR). An IR for the compilation of functional languages is continuation-passing style (CPS). It provides convenient abstractions for both data flow and control flow. However, CPS conversion is hard to write and the transformations on CPS are untyped. In this thesis we develop an IR based on CPS using the command tree data structure. Command trees allow us to express compiler transformations typically, declaratively, and modularly. The monadic nature of command trees allows us to bind commands together in a succinct manner. We test the usefulness of the new IR by building two versions of the LamToWat compiler that translates the lamdba calculus into WebAssembly. The first version will use a CPS IR and the second version a command tree IR. Subject compilercontinuationtreeprogramming language To reference this document use: http://resolver.tudelft.nl/uuid:05092e06-d67e-404a-b1ab-74bef499d3f2 Bibliographical note https://github.com/BernardBot/LamToWat Source code repository Part of collection Student theses Document type master thesis Rights © 2021 Bernard Bot Files PDF msc_thesis_b_bot_18_05_2021.pdf 475.59 KB Close viewer /islandora/object/uuid:05092e06-d67e-404a-b1ab-74bef499d3f2/datastream/OBJ/view