Yin-yang: concealing the deep embedding of DSLs

Deeply embedded domain-specific languages (EDSLs) intrinsically compromise programmer experience for improved program performance. Shallow EDSLs complement them by trading program performance for good programmer experience. We present Yin-Yang, a framework for DSL embedding that uses Scala macros to reliably translate shallow EDSL programs to the corresponding deep EDSL programs. The translation allows program prototyping and development in the user friendly shallow embedding, while the corresponding deep embedding is used where performance is important. The reliability of the translation completely conceals the deep em- bedding from the user. For the DSL author, Yin-Yang automatically generates the deep DSL embeddings from their shallow counterparts by reusing the core translation. This obviates the need for code duplication and leads to reliability by construction.


Published in:
Proceedings of the 2014 International Conference on Generative Programming: Concepts and Experiences - GPCE 2014, 73-82
Presented at:
International Conference on Generative Programming: Concepts and Experiences - GPCE 2014, Västerås, Sweden, 15-16 09 2014
Year:
2014
Publisher:
New York, New York, USA, ACM Press
Laboratories:




 Record created 2014-11-18, last modified 2018-03-18

n/a:
Download fulltext
PDF

Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)