Imagine There’s No Source Code: Replay Diagnostic Location Information in Dynamic EDSL Meta-programming
Programs in embedded domain-specific languages are realized as graphs of objects of the host language rather than as static input texts. This property enables dynamic meta-programming, but also makes it harder to attach location information to diagnostic messages that arise at a later stage, after the program graph construction. Thus, EDSL-generating expressions and algorithms can be difficult to debug. Here, we present a technique for transparently capturing and replaying location information about the origin of EDSL program objects. It has been implemented in the context of the LLJava-live EDSL-to-bytecode compiler framework on the JVM. The basic idea can be generalized to other contexts, and to any managed runtime environment with reified stack traces.
Authors
- Baltasar Trancón y Widemann (ORCID: https://orcid.org/0009-0005-6799-4155)
- Markus Lepper (ORCID: https://orcid.org/0000-0002-9120-3908)
Publication Details
- Published
- 2024-09-13
- DOI
- https://doi.org/10.1145/3679007.3685061
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00