Origin tracking in attribute grammars

Kevin Williams, Eric van Wyk

Research output: Contribution to journalArticlepeer-review

1 Scopus citations

Abstract

Origin tracking is a technique for relating the output of a transformation back to its input. In term rewriting systems, where this notion was developed, it relates subtrees in the resulting normal form term to the original term. The technique is useful in several settings, including program debugging and error reporting. We show how origin tracking can be integrated into higher-order attribute grammars, which construct new syntax trees during attribute evaluation. Furthermore, we extend origins with additional information to track sub trees that correspond to the redex and contractum of rewrite rules when implemented using attribute grammars. The computation of origins and their extensions is formally defined using big-step operational semantics. Finally we describe a program transformation framework as an example use of origin tracking in attribute grammars.

Fingerprint Dive into the research topics of 'Origin tracking in attribute grammars'. Together they form a unique fingerprint.

Cite this