Type theory as a language workbench

de Muijnck-Hughes, Jan and Allais, Guillaume and Brady, Edwin; Lämmel, Ralf and Mosses, Peter and Steimann, Friedrich, eds. (2023) Type theory as a language workbench. In: Eelco Visser Commemorative Symposium (EVCS 2023). Open Access Series in Informatics (OASIcs), 109 . Schloss Dagstuhl - Leibniz-Zentrum für Informatik, Dagstuhl, Germany. ISBN 9783959772679 (https://doi.org/10.4230/OASIcs.EVCS.2023.9)

[thumbnail of Muijnck-Hughes-etal-EVCS-2023-Type-theory-as-a-language-workbench]
Preview
Text. Filename: Muijnck_Hughes_etal_EVCS_2023_Type_theory_as_a_language_workbench.pdf
Final Published Version
License: Creative Commons Attribution 4.0 logo

Download (656kB)| Preview

Abstract

Language Workbenches offer language designers an expressive environment in which to create their Domain Specific Languages (DSLs). Similarly, research into mechanised meta-theory has shown how dependently typed languages provide expressive environments to formalise and study DSLs and their meta-theoretical properties. But can we claim that dependently typed languages qualify as language workbenches? We argue yes! We have developed an exemplar DSL called Vélo that showcases not only dependently typed techniques to realise and manipulate Intermediate Representations (IRs), but that dependently typed languages make fine language workbenches. Vélo is a simple verified language with well-typed holes and comes with a complete compiler pipeline: parser, elaborator, REPL, evaluator, and compiler passes. Specifically, we describe our design choices for well-typed IR design that includes support for well-typed holes, how Common Sub-Expression Elimination (CSE) is achieved in a well-typed setting, and how the mechanised type-soundness proof for Vélo is the source of the evaluator.

ORCID iDs

de Muijnck-Hughes, Jan ORCID logoORCID: https://orcid.org/0000-0003-2185-8543, Allais, Guillaume ORCID logoORCID: https://orcid.org/0000-0002-4091-657X and Brady, Edwin; Lämmel, Ralf, Mosses, Peter and Steimann, Friedrich