skip to main content
10.1145/1094811.1094839acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Adding trace matching with free variables to AspectJ

Published:12 October 2005Publication History

ABSTRACT

An aspect observes the execution of a base program; when certain actions occur, the aspect runs some extra code of its own. In the AspectJ language, the observations that an aspect can make are confined to the current action: it is not possible to directly observe the history of a computation.Recently, there have been several interesting proposals for new history-based language features, most notably by Douence et al. and by Walker and Viggers. In this paper, we present a new history-based language feature called tracematches that enables the programmer to trigger the execution of extra code by specifying a regular pattern of events in a computation trace. We have fully designed and implemented tracematches as a seamless extension of AspectJ.A key innovation in our tracematch approach is the introduction of free variables in the matching patterns. This enhancement enables a whole new class of applications in which events can be matched not only by the event kind, but also by the values associated with the free variables. We provide several examples of applications enabled by this feature.After introducing and motivating the idea of tracematches via examples, we present a detailed semantics of our language design, and we derive an implementation from that semantics. The implementation has been realised as an extension of the abc compiler for AspectJ.

References

  1. abc. The AspectBench Compiler. Home page with downloads, FAQ, documentation, support mailing lists, and bug database. http://aspectbench.org.]]Google ScholarGoogle Scholar
  2. Thomas Ball, Byron Cook, Vladimir Levin, and Sriram K. Rajamani. SLAM and static driver verifier: Technology transfer of formal methods inside Microsoft. In Eerke Boiten, John Derrick, and Graeme Smith, editors, Integrated Formal Methods, pages 1--20, 2004.]]Google ScholarGoogle ScholarCross RefCross Ref
  3. Christoph Bockisch, Mira Mezini, and Klaus Ostermann. Quantifying over dynamic properties of program execcution. In 2nd Dynamic Aspects Workshop (DAW05), pages 71--75, 2005.]]Google ScholarGoogle Scholar
  4. Eric Bodden. Concern specific languages and their implementation with abc. SPLAT workshop at AOSD. Download: http://www.bodden.de/publications, 2005.]]Google ScholarGoogle Scholar
  5. María Augustina Cibrán and Bart Verheecke. Dynamic business rules for web service composition. In 2nd Dynamic Aspects Workshop (DAW05), pages 13--18, 2005.]]Google ScholarGoogle Scholar
  6. Adrian Colyer, Andy Clement, George Harley, and Matthew Webster. Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ development tools. Addison-Wesley, 2004.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Douence, P. Fradet, and M. Südholt. A framework for the detection and resolution of aspect interactions. In Proceedings of the ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering (GPCE'02), pages 173--188, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. Douence, O. Motelet, and M. Sudholt. A formal definition of crosscuts. In Akinori Yonezawa and Satoshi Matsuoka, editors, Reflection 2001, volume 2192 of Lecture Notes in Computer Science, pages 170--186. Springer, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Rémi Douence, Pascal Fradet, and Mario Südholt. Composition, reuse and interaction analysis of stateful aspects. In Karl Lieberherr, editor, 3rd International Conference on Aspect-oriented Software Development, pages 141--150, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Remi Douence, Pascal Fradet, and Mario Südholt. Trace-based aspects. In Aspect-oriented Software Development, pages 141--150. Addison-Wesley, 2004.]]Google ScholarGoogle Scholar
  11. Rémi Douence, Thomas Fritz, Nicolas Loriant, Jean-Marc Menaud, Marc Ségura, and Mario Südholt. An expressive aspect language for system applications with arachne. In Aspect-Oriented Software Development, pages 27--38, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Thomas Fritz, Marc Ségura, Mario Südholt, Egon Wuchner, and Jean-Marc Menaud. An application of dynamic AOP to medical image generation. In 2nd Dynamic Aspects Workshop (DAW05), pages 5--12, 2005.]]Google ScholarGoogle Scholar
  13. Erich Gamma. JHotDraw. Available for download from http://sourceforge.net/projects/jhotdraw, 2004.]]Google ScholarGoogle Scholar
  14. Simon Goldsmith, Robert O'Callahan, and Alex Aiken. Relational queries over program traces. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Joseph D. Gradecki and Nicholas Lesiecki. Mastering AspectJ: Aspect-Oriented Programming in Java. Wiley, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Seth Hallem, Benjamin Chelf, Yichen Xie, and Dawson Engler. A system and language for building system-specific, static analyses. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 69--82, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jan Hannemann and Gregor Kiczales. Design pattern implementation in Java and AspectJ. In OOPSLA, pages 161--173, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. An overview of AspectJ. In J. Lindskov Knudsen, editor, European Conference on Object-oriented Programming, volume 2072 of Lecture Notes in Computer Science, pages 327--353. Springer, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. I. Kiselev. Aspect-oriented programming with AspectJ. SAMS, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Ramnivas Laddad. AspectJ in Action. Manning, 2003.]]Google ScholarGoogle Scholar
  21. Karl J. Lieberherr, Jeffrey Palm, and Ravi Sundaram. Expressiveness and complexity of crosscut languages. In Proceedings of the eth workshop on Foundations of Aspect-Oriented Languages (FOAL '05), 2005.]]Google ScholarGoogle Scholar
  22. Michael Martin, Benjamin Livshits, and Monica S. Lam. Finding application errors using PQL: a program query language. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Hidehiko Masuhara, Gregor Kiczales, and Chris Dutchyn. A compilation and optimization model for aspect-oriented programs. In Compiler Construction, volume 2622 of Springer Lecture Notes in Computer Science, pages 46--60, 2003.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Russell Miles. AspectJ cookbook. O'Reilly, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Nathaniel Nystrom, Michael R. Clarkson, and Andrew C. Myers. Polyglot: An extensible compiler framework for Java. In 12th International Conference on Compiler Construction, volume 2622 of Lecture Notes in Computer Science, pages 138--152, 2003.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Klaus Ostermann, Mira Mezini, and Christoph Bockisch. Expressive pointcuts for increased modularity. In ECOOP, 2005.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Jens Palsberg, Boaz Patt-Shamir, and Karl J. Lieberherr. A new approach to compiling adaptive programs. Science of Computer Programming, 29(3):303--326, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Volker Stolz and Eric Bodden. Temporal Assertions using AspectJ. In Fifth Workshop on Runtime Verification (RV'05), Electronic Notes in Theoretical Computer Science. Elsevier Science Publishers, 2005.]]Google ScholarGoogle Scholar
  29. Raja Vallée-Rai, Etienne Gagnon, Laurie J. Hendren, Patrick Lam, Patrice Pominville, and Vijay Sundaresan. Optimizing Java bytecode using the Soot framework: Is it feasible? In Compiler Construction, 9th International Conference (CC 2000), pages 18--34, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Wim Vanderperren, Davy Suvé, María Augustina Cibrán, and Bruno De Fraine. Stateful aspects in JAsCo. In Workshop on Software Composition at ETAPS, 2005.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Robert Walker and Kevin Viggers. Implementing protocols via declarative event patterns. In ACM Sigsoft International Symposium on Foundations of Software Engineering (FSE-12), pages 159--169, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Adding trace matching with free variables to AspectJ

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
      October 2005
      562 pages
      ISBN:1595930310
      DOI:10.1145/1094811
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 40, Issue 10
        Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming systems languages and applications
        October 2005
        531 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1103845
        Issue’s Table of Contents

      Copyright © 2005 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 October 2005

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate268of1,244submissions,22%

      Upcoming Conference

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader