Implicit Staging of EDSL Expressions: A Bridge between Shallow and Deep Embedding
Implicit Staging of EDSL Expressions: A Bridge between Shallow and Deep Embedding
复制标题
EDSL 表达式的隐式分级:浅嵌入和深嵌入之间的桥梁
DOI:
10.1007/978-3-662-44202-9_16
复制
发表时间:
2014
期刊:
影响因子:
--
通讯作者:
Maximilian Scherr and Shigeru Chiba
中科院分区:
文献类型:
--
作者:
S.Dateki;M.Fukami;Y.Tanaka;G.Sasaki;T.Ogata;et al;Taisuke Izumi;李建権;Takai Y;Maximilian Scherr and Shigeru Chiba
Common implementation approaches for embedding DSLs in general-purpose host languages force developers to choose between ashallow(single-staged) embedding which offers seamless usage, but limits DSL developers, or adeep(multi-staged) embedding which offers freedom to optimize at will, but is less seamless to use and incurs additional runtime overhead. We propose a metaprogrammatic approach for extracting domain-specific programs from user programs for custom processing. This allows for similar optimization options as deep embedding, while still allowing for seamless embedded usage. We have implemented a simplified instance of this approach in a prototype framework for Java-embedded EDSL expressions, which relies on load-time reflection for improved deployability and usability.