TY - GEN
T1 - Dependent advice
T2 - 8th ACM International Conference on Aspect-Oriented Software Development, AOSD'09
AU - Bodden, Eric
AU - Chen, Feng
AU - Roşu, Grigore
PY - 2009
Y1 - 2009
N2 - 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.
AB - 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.
KW - Compilation and static program analysis
KW - Domain-specific aspect languages
KW - Runtime verification
UR - http://www.scopus.com/inward/record.url?scp=70450243145&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=70450243145&partnerID=8YFLogxK
U2 - 10.1145/1509239.1509243
DO - 10.1145/1509239.1509243
M3 - Conference contribution
AN - SCOPUS:70450243145
SN - 9781605584423
T3 - Proceedings of the 8th ACM International Conference on Aspect-Oriented Software Development, AOSD'09
SP - 3
EP - 14
BT - Proceedings of the 8th ACM International Conference on Aspect-Oriented Software Development, AOSD'09
Y2 - 2 March 2009 through 6 March 2009
ER -