Compositional Embeddings of Domain-Specific Languages
summary
Claims a compositional embedding implemented in the CP language that combines shallow and deep benefits by typing constructors with an abstract sort and merging constructors plus semantics via nested trait composition and intersection types. It uses trait-based interfaces, a fat‑arrow style dependency injection to allow mutual recursion between interpretations, and preserves sharing so duplicated subexpressions aren’t re-evaluated. The ExT document DSL is implemented and evaluated with three case studies (Minipedia, fractals, customizable charts), showing modular extensibility though Haskell/Scala encodings need much more boilerplate.
AI-written summary · about
chapters (19)
- 0:00Computational embeddings of DSLs
- 1:02Embedded vs external DSLs
- 2:05Shallow vs deep embeddings
- 3:33Linguistic reuse in embeddings
- 5:43Expression problem in DSLs
- 7:28Dependencies and extended expression problem
- 10:23Computational embeddings intro
- 11:49CP language features
- 12:51Linguistic reuse in CP
- 13:33Adding constructs and interpretations
- 14:40Trait composition in CP
- 16:11Handling dependencies in CP
- 17:41Comparison with embedding techniques
- 18:23Scaling with EXT
- 19:05Minipedia case study
- 19:50Fractals case study
- 20:11Customizable charts
- 20:31Haskell and Scala embeddings
- 21:31Q&A
related talks
35mDesigning Domain-Specific Languages: A Comparison of Three Approaches by Example
30mYin-Yang: Concealing the Deep Embedding of DSLs (Most Influential Paper)
17mDenotation-based Compositional Compiler Verification
20mImperative Compositional Programming: Type Sound Distributive Intersection Subtyping(…)
17mMacros for Domain-Specific Languages
26mA Rule-Based Approach for Designing and Composing Abstract Domains
21mCompositional pre-processing for automated reasoning in dependent type theory
31mEmbedding Functional Logic Programming in Haskell via a Compiler Plugin
