Advanced

Circular Reference Attributed Grammars - their Evaluation and Applications

Magnusson, Eva LU and Hedin, Görel LU (2007) In Science of Computer Programming 68(1). p.21-37
Abstract
This paper presents a combination of Reference Attributed Grammars (RAGs) and Circular Attribute Grammars (CAGs). While RAGs allow the direct and easy specification of non-locally dependent information, CAGs allow iterative fixed-point computations to be expressed directly using recursive (circular) equations. We demonstrate how the combined formalism, Circular Reference Attributed Grammars (CRAGs), can take advantage of both these strengths, making it possible to express solutions to many problems in an easy way. We exemplify with the specification and computation of the nullable, first, and follow sets used in parser construction, a problem which is highly recursive and normally programmed by hand using an iterative algorithm. We also... (More)
This paper presents a combination of Reference Attributed Grammars (RAGs) and Circular Attribute Grammars (CAGs). While RAGs allow the direct and easy specification of non-locally dependent information, CAGs allow iterative fixed-point computations to be expressed directly using recursive (circular) equations. We demonstrate how the combined formalism, Circular Reference Attributed Grammars (CRAGs), can take advantage of both these strengths, making it possible to express solutions to many problems in an easy way. We exemplify with the specification and computation of the nullable, first, and follow sets used in parser construction, a problem which is highly recursive and normally programmed by hand using an iterative algorithm. We also present a general demand-driven evaluation algorithm

for CRAGs and some optimizations of it. The approach has been implemented and experimental results include computations on a series of grammars including that of Java 1.2. We also revisit some of the classical examples of CAGs and show how their solutions are facilitated by CRAGs. (Less)
Please use this url to cite or link to this publication:
author
organization
publishing date
type
Contribution to journal
publication status
published
subject
keywords
fixed-point computations, Attribute grammars, Circular grammars
in
Science of Computer Programming
volume
68
issue
1
pages
21 - 37
publisher
Elsevier
external identifiers
  • wos:000249185700003
  • scopus:34547468967
ISSN
0167-6423
DOI
10.1016/j.scico.2005.06.005
language
English
LU publication?
yes
id
a42d66bd-599e-4d45-b783-a5de8b652497 (old id 633959)
date added to LUP
2007-12-18 09:40:09
date last changed
2017-03-12 04:02:16
@article{a42d66bd-599e-4d45-b783-a5de8b652497,
  abstract     = {This paper presents a combination of Reference Attributed Grammars (RAGs) and Circular Attribute Grammars (CAGs). While RAGs allow the direct and easy specification of non-locally dependent information, CAGs allow iterative fixed-point computations to be expressed directly using recursive (circular) equations. We demonstrate how the combined formalism, Circular Reference Attributed Grammars (CRAGs), can take advantage of both these strengths, making it possible to express solutions to many problems in an easy way. We exemplify with the specification and computation of the nullable, first, and follow sets used in parser construction, a problem which is highly recursive and normally programmed by hand using an iterative algorithm. We also present a general demand-driven evaluation algorithm<br/><br>
for CRAGs and some optimizations of it. The approach has been implemented and experimental results include computations on a series of grammars including that of Java 1.2. We also revisit some of the classical examples of CAGs and show how their solutions are facilitated by CRAGs.},
  author       = {Magnusson, Eva and Hedin, Görel},
  issn         = {0167-6423},
  keyword      = {fixed-point computations,Attribute grammars,Circular grammars},
  language     = {eng},
  number       = {1},
  pages        = {21--37},
  publisher    = {Elsevier},
  series       = {Science of Computer Programming},
  title        = {Circular Reference Attributed Grammars - their Evaluation and Applications},
  url          = {http://dx.doi.org/10.1016/j.scico.2005.06.005},
  volume       = {68},
  year         = {2007},
}