Rewriting Macros on the Fly
Administrative reductions are extra steps introduced by program transformations, usually as a form of bookkeeping new information needed by the transformation. While this can keep transformations themselves simple and small, they have the unfortunate effect of making the programs they produce more costly in terms of run-time resources and---worse still---cognitive resources used by humans trying to read and debug their code. This paper introduces a general-purpose technique for eliminating administrative expressions in macros using localized rewriting rules. The result is a system of writing and rewriting compositional macros (both in the sense that the macros are defined as compositional functions, and that several different macros can be combined without administrative reductions) that can be extended by the programmer with new functionality.
Authors
- Paul Downen (ORCID: https://orcid.org/0000-0003-0165-9387)
Institutions
- University of Massachusetts Lowell (US)
Publication Details
- Published
- 2025-10-09
- DOI
- https://doi.org/10.1145/3759537.3762693
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00