A Type Safe Calculus for Generating Syntax-Directed Editors
Editor calculi make it possible to describe the actions of syntax-directed editing and provide guarantees of safety through their specialized type system: Well-typed editor scripts produce well-formed programs. So far, such calculi have been language-specific. In this paper we present a generalized editor calculus, which can be used to specify a specialized syntax-directed editor for any language, given its abstract syntax. Moreover we show how to implement an editor generator that allows one to generate an editor calculus-based syntax-directed editor from a language specification. The generalized editor calculus can be encoded into a simply typed lambda calculus, extended with pairs, booleans, pattern matching and fixed points. This implies a general type safety result that holds for any instantiation.
Authors
- Hans Hüttel (ORCID: https://orcid.org/0000-0002-4603-5407)
- Andreas Tor Mortensen
- Nikolaj Rossander Kristensen (ORCID: https://orcid.org/0009-0005-2339-8247)
- Benjamin Bennetzen
- Peter Buus Steffensen
- Sune Skaanning Engtorp
Institutions
- University of Copenhagen (DK)
- Aalborg University (DK)
Publication Details
- Published
- 2025-01-10
- DOI
- https://doi.org/10.1145/3704253.3706140
- Citations
- 1
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 2.48