Automated selective caching for reference attribute grammars

  • Authors:
  • Emma Söderberg;Görel Hedin

  • Affiliations:
  • Department of Computer Science, Lund University, Sweden;Department of Computer Science, Lund University, Sweden

  • Venue:
  • SLE'10 Proceedings of the Third international conference on Software language engineering
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Reference attribute grammars (RAGs) can be used to express semantics as super-imposed graphs on top of abstract syntax trees (ASTs). A RAG-based AST can be used as the in-memory model providing semantic information for software language tools such as compilers, refactoring tools, and meta-modeling tools. RAG performance is based on dynamic attribute evaluation with caching. Caching all attributes gives optimal performance in the sense that each attribute is evaluated at most once. However, performance can be further improved by a selective caching strategy, avoiding caching overhead where it does not pay off. In this paper we present a profiling-based technique for automatically finding a good cache configuration. The technique has been evaluated on a generated Java compiler, compiling programs from the Jacks test suite and the DaCapo benchmark suite.