Practical normalization by evaluation for EDSLs
Paper in proceeding, 2021

Embedded domain-specific languages (eDSLs) are typically implemented in a rich host language, such as Haskell, using a combination of deep and shallow embedding techniques. While such a combination enables programmers to exploit the execution mechanism of Haskell to build and specialize eDSL programs, it blurs the distinction between the host language and the eDSL. As a consequence, extension with features such as sums and effects requires a significant amount of ingenuity from the eDSL designer. In this paper, we demonstrate that Normalization by Evaluation (NbE) provides a principled framework for building, extending, and customizing eDSLs. We present a comprehensive treatment of NbE for deeply embedded eDSLs in Haskell that involves a rich set of features such as sums, arrays, exceptions and state, while addressing practical concerns about normalization such as code expansion and the addition of domain-specific features.

Partial Evaluation

Normalization by Evaluation

eDSL

Haskell

Author

Nachiappan Valliappan

Chalmers, Computer Science and Engineering (Chalmers), Information Security

Alejandro Russo

Chalmers, Computer Science and Engineering (Chalmers), Information Security

Sam Lindley

University of Edinburgh

Haskell 2021 - Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell, co-located with ICFP 2021

56-70
9781450386159 (ISBN)

14th ACM SIGPLAN International Symposium on Haskell, Haskell 2021, co-located with ICFP 2021
Virtual, Online, South Korea,

Octopi: Säker Programering för Sakernas Internet

Swedish Foundation for Strategic Research (SSF) (RIT17-0023), 2018-03-01 -- 2023-02-28.

Subject Categories

Embedded Systems

Computer Science

Computer Systems

DOI

10.1145/3471874.3472983

More information

Latest update

9/13/2021