Dependent advice
Authors:
Open Access
- 2 March 2009
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 3-14
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.Keywords
This publication has 17 references indexed in Scilit:
- Finding programming errors earlier by evaluating runtime monitors ahead-of-time2008
- Making trace monitors feasible2007
- Mop2007
- From multi-modal scenarios to code2006
- Temporal Assertions using AspectJElectronic Notes in Theoretical Computer Science, 2006
- Relational queries over program traces2005
- Finding application errors and security flaws using PQL2005
- abc2005
- Association aspects2004
- Dataflow Pointcut in Aspect-Oriented Programming2003