Everything old is new again: Quoted Domain Specific Languages
Shayan Najd, Sam Lindley, Josef Svenningsson, Philip Wadler

TL;DR
This paper introduces Quoted DSLs (QDSLs), a novel approach combining quotation and the subformula property to improve domain specific languages by sharing syntax with host languages and ensuring type safety.
Contribution
It presents a new methodology for DSL design using quotation and the subformula property, demonstrated through re-implementing Feldspar as a QDSL.
Findings
QDSLs enable sharing syntax and types with host languages.
Normalising quoted terms guarantees the subformula property.
QDSLs can outperform or match EDSLs in certain applications.
Abstract
We describe a new approach to domain specific languages (DSLs), called Quoted DSLs (QDSLs), that resurrects two old ideas: quotation, from McCarthy's Lisp of 1960, and the subformula property, from Gentzen's natural deduction of 1935. Quoted terms allow the DSL to share the syntax and type system of the host language. Normalising quoted terms ensures the subformula property, which guarantees that one can use higher-order types in the source while guaranteeing first-order types in the target, and enables using types to guide fusion. We test our ideas by re-implementing Feldspar, which was originally implemented as an Embedded DSL (EDSL), as a QDSL; and we compare the QDSL and EDSL variants.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Model-Driven Software Engineering Techniques · Advanced Software Engineering Methodologies
