Daedalus: A New Approach to Metacompilation
Presentation Type
Oral Presentation
Category
STEM (science, technology, engineering, mathematics)
Abstract/Artist Statement
A meta compiler is a compiler for compilers. It produces a working compiler based on a formal description of a programming language. Although they were introduced in the 1960s, they have yet to see widespread adoption. This isn't a knock on the concept of meta compilation but rather a failure to design an efficient architecture without sacrificing capability. Every existing meta compiler makes tradeoffs, making them impractical. Silver and Spoofax provide composability and modularity at the cost of efficiency. Adjacent tools like Racket and LLVM are far more popular. However, they lack many of the key capabilities of meta compilers. Racket allows for robust language extensions, but only within the bounds of an S-expression; while it does have reader macros, they fall short of the full capabilities of a parser generator. LLVM provides an efficient universal backend but fails to address the frontend. There is a tremendous gap for an efficient, practical, modular, and composable meta-compiler. Daedalus is designed to fill that gap.
Daedalus operates on a user-defined grammar and a series of Turing-complete AST operations. It produces a compiler that validates program strings and evaluates them by reducing them to a quasi-universal high-level language called Base. Daedalus does most of the work once, at compiler build time, ensuring very efficient compilers. We believe this novel approach leads to a true practical meta-compiler. Additionally, we speculate it allows for new capabilities, like using a meta compiler as a proof device.
Mentor Name
Lucia Williams
Daedalus: A New Approach to Metacompilation
UC 326
A meta compiler is a compiler for compilers. It produces a working compiler based on a formal description of a programming language. Although they were introduced in the 1960s, they have yet to see widespread adoption. This isn't a knock on the concept of meta compilation but rather a failure to design an efficient architecture without sacrificing capability. Every existing meta compiler makes tradeoffs, making them impractical. Silver and Spoofax provide composability and modularity at the cost of efficiency. Adjacent tools like Racket and LLVM are far more popular. However, they lack many of the key capabilities of meta compilers. Racket allows for robust language extensions, but only within the bounds of an S-expression; while it does have reader macros, they fall short of the full capabilities of a parser generator. LLVM provides an efficient universal backend but fails to address the frontend. There is a tremendous gap for an efficient, practical, modular, and composable meta-compiler. Daedalus is designed to fill that gap.
Daedalus operates on a user-defined grammar and a series of Turing-complete AST operations. It produces a compiler that validates program strings and evaluates them by reducing them to a quasi-universal high-level language called Base. Daedalus does most of the work once, at compiler build time, ensuring very efficient compilers. We believe this novel approach leads to a true practical meta-compiler. Additionally, we speculate it allows for new capabilities, like using a meta compiler as a proof device.