On Friday October 17, this site was moved to a new server, https://mw.hh.se. The original address will continue to work. Whithin a week or two this site will return to the original address. /Peo HH IT-dep

WG211/M25Lundquist

From WG 2.11
Revision as of 17:50, 10 November 2025 by Bernd (talk | contribs) (Created page with "Kiselyov et al. introduced the notion of refined environment classifiers, which ensure scope-safe code generation with mutable state by annotating code types with *classifiers* that record the scoping information of code fragments. While their proposal was developed for a two-level, combinator-based code-generation language, we adapt their idea to quasi-quotation-based multi-stage programming in the style of MetaML. The resulting language guarantees scope-safe code ge...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Kiselyov et al. introduced the notion of refined environment classifiers, which ensure scope-safe code generation with mutable state by annotating code types with *classifiers* that record the scoping information of code fragments. While their proposal was developed for a two-level, combinator-based code-generation language, we adapt their idea to quasi-quotation-based multi-stage programming in the style of MetaML.

The resulting language guarantees scope-safe code generation even in the presence of mutable state, thereby resolving the long-standing issue of scope extrusion in MetaML. We also show that our language can express a form of cross-stage persistence, and that **polymorphism over classifiers** can be incorporated into the type system to further enhance its expressiveness.