Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1065010.1065026acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Optimising aspectJ

Published: 12 June 2005 Publication History

Abstract

AspectJ, an aspect-oriented extension of Java, is becoming increasingly popular. However, not much work has been directed at optimising compilers for AspectJ. Optimising AOP languages provides many new and interesting challenges for compiler writers, and this paper identifies and addresses three such challenges.First, compiling around advice efficiently is particularly challenging. We provide a new code generation strategy for around advice, which (unlike previous implementations) both avoids the use of excessive inlining and the use of closures. We show it leads to more compact code, and can also improve run-time performance. Second, woven code sometimes includes run-time tests to determine whether advice should execute. One important case is the cflow pointcut which uses information about the dynamic calling context. Previous techniques for cflow were very costly in terms of both time and space. We present new techniques to minimise or eliminate the overhead of cflow using both intra- and inter-procedural analyses. Third, we have addressed the general problem of how to structure an optimising compiler so that traditional analyses can be easily adapted to the AOP setting.We have implemented all of the techniques in this paper in abc, our AspectBench Compiler for AspectJ, and we demonstrate significant speedups with empirical results. Some of our techniques have already been integrated into the production AspectJ compiler, ajc 1.2.1.

References

[1]
abc. The AspectBench Compiler. Home page with downloads, FAQ, documentation, support mailing lists, and bug database. http://aspectbench.org.]]
[2]
André Årnes. PKI certificate revocation. Available at http://www.pvv.ntnu.no/~andrearn/certrev/.]]
[3]
R. Dale Asberry. Aspect Oriented Programming (AOP): Using AspectJ to implement and enforce coding standards. http://www.daleasberry.com/newsletters/200210/20021002.shtml, 2002.]]
[4]
AspectJ Eclipse Home. The AspectJ home page. http://eclipse.org/aspectj/,2003.]]
[5]
Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Jennifer Lhoták, Ondřej Lhoták, Damien Sereni, Ganesh Sittampalam, and Julian Tibble. abc: An extensible AspectJ compiler. In AOSD 2005, pages 87--98, March 2005.]]
[6]
David F. Bacon and Peter F. Sweeney. Fast static analysis of C++ virtual function calls. In OOPSLA 1996, pages 324--341, 1996.]]
[7]
Christoph Bockisch, Michael Haupt, Mira Mezini, and Klaus Ostermann. Virtual machine support for dynamic join points. In AOSD 2004, pages 83--92, 2004.]]
[8]
Jonas Boner. AspectWerkz - dynamic AOP for Java. Available from URL: http://codehaus.org/~jboner/papers/aosd2004_aspectwerkz.pdf, 2004.]]
[9]
Jeffrey Dean, David Grove, and Craig Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In ECOOP 1995, volume 952 of LNCS, pages 77--101, 1995.]]
[10]
Bruno Dufour, Karel Driesen, Laurie Hendren, and Clark Verbrugge. Dynamic metrics for Java. In OOPSLA 2003, pages 149-168. ACM Press, 2003.]]
[11]
Erik Hilsdale and Jim Hugunin. Advice weaving in AspectJ. In K. Lieberherr, editor, AOSD 2004, pages 26--35. ACM Press, 2004.]]
[12]
JBoss. JBoss Aspect Oriented Programming. Home page with down-loads, documentation, wiki. http://www.jboss.org/index. html?module=html&op=userdisplay&id=developer's/projects/jboss/aop.]]
[13]
Ondřej Lhoták. Spark: A flexible points-to analysis framework for Java. Master's thesis, McGill University, December 2002.]]
[14]
Ondřej Lhoták and Laurie Hendren. Scaling Java points-to analysis using Spark. In G. Hedin, editor, CC 2003, volume 2622 of LNCS, pages 153--169. Springer, April 2003.]]
[15]
Ondřej Lhoták and Laurie Hendren. Jedd: a BDD-based relational extension of Java. In PLDI 2004, pages 158--169, 2004.]]
[16]
Karl Lieberherr, David H. Lorenz, and Pengcheng Wu. A case for statically executable advice: checking the Law of Demeter with AspectJ. In AOSD 2003, pages 40--49. ACM Press, 2003.]]
[17]
Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, second edition, 1999.]]
[18]
Hidehiko Masuhara, Gregor Kiczales, and Chris Dutchyn. A compilation and optimization model for aspect-oriented programs. In CC 2003, volume 2622 of Springer Lecture Notes in Computer Science, pages 46--60, 2003.]]
[19]
Martin Rinard, Alexandru Salcianu, and Suhabe Bugrara. A classification system and analysis for aspect-oriented programs. In Proceedings of the Twelfth International Symposium on the Foundations of Software Engineering, pages 147--158, 2004.]]
[20]
Damien Sereni and Oege de Moor. Static analysis of aspects. In AOSD 2003, pages 30--39, 2003.]]
[21]
Therapon Skotiniotis and David H. Lorenz. Cona: aspects for contracts and contracts for aspects. In OOPSLA 2004 Companion, pages 196--197, 2004.]]
[22]
Vijay Sundaresan, Laurie Hendren, Chrislain Razafimahefa, Raja Vallée-Rai, Patrick Lam, Etienne Gagnon, and Charles Godin. Practical virtual method call resolution for Java. In OOPSLA 2000, pages 264--280, 2000.]]
[23]
Frank Tip and Jens Palsberg. Scalable propagation-based call graph construction algorithms. In OOPSLA 2000, pages 281--293, 2000.]]
[24]
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 CC 2000, pages 18--34, 2000.]]
[25]
Ian H. Witten and Eibe Frank. Data Mining: Practical Machine Learning Tools and Techniques with Java implementations. Morgan Kaufmann Publishers, 2000.]]
[26]
Jianjun Zhao and Martin Rinard. System dependence graph construction for aspect-oriented programs. Technical Report MIT-LCS-TR-891, Laboratory for Computer Science, MIT, 2003.]]

