Embedding by Normalisation
Shayan Najd, Sam Lindley, Josef Svenningsson, Philip Wadler

TL;DR
This paper reveals a deep correspondence between practical embedding techniques for domain-specific languages and the theoretical framework of Normalisation-By-Evaluation, proposing Embedding-By-Normalisation (EBN) as a new structured approach.
Contribution
It introduces Embedding-By-Normalisation (EBN), a principled framework linking embedding and NBE, enabling the transfer of solutions like Type-Directed Partial Evaluation to embedding problems.
Findings
Deep correspondence between embedding components and NBE components
Application of NBE techniques to improve object code extraction
Solution for handling sum types and primitives in embedded programs
Abstract
This paper presents the insight that practical embedding techniques, commonly used for implementing Domain-Specific Languages, correspond to theoretical Normalisation-By-Evaluation (NBE) techniques, commonly used for deriving canonical form of terms with respect to an equational theory. NBE constitutes of four components: a syntactic domain, a semantic domain, and a pair of translations between the two. Embedding also often constitutes of four components: an object language, a host language, encoding of object terms in the host, and extraction of object code from the host. The correspondence is deep in that all four components in embedding and NBE correspond to each other. Based on this correspondence, this paper introduces Embedding-By-Normalisation (EBN) as a principled approach to study and structure embedding. The correspondence is useful in that solutions from NBE can be…
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.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Parallel Computing and Optimization Techniques
