Incremental Evaluation of Reference Attribute Grammars using Dynamic Dependency Tracking

Reference attribute grammars (RAGs) have proven practical for gen- erating production-quality compilers from declarative descriptions, as demonstrated by the JastAdd system. Recent results indicate their applicability also to generating semantic services in interactive editors. For use in editors, it is necessary to update the attribution after edit operations. Earlier algorithms based on statically scheduled incremental attribute evaluation are, however, not applicable to RAGs, as they do not account for the dynamic dependencies that reference attributes give rise to. In this report, we introduce a notion of consistency for RAG attributions, along with an algorithm for maintaining consistency after edit operations, based on dynamic dependency tracking. That is, we introduce a means to do incremental evaluation of RAGs using dynamic dependency tracking. (Less)

[1]  Emma Söderberg,et al.  Building semantic editors using JastAdd: tool demonstration , 2011, LDTA.

[2]  S. Doaitse Swierstra,et al.  Higher order attribute grammars , 1989, PLDI '89.

[3]  John Tang Boyland Analyzing Direct Non-local Dependencies in Attribute Grammars , 1998, CC.

[4]  Torbjörn Ekman,et al.  Demand-driven evaluation of collection attributes , 2009, Automated Software Engineering.

[5]  Görel Hedin,et al.  Reference Attributed Grammars , 2000, Informatica.

[6]  Görel Hedin,et al.  Circular reference attributed grammars - their evaluation and applications , 2003, Sci. Comput. Program..

[7]  John Tang Boyland,et al.  Remote attribute grammars , 2005, JACM.

[8]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[9]  Torbjörn Ekman,et al.  The jastadd extensible java compiler , 2007, OOPSLA.

[10]  Thomas W. Reps Optimal-time incremental semantic analysis for syntax-directed editors , 1982, POPL '82.

[11]  Thomas W. Reps,et al.  The synthesizer generator , 1984, SDE 1.

[12]  John Tang Boyland Incremental Evaluators for Remote Attribute Grammars , 2002, Electron. Notes Theor. Comput. Sci..

[13]  Martin Jourdan An Optimal-time Recursive Evaluator for Attribute Grammars , 1984, Symposium on Programming.

[14]  Arnd Poetzsch-Heffter Prototyping realistic programming languages based on formal specifications , 1997, Acta Informatica.

[15]  Görel Hedin,et al.  Automated Selective Caching for Reference Attribute Grammars , 2010, SLE.

[16]  João Saraiva,et al.  Lrc - A Generator for Incremental Language-Oriented Tools , 1998, International Conference on Compiler Construction.

[17]  Rodney Farrow Automatic generation of fixed-point-finding evaluators for circular, but well-defined, attribute grammars , 1986, SIGPLAN '86.

[18]  Tim Teitelbaum,et al.  Efficient incremental evaluation of aggregate values in attribute grammars , 1986, SIGPLAN '86.

[19]  Torbjörn Ekman,et al.  Sound and extensible renaming for java , 2008, OOPSLA.

[20]  Didier Parigot,et al.  Design, implementation and evaluation of the FNC-2 attribute grammar system , 1990, PLDI '90.

[21]  Thomas W. Reps,et al.  Incremental evaluation for attribute grammars with application to syntax-directed editors , 1981, POPL '81.

[22]  Torbjörn Ekman,et al.  Rewritable Reference Attributed Grammars , 2004, ECOOP.

[23]  Torbjörn Ekman,et al.  Modular Name Analysis for Java Using JastAdd , 2005, GTTSE.

[24]  Görel Hedin,et al.  JastAdd--an aspect-oriented compiler construction system , 2003, Sci. Comput. Program..