Skip to main content

Aspect-Oriented Compilers

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1799))

Abstract

Aspect-oriented programming provides the programmer with means to cross-cut conventional program structures, in particular the class hierarchies of object-oriented programming. This paper studies the use of aspect orientation in structuring syntax directed compilers implemented as attribute grammars. Specifically, it describes a method for specifying definitions of related attributes as ‘aspects’ and treating them as first-class objects, that can be stored, manipulated and combined. It is hoped that this embedding of an aspect-oriented programming style in Haskell provides a stepping stone towards a more general study of the semantics of aspect-oriented programming.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S. R. Adams. Modular Grammars for Programming Language Prototyping. PhD thesis, Department of Electronics and Computer Science, University of Southampton, UK, 1993.

    Google Scholar 

  2. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.

    Google Scholar 

  3. D. Batory, V. Singhal, J. Thomas, S. Dasari, B. Geraci, and M. Sirkin. The GenVoca model of software-system generators. IEEE Software, 11(5):89–94, 1994.

    Article  Google Scholar 

  4. R. S. Bird. A formal development of an efficient supercombinator compiler. Science of Computer Programming, 8(2):113–137, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  5. R. S Bird. Introduction to Functional Programming in Haskell. International Series in Computer Science. Prentice Hall, 1998.

    Google Scholar 

  6. O. De Moor. First-class attribute grammars. 1999. Draft paper available from URL http://www.comlab.ox.ac.uk/oucl/users/oege.demoor/homepage.htm

  7. P. Deransart, M. Jourdan, and B. Lorho. Attribute grammars — Definitions, systems and bibliography, volume 322 of LCNS. Springer Verlag, 1988.

    Google Scholar 

  8. H. Ganzinger and R. Giegerich. Attribute Coupled Grammars. In Proceedings of the ACM Symposium on Compiler Construction, 157–170, 1984. Published as ACM SIGPLAN Notices, 19(6).

    Google Scholar 

  9. B. R. Gaster and M. P. Jones. A polymorphic type system for extensible records and variants. Technical report NOTTCS-TR-96-3, Department of Computer Science, University of Nottingham, UK, 1996. Available from URL http://www.cs.nott.ac.uk/Department/Staff/mpj/polyrec.html.

    Google Scholar 

  10. R. W. Gray, V. P. Heuring, S. P. Levi, A. M. Sloane, and W. M. Waite. Eli: A complete, flexible compiler construction system. CACM, 35:121–131, 1992.

    Google Scholar 

  11. T. Johnsson. Attribute grammars as a functional programming paradigm. In G. Kahn, editor, Functional Programming Languages and Computer Architecture, volume 274 of LNCS, pages 154–173. Springer-Verlag, 1987.

    Google Scholar 

  12. M. Jourdan. Strongly non-circular attribute grammars and their recursive evaluation. SIGPLAN Notices, 19:81–93, 1984.

    Article  Google Scholar 

  13. M. Jourdan, D. Parigot, C. Julié, O. Durin, and C. Le Bellec. Design, implementation and evaluation of the FNC-2 attribute grammar system. In Conference on Programming Languages Design and Implementation, pages 209–222, 1990. Published as ACM SIGPLAN Notices, 25(6).

    Google Scholar 

  14. U. Kastens. Attribute grammars in a compiler construction environment. In Proceedings of the International Summer School on Attribute Grammars, Applications and Systems, volume 545 of LNCS, pages 380–400, 1991.

    Google Scholar 

  15. U. Kastens, B. Hutt, and E. Zimmermann. GAG: A Practical Compiler Generator, volume 141 of LNCS. Springer Verlag, 1982.

    MATH  Google Scholar 

  16. U. Kastens and W. M. Waite. Modularity and reusability in attribute grammars. Acta Informatica, 31:601–627, 1994.

    Article  MATH  Google Scholar 

  17. G. Kiczales. Aspect-oriented programming. ACM Computing Surveys, 28A(4), 1996. See also: http://www.parc.xerox.com/spl/projects/aop.

  18. D. E. Knuth. Semantics of context-free languages. Mathematical Systems Theory, 2:127–146, 1968.

    Article  MATH  MathSciNet  Google Scholar 

  19. M. Kuiper and S. D. Swierstra. Using attribute grammars to derive efficient functional programs. In Computing Science in the Netherlands CSN’ 87, 1987. See: ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1986/1986-16.ps.gz.

    Google Scholar 

  20. M. Kuiper and J. Saraiva. LRC—A Generator for Incremental Language-Oriented Tools. In K. Koskimies, editor, 7th International Conference on Compiler Construction, pages 298–301. volume 1383 of LNCS. Springer Verlag, 1998.

    Chapter  Google Scholar 

  21. K. J. Lieberherr. Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns. PWS Publishing Company, 1996.

    Google Scholar 

  22. A. Ohori. A polymorphic record calculus and its compilation. ACM Transactions on Programming Languages and Systems, 17(6):844–895, 1995.

    Article  Google Scholar 

  23. D. Rémy. Typechecking records and variants in a natural extension of ML. In Proceedings of the ACM Symposium on Principles of Programming Languages (POPL’ 89), pages 77–88. ACM Press, 1989.

    Google Scholar 

  24. D. Rémy. Typing record concatenation for free. In C. A. Gunter and J. C. Mitchell, editors, Theoretical Aspects of Object-Oriented Programming: Types, Semantics and Language Design, Foundations of Computing Series. MIT Press, 1994.

    Google Scholar 

  25. T. W. Reps and T. Teitelbaum. The Synthesizer Generator: A system for constructing language-based editors. Springer-Verlag, 1989.

    Google Scholar 

  26. D. Rushall. An attribute evaluator in Haskell. Technical report, Manchester University, 1992. See URL: http://www-rocq.inria.fr/oscar/www/fnc2/AG.html.

  27. C. Simonyi. Intentional programming: Innovation in the legacy age. Presented at IFIP Working group 2.1, 1996. Available from URL http://www.research.microsoft.com/research/ip/.

  28. S.D. Swierstra, P. Azero and J. Saraiva. Designing and implementing combinator languages. In S. D. Swierstra, editor, 3rd International Summer School on Advanced Functional Programming, volume 1608 of LNCS. Springer Verlag, 1999. See also URL http://www.cs.uu.nl/groups/ST/Software/index.html.

    Google Scholar 

  29. M. Wand. Type inference for record concatenation and multiple inheritance. Information and Computation, 93:1–15, 1991.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

de Moor, O., Peyton-Jones, S., Van Wyk, E. (2000). Aspect-Oriented Compilers. In: Czarnecki, K., Eisenecker, U.W. (eds) Generative and Component-Based Software Engineering. GCSE 1999. Lecture Notes in Computer Science, vol 1799. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-40048-6_10

Download citation

  • DOI: https://doi.org/10.1007/3-540-40048-6_10

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-41172-7

  • Online ISBN: 978-3-540-40048-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics