Clara: A Framework for Partially Evaluating Finite-State Runtime Monitors Ahead of Time

Researchers have developed a number of runtime verification tools that generate runtime monitors in the form of AspectJ aspects. In this work, we present CLARA, a novel framework to statically optimize such monitoring aspects with respect to a given program under test. CLARA uses a sequence of increasingly precise static analyses to automatically convert a monitoring aspect into a residual runtime monitor. The residual monitor only watches events triggered by program locations that the analyses failed to prove safe at compile time. In two-thirds of the cases in our experiments, the static analysis succeeds on all locations, proving that the program fulfills the stated properties, and completely obviating the need for runtime monitoring. In the remaining cases, the residual runtime monitor is usually much more efficient than a full monitor, yet still captures all property violations at runtime.

[1]  Manu Sridharan,et al.  Refinement-based context-sensitive points-to analysis for Java , 2006, PLDI '06.

[2]  Hidehiko Masuhara,et al.  A Compilation and Optimization Model for Aspect-Oriented Programs , 2003, CC.

[3]  Grigore Rosu,et al.  Dependent advice: a general approach to optimizing history-based aspects , 2009, AOSD '09.

[4]  Oege de Moor,et al.  Making trace monitors feasible , 2007, OOPSLA.

[5]  David Harel,et al.  From multi-modal scenarios to code: compiling LSCs into aspectJ , 2006, SIGSOFT '06/FSE-14.

[6]  Robert E. Strom,et al.  Typestate: A programming language concept for enhancing software reliability , 1986, IEEE Transactions on Software Engineering.

[7]  Grigore Rosu,et al.  Parametric Trace Slicing and Monitoring , 2009, TACAS.

[8]  Grigore Rosu,et al.  Efficient Formalism-Independent Monitoring of Parametric Properties , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[9]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.

[10]  Matthew B. Dwyer,et al.  Residual dynamic typestate analysis exploiting static analysis: results to reformulate and reduce the cost of dynamic analysis , 2007, ASE.

[11]  Eran Yahav,et al.  Effective typestate verification in the presence of aliasing , 2006, TSEM.

[12]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[13]  Eric Bodden,et al.  Finding programming errors earlier by evaluating runtime monitors ahead-of-time , 2008, SIGSOFT '08/FSE-16.

[14]  Robert DeLine,et al.  Typestates for Objects , 2004, ECOOP.

[15]  Ondrej Lhoták,et al.  abc: an extensible AspectJ compiler , 2005, AOSD '05.

[16]  Eric Bodden Efficient hybrid typestate analysis by determining continuation-equivalent states , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[17]  Madeline Diep,et al.  Reducing the Cost of Path Property Monitoring Through Sampling , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[18]  Eric Bodden Verifying finite-state properties of large-scale programs , 2009 .

[19]  Ondrej Lhoták,et al.  Adding trace matching with free variables to AspectJ , 2005, OOPSLA '05.

[20]  Ondrej Lhoták,et al.  Typestate-like analysis of multiple interacting objects , 2008, OOPSLA.

[21]  Ondrej Lhoták,et al.  Optimising aspectJ , 2005, PLDI '05.

[22]  Grigore Rosu,et al.  Mop: an efficient and generic runtime verification framework , 2007, OOPSLA.

[23]  Jonathan Aldrich,et al.  Modular typestate checking of aliased objects , 2007, OOPSLA.

[24]  Martin Odersky ECOOP 2004 – Object-Oriented Programming , 2004, Lecture Notes in Computer Science.

[25]  Ondrej Lhoták,et al.  Collaborative Runtime Verification with Tracematches , 2010, J. Log. Comput..

[26]  Ingolf H. Krüger,et al.  Automating software architecture exploration with M2Aspects , 2006, SCESM '06.