Abstract
This paper presents a new strict, purely functional implementation of attribute grammars. Incremental evaluation is obtained via standard function memoization. Our new implementation of attribute grammars increases the incremental behaviour of the evaluators by both reducing the memoization overhead and increasing their potential incrementallity. We present also an attribute grammar transformation, which increases the incremental performance of the attribute evaluators after a change that propagates its effects to all parts of the syntax tree. These techniques have been implemented in a purely functional attribute grammar system and the first experimental results are presented.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Andrew W. Appel and Marcelo J. R. Gonçalves. Hash-consing Garbage Collection. Technical Report CS-TR-412-93, Princeton University, Dept. of Computer Science, February 1993. 285
Alan Carle and Lori Pollock. On the Optimality of Change Propagation for Incremental Evaluation of Hierarchical Attribute Grammars. ACM Transactions on Programming Languages and Systems, 18(1):16–29, January 1996. 282
Uwe Kastens. Ordered attribute grammars. Acta Informatica, 13:229–256, 1980. 280, 281, 283
Matthijs Kuiper and João Saraiva. Lrc-A Generator for Incremental Language-Oriented Tools. In Kay Koskimies, editor, 7th International Conference on Compiler Construction, volume 1383 of LNCS, pages 298–301. Springer-Verlag, April 1998. 281, 290
Jones M.P. The implementation of the gofer functional programming system. Technical Report Research Report YALEU/DCS/RR-1030, Yale University, Dept. of Computer Science, May 1994. 284
Maarten Pennings. Generating Incremental Evaluators. PhD thesis, Depart. of Computer Science, Utrecht University, The Netherlands, November 1994. 281, 282, 283, 288
William Pugh and Tim Teitelbaum. Incremental computation via function caching. In 16th Annual ACM Symposium on Principles of Programming Languages, volume 1, pages 315–328. ACM, January 1989. 288
T. Reps and T. Teitelbaum. The Synthesizer Generator. Springer, 1989. 281
Thomas Reps, Tim Teitelbaum, and Alan Demers. Incremental contextdependent analysis for language-based editors. ACM Transactions on Programming Languages and Systems, 5(3):449–477, July 1983. 281
João Saraiva. Purely Functional Implementation of Attribute Grammars. PhD thesis, Department of Computer Science, Utrecht University, The Netherlands, December 1999. 281, 286
João Saraiva, Matthijs Kuiper, and Doaitse Swierstra. Effective Function Cache Management for Incremental Attribute Evaluation. In Chris Clark, Tony Davie, and Kevin Hammond, editors, 9th Workshop on Implementation of Functional Languages, pages 517–528, Scotland, September 1997. 288
João Saraiva and Doaitse Swierstra. Data Structure Free Compilation. In Stefan Jähnichen, editor, 8th International Conference on Compiler Construction, volume 1575 of LNCS, pages 1–16. Springer-Verlag, March 1999. 290
Tim Teitelbaum and Richard Chapman. Higher-order attribute grammars and editing environments. In ACM SIGPLAN’90 Conference on Principles of Programming Languages, volume 25, pages 197–208. ACM, June 1990. 281, 282
Leen van Dalen. Incremental evaluation through memoization. Master’s thesis, Department of Computer Science, Utrecht University, The Netherlands, August 1992. 284
Harald Vogt, Doaitse Swierstra, and Matthijs Kuiper. Higher order attribute grammars. In ACM SIGPLAN’ 89 Conference on Programming Language Design and Implementation, volume 24, pages 131–145. ACM, July 1989. 281
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Saraiva, J., Swierstra, D., Kuiper, M. (2000). Functional Incremental Attribute Evaluation. In: Watt, D.A. (eds) Compiler Construction. CC 2000. Lecture Notes in Computer Science, vol 1781. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46423-9_19
Download citation
DOI: https://doi.org/10.1007/3-540-46423-9_19
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67263-0
Online ISBN: 978-3-540-46423-5
eBook Packages: Springer Book Archive