skip to main content
10.1145/1509239.1509243acmconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

Dependent advice: a general approach to optimizing history-based aspects

Authors Info & Claims
Published:02 March 2009Publication History

ABSTRACT

Many aspects for runtime monitoring are history-based: they contain pieces of advice that execute conditionally, based on the observed execution history. History-based aspects are notorious for causing high runtime overhead. Compilers can apply powerful optimizations to history-based aspects using domain knowledge. Unfortunately, current aspect languages like AspectJ impede optimizations, as they provide no means to express this domain knowledge.

In this paper we present dependent advice, a novel AspectJ language extension. A dependent advice contains dependency annotations that preserve crucial domain knowledge: a dependent advice needs to execute only when its dependencies are fulfilled. Optimizations can exploit this knowledge: we present a whole-program analysis that removes advice-dispatch code from program locations at which an advice's dependencies cannot be fulfilled.

Programmers often opt to have history-based aspects generated automatically, from formal specifications from model-driven development or runtime monitoring. As we show using code-generation tools for two runtime-monitoring approaches, tracematches and JavaMOP, such tools can use knowledge contained in the specification to automatically generate dependency annotations as well.

Our extensive evaluation using the DaCapo benchmark suite shows that the use of dependent advice can significantly lower, sometimes even completely eliminate, the runtime overhead caused by history-based aspects, independently of the specification formalism.

References

  1. C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Adding Trace Matching with Free Variables to AspectJ. In OOPSLA, pages 345--364. ACM Press, Oct. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: An extensible AspectJ compiler. In AOSD, pages 87--98. ACM Press, Mar. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Avgustinov, J. Tibble, and O. de Moor. Making trace monitoring feasible. In OOPSLA, pages 589--608. ACM Press, Oct. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA, pages 169--190. ACM Press, Oct. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. E. Bodden. J-LO -- A tool for runtime-checking temporal assertions. Master's thesis, RWTH Aachen University, November 2005.Google ScholarGoogle Scholar
  6. E. Bodden, F. Chen, and G. Rosu. Dependent Advice: A General Approach to Optimizing History-based Aspects (Extended version). Technical Report abc-2008-2, http://www.aspectbench.org/, March 2008.Google ScholarGoogle Scholar
  7. E. Bodden and K. Havelund. Racer: Effective race detection using AspectJ. In ISSTA, pages 155--165. ACM Press, July 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Bodden, L. J. Hendren, and O. Lhoták. A staged static program analysis to improve the performance of runtime monitoring. In ECOOP, volume 4609 of LNCS, pages 525--549. Springer, July 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. E. Bodden, P. Lam, and L. Hendren. Finding programming errors earlier by evaluating runtime monitors ahead-of-time. In FSE, pages 36--47, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. F. Chen and G. Rosu. Towards monitoring--oriented programming: A paradigm combining specification and implementation. In RV, volume 89(2) of ENTCS, pages 108--127, July 2003.Google ScholarGoogle Scholar
  11. F. Chen and G. Rosu. MOP: an efficient and generic runtime verification framework. In OOPSLA, pages 569--588. ACM Press, Oct. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. W. F. Clocksin and C. Mellish. Programming in Prolog, 5th Edition. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Goldsmith, R. O'Callahan, and A. Aiken. Relational queries over program traces. In OOPSLA, pages 385--402. ACM Press, Oct. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Hilsdale and J. Hugunin. Advice weaving in AspectJ. In AOSD, pages 26--35. ACM Press, Mar. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Kniesel, T. Rho, and S. Hanenberg. Evolvable pattern implementations need generic aspects. In ECOOP 2004 Workshop on Reflection, AOP and Meta-Data for Software Evolution, June 2004.Google ScholarGoogle Scholar
  16. I. H. Krüger, G. Lee, and M. Meisinger. Automating software architecture exploration with M2Aspects. In SCESM, pages 51--58. ACM Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. O. Lhoták and L. Hendren. Scaling Java points-to analysis using Spark. In CC, volume 2622 of LNCS, pages 153--169, Apr. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Lieberherr and D. H. Lorenz. Coupling aspect-oriented and adaptive programming. In R. E. Filman, T. Elrad, S. Clarke, and M. Aksit, editors, Aspect-Oriented Software Development, pages 145--164. Addison-Wesley, 2005.Google ScholarGoogle Scholar
  19. S. Maoz and D. Harel. From multi-modal scenarios to code: compiling LSCs into AspectJ. In FSE, pages 219--230. ACM Press, Nov. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Martin, B. Livshits, and M. S. Lam. Finding application errors using PQL: a program query language. In OOPSLA, pages 365--383, Oct. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. H. Masuhara and K. Kawauchi. Dataflow pointcut in aspect-oriented programming. In 1st Asian Symposium on Programming Languages and Systems, volume 2895 of LNCS, pages 105--121. Springer, Dec. 2003.Google ScholarGoogle ScholarCross RefCross Ref
  22. H. Masuhara, G. Kiczales, and C. Dutchyn. A compilation and optimization model for aspect-oriented programs. In CC, volume 2622 of LNCS, pages 46--60. Springer, Apr. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. N. A. Naeem and O. Lhoták. Typestate-like analysis of multiple interacting objects. In OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object oriented programming systems languages and applications, pages 347--366, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. K. Sakurai, H. Masuhara, N. Ubayashi, S. Matsuura, and S. Komiya. Association aspects. In AOSD, pages 16--25, Mar. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Sridharan and R. Bodík. Refinement-based context-sensitive points-to analysis for Java. In PLDI, pages 387--400, June 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. V. Stolz and E. Bodden. Temporal Assertions using AspectJ. In 5th Workshop on Runtime Verification, volume 144 of Electronic Notes in Theoretical Computer Science, pages 109--124, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dependent advice: a general approach to optimizing history-based aspects

    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
      AOSD '09: Proceedings of the 8th ACM international conference on Aspect-oriented software development
      March 2009
      278 pages
      ISBN:9781605584423
      DOI:10.1145/1509239

      Copyright © 2009 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: 2 March 2009

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate41of139submissions,29%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader