Dynamix: A Domain-Specific Language for Dynamic Semantics

Master Thesis (2022)
Author(s)

T. Molendijk (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Contributor(s)

Eelco Visser – Mentor (TU Delft - Programming Languages)

Casper Poulsen – Mentor (TU Delft - Programming Languages)

Arie Deursen – Graduation committee member (TU Delft - Software Technology)

Andrew Tolmach – Graduation committee member (Portland State University)

Faculty
Electrical Engineering, Mathematics and Computer Science
Copyright
© 2022 Thijs Molendijk
More Info
expand_more
Publication Year
2022
Language
English
Copyright
© 2022 Thijs Molendijk
Graduation Date
30-08-2022
Awarding Institution
Delft University of Technology
Programme
Computer Science
Faculty
Electrical Engineering, Mathematics and Computer Science
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

The dynamic semantics of a programming language formally describe the runtime behavior of any given program. In this thesis, we present Dynamix, a meta-language for dynamic semantics. By writing a specification for a language in Dynamix, a compiler for the language can be derived automatically.

Dynamix specifications compile source programs to the Tim intermediate representation, a language-agnostic target IR designed to be able to be efficiently interpreted or compiled. Dynamix and Tim make use of the continuation-passing style to abstract over control flow, giving language developers fine-grained access to control flow primitives in their specification. A novel abstraction in Dynamix allows the construction of these CPS terms without the traditional friction involved. Dynamix is fully typed and integrated within the Spoofax language workbench. This allows language developers to interact directly with other parts of the workbench, including automatic type signature generation and the ability to query the results of static analysis.

Through case studies for miniStratego and ChocoPy with exceptions, we show that Dynamix is capable of succinctly representing a wide range of source language features and paradigms. Current performance is acceptable, with the foundations for a future efficient compiler for the Tim IR already in place.

Files

License info not available