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)

Abstract

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
Pages24-43
Number of pages20
Volume7745
ISBN (Electronic)9783642360893
ISBN (Print)9783642360886
DOIs
Publication statusPublished - 2013
Event5th International Conference on Software Language Engineering, SLE 2012 - Dresden, Germany
Duration: 26 Sep 201228 Sep 2012

Publication series

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

Other

Other5th International Conference on Software Language Engineering, SLE 2012
CountryGermany
CityDresden
Period26/09/1228/09/12

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

Cite this