Dependent advice: A general approach to optimizing history-based aspects

Eric Bodden, Feng Chen, Grigore Roşu

Research output: Chapter in Book/Report/Conference proceedingConference contribution

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.

Original languageEnglish (US)
Title of host publicationProceedings of the 8th ACM International Conference on Aspect-Oriented Software Development, AOSD'09
Pages3-14
Number of pages12
DOIs
StatePublished - 2009
Externally publishedYes
Event8th ACM International Conference on Aspect-Oriented Software Development, AOSD'09 - Charlottesville, VA, United States
Duration: Mar 2 2009Mar 6 2009

Publication series

NameProceedings of the 8th ACM International Conference on Aspect-Oriented Software Development, AOSD'09

Other

Other8th ACM International Conference on Aspect-Oriented Software Development, AOSD'09
Country/TerritoryUnited States
CityCharlottesville, VA
Period3/2/093/6/09

Keywords

  • Compilation and static program analysis
  • Domain-specific aspect languages
  • Runtime verification

ASJC Scopus subject areas

  • Computational Theory and Mathematics
  • Software

Fingerprint

Dive into the research topics of 'Dependent advice: A general approach to optimizing history-based aspects'. Together they form a unique fingerprint.

Cite this