Respect your parents: how attribution and rewriting can get along

Research output: Chapter in Book/Report/Conference proceedingConference proceeding contributionpeer-review

6 Citations (Scopus)


Attribute grammars describe how to decorate static trees. Rewriting systems describe how to transform trees into new trees. Attribution is undermined by rewriting because a node may appear in both the source and product of a transformation. If an attribute of that node depends on the node’s context, then a previously computed value may not be valid. We explore this problem and formalise it as a question of ancestry: the context of a node is given by the tree’s parent relationships and we must use the appropriate parents to calculate attributes that depend on the context. We show how respecting parents naturally leads to a view of context-dependent attributes as tree-indexed attribute families. Viewed in this way, attribution co-exists easily with rewriting transformations. We demonstrate the practicality of our approach by describing our implementation in the Kiama language processing library.

Original languageEnglish
Title of host publicationSoftware language engineering
Subtitle of host publication7th International Conference, SLE 2014, Västerås, Sweden, September 15-16, 2014 Proceedings
EditorsBenoît Combemale, David J. Pearce, Olivier Barais, Jurgen J. Vinju
Place of PublicationCham, Switzerland
PublisherSpringer, Springer Nature
Number of pages20
ISBN (Electronic)9783319112459
ISBN (Print)9783319112442
Publication statusPublished - 2014
EventInternational conference on software language engineering (7th : 2014) - Västerås, Sweden
Duration: 15 Sep 201416 Sep 2014

Publication series

Name Lecture Notes in Computer Science
PublisherSpringer International Publishing
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


ConferenceInternational conference on software language engineering (7th : 2014)


Dive into the research topics of 'Respect your parents: how attribution and rewriting can get along'. Together they form a unique fingerprint.

Cite this