Language embeddings that preserve staging and safety
Todd L. Veldhuizen

TL;DR
This paper explores embeddings of programming languages that preserve compile-time reductions, focusing on staging and safety, and introduces conditions for universality in these aspects to facilitate domain-specific language design.
Contribution
It introduces the concept of stage-universality and safety-universality for language embeddings, providing conditions for their realization and applications in DSELs and active libraries.
Findings
Defined 'Turing complete kernel' for stage-universality
Characterized safety-preserving embeddings and safety-universality
Proposed embeddings as candidates for domain-specific languages
Abstract
We study embeddings of programming languages into one another that preserve what reductions take place at compile-time, i.e., staging. A certain condition -- what we call a `Turing complete kernel' -- is sufficient for a language to be stage-universal in the sense that any language may be embedded in it while preserving staging. A similar line of reasoning yields the notion of safety-preserving embeddings, and a useful characterization of safety-universality. Languages universal with respect to staging and safety are good candidates for realizing domain-specific embedded languages (DSELs) and `active libraries' that provide domain-specific optimizations and safety checks.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Semantic Web and Ontologies
