Polymorphic embedding of dsls

The influential pure embedding methodology of embedding domain-specific languages (DSLs) as libraries into a general-purpose host language forces the DSL designer to commit to a single semantics. This precludes the subsequent addition of compilation, optimization or domain-specific analyses. We propose polymorphic embedding of DSLs, where many different interpretations of a DSL can be provided as reusable components, and show how polymorphic embedding can be realized in the programming language Scala. With polymorphic embedding, the static type-safety, modularity, composability and rapid prototyping of pure embedding are reconciled with the flexibility attainable by external toolchains.

[1]  Martin Odersky,et al.  A Nominal Theory of Objects with Dependent Types , 2003, ECOOP.

[2]  Torbjörn Ekman,et al.  The jastadd extensible java compiler , 2007, OOPSLA.

[3]  Simon L. Peyton Jones,et al.  Template meta-programming for Haskell , 2002, Haskell '02.

[4]  Walid Taha,et al.  A Gentle Introduction to Multi-stage Programming , 2003, Domain-Specific Program Generation.

[5]  Eric Van Wyk,et al.  Attribute Grammar-Based Language Extensions for Java , 2007, ECOOP.

[6]  PaakkiJukka Attribute grammar paradigmsa high-level methodology in language implementation , 1995 .

[7]  Paul Hudak,et al.  Modular domain specific languages and tools , 1998, Proceedings. Fifth International Conference on Software Reuse (Cat. No.98TB100203).

[8]  Joseph A. Goguen,et al.  Initial Algebra Semantics and Continuous Algebras , 1977, J. ACM.

[9]  Martin Odersky,et al.  Scalable component abstractions , 2005, OOPSLA '05.

[10]  Jukka Paakki,et al.  Attribute grammar paradigms—a high-level methodology in language implementation , 1995, CSUR.

[11]  Oege de Moor,et al.  Compiling embedded languages , 2003, J. Funct. Program..

[12]  Martin Odersky,et al.  An Overview of the Scala Programming Language , 2004 .

[13]  Jacques Carette,et al.  Finally Tagless, Partially Evaluated , 2007, APLAS.

[14]  Samuel N. Kamin Research on Domain-specific Embedded Languages and Program Generators , 1997, US-Brazil Joint Workshops on the Formal Foundations of Software Systems.

[15]  M Mernik,et al.  When and how to develop domain-specific languages , 2005, CSUR.

[16]  Gang Chen,et al.  Guarded recursive datatype constructors , 2003, POPL '03.

[17]  Tim Sheard,et al.  WHAT IS A PROOF , 2005 .

[18]  Eugenio Moggi A Modular Approach to Denotational Semantics , 1991, Category Theory and Computer Science.

[19]  Martin Odersky,et al.  Generics of a higher kind , 2008, OOPSLA.

[20]  Jaakko Järvi,et al.  An extended comparative study of language support for generic programming , 2007, Journal of Functional Programming.

[21]  Krzysztof Czarnecki,et al.  DSL Implementation in MetaOCaml, Template Haskell, and C++ , 2003, Domain-Specific Program Generation.

[22]  Erik Ernst,et al.  Family Polymorphism , 2001, ECOOP.

[23]  Paul Hudak,et al.  Building domain-specific embedded languages , 1996, CSUR.

[24]  Jacques Carette,et al.  Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages , 2007, Journal of Functional Programming.

[25]  Manuel M. T. Chakravarty,et al.  Optimising Embedded DSLs Using Template Haskell , 2004, GPCE.

[26]  Peter D. Mosses,et al.  Denotational semantics , 1995, LICS 1995.

[27]  Shan Shan Huang,et al.  Morphing: Safely Shaping a Class in the Image of Others , 2007, ECOOP.

[28]  Peter D. Mosses,et al.  Modular structural operational semantics , 2004, J. Log. Algebraic Methods Program..

[29]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[30]  W. Cook,et al.  A Virtual Class Calculus , 2005 .

[31]  Graham Hutton,et al.  Monadic parsing in Haskell , 1998, Journal of Functional Programming.

[32]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.