Skip to main content
Thesis
COMPILING FROM A TYPED DIALECT OF SCHEME TO WEBASSEMBLY
(2020)
  • Christopher Rybicki, University of Massachusetts Amherst
Abstract
Compilers are an important kind of software engineering tool studied within the programming language community, which serve to transform written code from one language into another. One particularly significant compilation target is WebAssembly: a recently standardized assembly language that has been designed with portability, efficiency, and modularity in mind. WebAssembly has been integrated within browsers in order to offer developers the ability to run more computationally expensive processes and algorithms as an extension of JavaScript, allowing for the increased speed and efficiency of web applications. Our goal in this work is to show that we can design WebAssembly-targeted compilers for general languages in a way which, unlike most production compilers, guarantees type safety through all compiler passes. By achieving this goal, we hope to allow users to write type-safe programs which can be executed in a wide range of environments, while allowing compiler developers to debug, maintain, and extend their compilers more easily through the guarantees provided by type safety. To this end, we have successfully developed a prototype compiler from a typed variation of Scheme to WebAssembly which utilizes a robust type checker to validate intermediate code transformations for correctness. This required designing and implementing several compiler passes, such as closure conversion, lambda lifting, and code generation, in a fashion which is type-safe and adaptable to the limited data types and memory mechanisms available within the WebAssembly execution environment.
Disciplines
Publication Date
2020
Degree
B.S.
Field of study
Computer Science and Mathematics
Advisor
Arjun Guha
DOI
https://doi.org/10.7275/v0dq-9q86
Citation Information
Christopher Rybicki. "COMPILING FROM A TYPED DIALECT OF SCHEME TO WEBASSEMBLY" (2020)
Available at: http://works.bepress.com/christopher_rybicki/1/