Skip to main content

Circular Higher-Order Reference Attribute Grammars

  • Conference paper
Software Language Engineering (SLE 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8225))

Included in the following conference series:

Abstract

Reference attribute grammars (RAGs) provide a practical declarative means to implement programming language compilers and other tools. RAGs have previously been extended to support both circular attributes and context-dependent declarative rewrites of the abstract syntax tree. In this previous work, dependencies between circular attributes and rewrites are not considered. In this paper, we investigate how these extensions can interact, and still be well defined. We introduce a generalized evaluation algorithm that can handle grammars where circular attributes and rewrites are interdependent. To this end, we introduce circular higher-order attributes, and show how RAG rewrites are a special form of such attributes.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Apel, S., Kolesnikov, S., Liebig, J., et al.: Access control in feature-oriented programming. Sci. Comp. Prog. 77(3), 174–187 (2012)

    Article  Google Scholar 

  2. Appeltauer, M., Hirschfeld, R., Masuhara, H., Haupt, M., Kawauchi, K.: Event-specific software composition in context-oriented programming. In: Baudry, B., Wohlstadter, E. (eds.) SC 2010. LNCS, vol. 6144, pp. 50–65. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  3. Avgustinov, P., Ekman, T., Tibble, J.: Modularity first: a case for mixing AOP and attribute grammars. In: AOSD, pp. 25–35. ACM (2008)

    Google Scholar 

  4. Blackburn, S.M., McKinley, K.S., Garner, R., et al.: Wake up and smell the coffee: evaluation methodology for the 21st century. CACM 51(8), 83–89 (2008)

    Article  Google Scholar 

  5. Tang Boyland, J.: Remote attribute grammars. J. ACM 52(4), 627–687 (2005)

    Article  MathSciNet  Google Scholar 

  6. Cordy, J.R.: The TXL source transformation language. Sci. Comp. Prog. 61(3), 190–210 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  7. Demers, A.J., Reps, T.W., Teitelbaum, T.: Incremental evaluation for attribute grammars with application to syntax-directed editors. In: White, J., Lipton, R.J., Goldberg, P.C. (eds.) POPL, pp. 105–116. ACM Press (1981)

    Google Scholar 

  8. Söderberg, E.: Paper examples (2013), http://fileadmin.cs.lth.se/sde/publications/papers/2013-Soderberg-SLE-CircularNTA

  9. Ekman, T., Hedin, G.: Rewritable reference attributed grammars. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 147–171. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  10. Ekman, T., Hedin, G.: Modular name analysis for Java using JastAdd. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2005. LNCS, vol. 4143, pp. 422–436. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  11. Ekman, T., Hedin, G.: The Jastadd Extensible Java Compiler. In: OOPSLA, pp. 1–18. ACM (2007)

    Google Scholar 

  12. Ekman, T., Hedin, G.: The JastAdd system - modular extensible compiler construction. Sci. Comp. Prog. 69(1-3), 14–26 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  13. Farrow, R.: Automatic generation of fixed-point-finding evaluators for circular, but well-defined, attribute grammars. In: SIGPLAN 1986: Proceedings of the 1986 SIGPLAN Symposium on Compiler Construction, pp. 85–98. ACM, New York (1986)

    Chapter  Google Scholar 

  14. Hedin, G.: Reference Attributed Grammars. Informatica (Slovenia) 24(3), 301–317 (2000)

    MATH  Google Scholar 

  15. Jones, L.G.: Efficient evaluation of circular attribute grammars. ACM TOPLAS 12(3), 429–462 (1990)

    Article  Google Scholar 

  16. Jones, L.G., Simon, J.: Hierarchical vlsi design systems based on attribute grammars. In: POPL, pp. 58–69. ACM (1986)

    Google Scholar 

  17. Jourdan, M.: An optimal-time recursive evaluator for attribute grammars. In: Paul, M., Robinet, B. (eds.) Programming 1984. LNCS, vol. 167, pp. 167–178. Springer, Heidelberg (1984)

    Chapter  Google Scholar 

  18. Knuth, D.E.: Semantics of Context-free Languages. Mathematical Systems Theory 2(2), 127–145 (1968); Correction: Mathematical Systems Theory 5(1), 95–96 (1971)

    Article  MathSciNet  MATH  Google Scholar 

  19. Krishnan, L., Van Wyk, E.: Termination analysis for higher-order attribute grammars. In: Czarnecki, K., Hedin, G. (eds.) SLE 2012. LNCS, vol. 7745, pp. 44–63. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  20. Magnusson, E., Hedin, G.: Circular reference attributed grammars - their evaluation and applications. Sci. Comp. Program. 68(1), 21–37 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  21. Martins, P., Fernandes, J.P., Saraiva, J.: Zipper-based attribute grammars and their extensions. In: Du Bois, A. (ed.) SBLP 2013. LNCS, vol. 8129, pp. 135–149. Springer, Heidelberg (2013)

    Google Scholar 

  22. Reps, T.W.: Optimal-time incremental semantic analysis for syntax-directed editors. In: DeMillo, R.A. (ed.) POPL, pp. 169–176. ACM Press (1982)

    Google Scholar 

  23. Söderberg, E., Hedin, G.: Incremental Evaluation of Reference Attribute Grammars using Dynamic Dependency Tracking. Technical Report 98, Lund University, LU-CS-TR:2012-249, ISSN 1404-1200 (April 2012)

    Google Scholar 

  24. den van Brand, M.G.J., et al.: The ASF+SDF meta-environment: A component-based language development environment. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 365–370. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  25. Visser, E.: Stratego: A language for program transformation based on rewriting strategies system description of stratego 0.5. In: Middeldorp, A. (ed.) RTA 2001. LNCS, vol. 2051, pp. 357–361. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  26. Vogt, H., Swierstra, S.D., Kuiper, M.F.: Higher order attribute grammars. In: PLDI, pp. 131–145 (1989)

    Google Scholar 

  27. Van Wyk, E., de Moor, O., Backhouse, K., Kwiatkowski, P.: Forwarding in attribute grammars for modular language design. In: Nigel Horspool, R. (ed.) CC 2002. LNCS, vol. 2304, pp. 128–142. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer International Publishing Switzerland

About this paper

Cite this paper

Söderberg, E., Hedin, G. (2013). Circular Higher-Order Reference Attribute Grammars. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds) Software Language Engineering. SLE 2013. Lecture Notes in Computer Science, vol 8225. Springer, Cham. https://doi.org/10.1007/978-3-319-02654-1_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-02654-1_17

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-02653-4

  • Online ISBN: 978-3-319-02654-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics