Respect your parents

How attribution and rewriting can get along

Research output: Chapter in Book/Report/Conference proceedingConference proceeding contribution

4 Citations (Scopus)

Abstract

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 PublicationSwitzerland
PublisherSpringer, Springer Nature
Pages191-210
Number of pages20
Volume8706
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
Volume8706
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

ConferenceInternational conference on software language engineering (7th : 2014)
CountrySweden
CityVästerås
Period15/09/1416/09/14

    Fingerprint

Cite this

Sloane, A. M., Roberts, M., & Hamey, L. G. C. (2014). Respect your parents: How attribution and rewriting can get along. In B. Combemale, D. J. Pearce, O. Barais, & J. J. Vinju (Eds.), Software language engineering: 7th International Conference, SLE 2014, Västerås, Sweden, September 15-16, 2014 Proceedings (Vol. 8706, pp. 191-210). ( Lecture Notes in Computer Science; Vol. 8706). Switzerland: Springer, Springer Nature.