Profile-based abstraction and analysis of attribute grammar evaluation

Anthony M. Sloane*

*Corresponding author for this work

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

1 Citation (Scopus)


Attribute grammars enable complex algorithms to be defined on tree and graph structures by declarative equations. An understanding of how the equations cooperate is necessary to gain a proper understanding of an algorithm defined by an attribute grammar. Existing attribute grammar tools and libraries provide little assistance with understanding the behaviour of an attribute evaluator. To do better, we need a way to summarise behaviour in terms of attributes, their values, their relationships, and the structures that are being attributed. A simple approach to program profiling is presented that models program execution as a hierarchy of domain-specific profile records. An abstract event for attribute evaluation is defined and evaluators are modified to collect event instances at run-time and assemble the model. A flexible report writer summarises the event instances along both intrinsic and derived dimensions, including ones defined by the developer. Selecting appropriate dimensions produces reports that expose complex properties of evaluator behaviour in a convenient way. The approach is illustrated and evaluated using the profiler we have built for the Kiama language processing library. We show that the method is both useful and practical.

Original languageEnglish
Title of host publicationSoftware Language Engineering
Subtitle of host publication5th International Conference, SLE 2012, Dresden, Germany, September 26-28, 2012, Revised Selected Papers
EditorsKrzysztof Czarnecki, Görel Hedin
Place of PublicationHeidelberg
PublisherSpringer, Springer Nature
Number of pages20
ISBN (Electronic)9783642360893
ISBN (Print)9783642360886
Publication statusPublished - 2013
Event5th International Conference on Software Language Engineering, SLE 2012 - Dresden, Germany
Duration: 26 Sept 201228 Sept 2012

Publication series

NameLecture Notes in Computer Science
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Other5th International Conference on Software Language Engineering, SLE 2012


Dive into the research topics of 'Profile-based abstraction and analysis of attribute grammar evaluation'. Together they form a unique fingerprint.

Cite this