|
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
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
|
Chris Allan , Pavel Avgustinov , Aske Simon Christensen , Laurie Hendren , Sascha Kuzins , Ondřej Lhoták , Oege de Moor , Damien Sereni , Ganesh Sittampalam , Julian Tibble, Adding trace matching with free variables to AspectJ, Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
 |
2
|
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]
|
 |
3
|
|
 |
4
|
Stephen M. Blackburn , Robin Garner , Chris Hoffmann , Asjad M. Khang , Kathryn S. McKinley , Rotem Bentzur , Amer Diwan , Daniel Feinberg , Daniel Frampton , Samuel Z. Guyer , Martin Hirzel , Antony Hosking , Maria Jump , Han Lee , J. Eliot B. Moss , B. Moss , Aashish Phansalkar , Darko Stefanović , Thomas VanDrunen , Daniel von Dincklage , Ben Wiedermann, The DaCapo benchmarks: java benchmarking development and analysis, Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 22-26, 2006, Portland, Oregon, USA
|
| |
5
|
E. Bodden. J-LO -- A tool for runtime-checking temporal assertions. Master's thesis, RWTH Aachen University, November 2005.
|
| |
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.
|
 |
7
|
|
| |
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.
|
 |
9
|
|
| |
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.
|
 |
11
|
|
| |
12
|
|
 |
13
|
Simon F. Goldsmith , Robert O'Callahan , Alex Aiken, Relational queries over program traces, Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
 |
14
|
|
| |
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.
|
 |
16
|
Ingolf H. Krüger , Gunny Lee , Michael Meisinger, Automating software architecture exploration with M2Aspects, Proceedings of the 2006 international workshop on Scenarios and state machines: models, algorithms, and tools, May 27-27, 2006, Shanghai, China
[doi> 10.1145/1138953.1138964]
|
| |
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.
|
| |
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.
|
 |
19
|
|
 |
20
|
Michael Martin , Benjamin Livshits , Monica S. Lam, Finding application errors and security flaws using PQL: a program query language, Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
| |
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.
|
| |
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.
|
 |
23
|
|
 |
24
|
Kouhei Sakurai , Hidehiko Masuhara , Naoyasu Ubayashi , Saeko Matsuura , Seiichi Komiya, Association aspects, Proceedings of the 3rd international conference on Aspect-oriented software development, p.16-25, March 22-24, 2004, Lancaster, UK
[doi> 10.1145/976270.976275]
|
 |
25
|
|
| |
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.
|
|