Compilers Research

SSLANG (Sparse, Synchronous Language)
Fall 2021 - Spring 2023

SSLANG is a real-time, functional programming language with deterministic concurrency created by Stephen Edwards and John Hui.
As a member of Edwards' and Hui's research team, I contributed to the development
of the SSLANG compiler (written in Haskell) and runtime system (written in C).

Adding an Inlining Optimization Pass to the SSLANG Compiler

This year I switched gears from adding language constructs to the compiler, to optimizing our internal representation of programs through static inlining. Inlining in functional languages is a well explored subject, so I investigated questions like, What did other people do? Why do they do it that way? How can we cherry pick relevant pieces from existing work to create an inlining pass specialized for SSLANG?

I had the opportunity to pair up with another SSLANG team member for close reading of GHC’s inlining papers and code, and together we designed and implemented our own inlining optimization pass for SSLANG.

Research Report Spring 2023 Research Report Fall 2022
Handling some ADT Edge Cases + Updating the SSLANG Pretty Printer

My second semester research project focused slightly more on compiler engineering, namely, how ADTs were represented internally in our compiler. At the time, data constructors were represented as flat; they could not be partially applied. Now that we have basic ADTs working, how can we add partial application of data constructors? Given that we already have closures and partial applications working for functions, perhaps we could reuse those facilities for ADTs? What is the difference between a data constructor and a function? Why are they treated differently in our compiler, and at what point could their representations become synonymous?

I detail the thought process behind my answers to these questions in my Spring 2022 SSLANG Research Report, as well as summarize other additions to the compiler like my enhancement of our IR pretty printer.

Research Report Spring 2022
Adding Algebraic Data Types to the SSLANG Compiler

My first semester, I added algebraic data types to the code generation phase of the compiler, and contributed to design decisions regarding the representation of ADTs in the runtime system. How should user defined types be represented in C, and what are the tradeoffs of different kinds of representations? Which kinds of user defined types should be boxed? Should all of them be boxed?

My Fall 2021 SSLANG Research Report details my work in this area and eventual conclusions.

Research Report Fall 2021
Supervising New Team Members' Research Projects

In addition to working on my own research projects, I’ve had the opportunity to supervise the research projects of four new SSLANG team members. Some of the questions I asked myself as a supervisor: What are the best ways to introduce new students to SSLANG and its under-development compiler/evolving documentation? What documentation can I create that might help these students get familiar with the SSLANG compiler and how it works? How can I help my team members break their tasks into smaller, more incremental pieces so they can better achieve results? How can I help students balance conceptual/reading-research-paper tasks with actual SSLANG compiler coding, the latter of which is the ultimate goal?

Will link these students’ research reports as they become available :)