On Friday October 17, this site was moved to a new server, https://mw.hh.se. The original address will continue to work. Whithin a week or two this site will return to the original address. /Peo HH IT-dep

WG211/M15Sloane: Difference between revisions

From WG 2.11
Jump to navigationJump to search
Tony (talk | contribs)
Created page with "''Respect Your Parents: How Attribution and Rewriting Can Get Along'' Anthony Sloane, Macquarie University Attribute grammars describe how to decorate static trees. Rewriting s..."
 
Tony (talk | contribs)
Add slides for Sloane talk
 
Line 4: Line 4:


Attribute grammars describe how to decorate static trees. Rewriting systems describe how to transform trees into new trees. Attri- bution 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 de- pend 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 transfor- mations. We demonstrate the practicality of our approach by describing our implementation in the Kiama language processing library.
Attribute grammars describe how to decorate static trees. Rewriting systems describe how to transform trees into new trees. Attri- bution 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 de- pend 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 transfor- mations. We demonstrate the practicality of our approach by describing our implementation in the Kiama language processing library.
[https://speakerdeck.com/inkytonik/respect-your-parents-how-attribution-and-rewriting-can-get-along-1 Slides]

Latest revision as of 15:07, 10 November 2015

Respect Your Parents: How Attribution and Rewriting Can Get Along

Anthony Sloane, Macquarie University

Attribute grammars describe how to decorate static trees. Rewriting systems describe how to transform trees into new trees. Attri- bution 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 de- pend 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 transfor- mations. We demonstrate the practicality of our approach by describing our implementation in the Kiama language processing library.

Slides