Everything old is new again: Quoted domain-specific languages

Shayan Najd, Sam Lindley, Josef Svenningsson, Philip Wadler

Research output: Chapter in Book/Report/Conference proceedingConference contribution

25 Citations (Scopus)


We describe a new approach to implementing Domain-Specific Languages (DSLs), called Quoted DSLs (QDSLs), that is inspired by two old ideas: quasi-quotation, from McCarthy's Lisp of 1960, and the subformula principle of normal proofs, from Gentzen's natural deduction of 1935. QDSLs reuse facilities provided for the host language, since host and quoted terms share the same syntax, type system, and normalisation rules. QDSL terms are normalised to a canonical form, inspired by the subformula principle, 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. The two variants produce identical code.

Original languageEnglish
Title of host publicationPEPM '16: Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation
EditorsTiark Rompf, Martin Erwig
PublisherAssociation for Computing Machinery
Number of pages12
ISBN (Print)9781450340977
Publication statusPublished - Jan 2016
Event2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation - St. Petersburg, United States
Duration: 18 Jan 201619 Jan 2016


Conference2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation
Abbreviated titlePEPM 2016
Country/TerritoryUnited States
CitySt. Petersburg


  • Domain-specific language
  • DSL
  • EDSL
  • Embedded language
  • Normalisation
  • QDSL
  • Quotation
  • Subformula principle

ASJC Scopus subject areas

  • Computer Vision and Pattern Recognition
  • Software
  • Computer Graphics and Computer-Aided Design


Dive into the research topics of 'Everything old is new again: Quoted domain-specific languages'. Together they form a unique fingerprint.

Cite this