Cited By

View all
  • (2015)Incremental aspect weavingProceedings of the 30th Annual ACM Symposium on Applied Computing10.1145/2695664.2695688(1480-1485)Online publication date: 13-Apr-2015
  • (2014)A constraint-weaving approach to points-to analysis for AspectJFrontiers of Computer Science: Selected Publications from Chinese Universities10.1007/s11704-013-3106-28:1(52-68)Online publication date: 1-Feb-2014
  • (2013)An Analysis of Language-Level Support for Self-Adaptive SoftwareACM Transactions on Autonomous and Adaptive Systems10.1145/2491465.24914668:2(1-29)Online publication date: 1-Jul-2013
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
June 2005
338 pages
ISBN:1595930566
DOI:10.1145/1065010
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 6
    Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
    June 2005
    325 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1064978
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 June 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. around advice
  2. aspect-oriented programming language
  3. aspectJ
  4. cflow pointcut
  5. optimization

Qualifiers

  • Article

Conference

PLDI05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)2
Reflects downloads up to 30 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2015)Incremental aspect weavingProceedings of the 30th Annual ACM Symposium on Applied Computing10.1145/2695664.2695688(1480-1485)Online publication date: 13-Apr-2015
  • (2014)A constraint-weaving approach to points-to analysis for AspectJFrontiers of Computer Science: Selected Publications from Chinese Universities10.1007/s11704-013-3106-28:1(52-68)Online publication date: 1-Feb-2014
  • (2013)An Analysis of Language-Level Support for Self-Adaptive SoftwareACM Transactions on Autonomous and Adaptive Systems10.1145/2491465.24914668:2(1-29)Online publication date: 1-Jul-2013
  • (2010)ClaraProceedings of the First international conference on Runtime verification10.5555/1939399.1939417(183-197)Online publication date: 1-Nov-2010
  • (2010)Late binding of AspectJ adviceProceedings of the 48th international conference on Objects, models, components, patterns10.5555/1894386.1894396(173-191)Online publication date: 28-Jun-2010
  • (2010)Supporting dynamic, third-party code customizations in JavaScript using aspectsACM SIGPLAN Notices10.1145/1932682.186949045:10(361-376)Online publication date: 17-Oct-2010
  • (2010)Supporting dynamic, third-party code customizations in JavaScript using aspectsProceedings of the ACM international conference on Object oriented programming systems languages and applications10.1145/1869459.1869490(361-376)Online publication date: 17-Oct-2010
  • (2010)Parallel dynamic analysis on multicores with aspect-oriented programmingProceedings of the 9th International Conference on Aspect-Oriented Software Development10.1145/1739230.1739232(1-12)Online publication date: 15-Mar-2010
  • (2010)Clara: A Framework for Partially Evaluating Finite-State Runtime Monitors Ahead of TimeRuntime Verification10.1007/978-3-642-16612-9_15(183-197)Online publication date: 2010
  • (2010)Late Binding of AspectJ AdviceObjects, Models, Components, Patterns10.1007/978-3-642-13953-6_10(173-191)Online publication date: 2010
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media