|
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
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked 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 , Oege de Moor , Damien Sereni , Ganesh Sittampalam , Julian Tibble, abc: an extensible AspectJ compiler, Proceedings of the 4th international conference on Aspect-oriented software development, p.87-98, March 14-18, 2005, Chicago, Illinois
[doi> 10.1145/1052898.1052906]
|
 |
6
|
David F. Bacon , Peter F. Sweeney, Fast static analysis of C++ virtual function calls, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.324-341, October 06-10, 1996, San Jose, California, United States
|
 |
7
|
Christoph Bockisch , Michael Haupt , Mira Mezini , Klaus Ostermann, Virtual machine support for dynamic join points, Proceedings of the 3rd international conference on Aspect-oriented software development, p.83-92, March 22-24, 2004, Lancaster, UK
[doi> 10.1145/976270.976282]
|
| |
8
|
Jonas Boner. AspectWerkz - dynamic AOP for Java. Available from URL: http://codehaus.org/~jboner/papers/aosd2004_aspectwerkz.pdf, 2004.
|
| |
9
|
|
 |
10
|
Bruno Dufour , Karel Driesen , Laurie Hendren , Clark Verbrugge, Dynamic metrics for java, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
 |
11
|
|
| |
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
|
|
 |
16
|
|
| |
17
|
|
| |
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
|
|
 |
20
|
|
 |
21
|
Therapon Skotiniotis , David H. Lorenz, Cona: aspects for contracts and contracts for aspects, Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 24-28, 2004, Vancouver, BC, CANADA
[doi> 10.1145/1028664.1028747]
|
 |
22
|
Vijay Sundaresan , Laurie Hendren , Chrislain Razafimahefa , Raja Vallée-Rai , Patrick Lam , Etienne Gagnon , Charles Godin, Practical virtual method call resolution for Java, Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.264-280, October 2000, Minneapolis, Minnesota, United States
|
 |
23
|
Frank Tip , Jens Palsberg, Scalable propagation-based call graph construction algorithms, Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.281-293, October 2000, Minneapolis, Minnesota, United States
|
| |
24
|
Raja Vallée-Rai , Etienne Gagnon , Laurie J. Hendren , Patrick Lam , Patrice Pominville , Vijay Sundaresan, Optimizing Java Bytecode Using the Soot Framework: Is It Feasible?, Proceedings of the 9th International Conference on Compiler Construction, p.18-34, March 25-April 02, 2000
|
| |
25
|
|
| |
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 24
|
|
|
|
|
Neil Ongkingco , Pavel Avgustinov , Julian Tibble , Laurie Hendren , Oege de Moor , Ganesh Sittampalam, Adding open modules to AspectJ, Proceedings of the 5th international conference on Aspect-oriented software development, March 20-24, 2006, Bonn, Germany
|
|
|
|
|
|
|
|
|
Chris Allan , Pavel Avgustinov , Aske Simon Christensen , Bruno Dufour , Christopher Goard , Laurie Hendren , Sascha Kuzins , Jennifer Lhoták , Ondrej Lhoták , Oege de Moor , Damien Sereni , Ganesh Sittampalam , Julian Tibble , Clark Verbrugge, abc the aspectBench compiler for aspectJ a workbench for aspect-oriented programming language and compilers research, Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Anderson Santana de Oliveira , Eric Ke Wang , Claude Kirchner , Helene Kirchner, Weaving rewrite-based access control policies, Proceedings of the 2007 ACM workshop on Formal methods in security engineering, p.71-80, November 02-02, 2007, Fairfax, Virginia, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ryan M. Golbeck , Samuel Davis , Immad Naseer , Igor Ostrovsky , Gregor Kiczales, Lightweight virtual machine support for AspectJ, Proceedings of the 7th international conference on Aspect-oriented software development, March 31-April 04, 2008, Brussels, Belgium
|
|