ABSTRACT
A trace monitor observes an execution trace at runtime; when it recognises a specified sequence of events, the monitor runs extra code. In the aspect-oriented programming community, the idea originatedas a generalisation of the advice-trigger mechanism: instead of matchingon single events (joinpoints), one matches on a sequence of events. The runtime verification community has been investigating similar mechanisms for a number of years, specifying the event patterns in terms of temporal logic, and applying the monitors to hardware and software.
In recent years trace monitors have been adapted for use with mainstream object-oriented languages. In this setting, a crucial feature is to allow the programmer to quantify over groups of related objects when expressing the sequence of events to match. While many language proposals exist for allowing such features, until now no implementation had scalable performance: execution on all but very simple examples was infeasible.
This paper rectifies that situation, by identifying two optimisations for generating feasible trace monitors from declarative specifications of the relevant event pattern. We restrict ourselves to optimisations that do not have a significant impact on compile-time: they only analyse the event pattern, and not the monitored code itself.
The first optimisation is an important improvement over an earlier proposal in [2] to avoid space leaks. The second optimisation is a form of indexing for partial matches. Such indexing needs to be very carefully designed to avoid introducing new space leaks, and the resulting data structure is highly non-trivial.
- The abc team. Benchmarks for Trace Monitoring. Scripts and sources to compile and run the benchmarks: http://aspectbench.org/benchmarks.Google Scholar
- Chris Allan, Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Ondřej Lhoták, Oege de Moor, Damien Sereni, Ganesh Sittampalam, and Julian Tibble. Adding Trace Matching with Free Variables to AspectJ. In Object-Oriented Programming, Systems, Languages and Applications, pages 345--364. ACM Press, 2005. Google ScholarDigital Library
- AProVE. Automated Program Verification Environment. http://aprove.informatik.rwth-aachen.de/, 2006.Google Scholar
- AspectJ Eclipse Home. The AspectJ home page. http://eclipse.org/aspectj/, 2003.Google Scholar
- Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sascha Kuzins, Jennifer Lhoták, Ondřej Lhoták, Oege de Moor, Damien Sereni, Ganesh Sittampalam, and Julian Tibble. Optimising AspectJ. In Programming Language Design and Implementation (PLDI), pages 117--128. ACM Press, 2005. Google ScholarDigital Library
- Pavel Avgustinov, Oege de Moor, and Julian Tibble. On the semantics of trace monitoring patterns. In Runtime Verification, 2007.Google ScholarCross Ref
- Howard Barringer, Allen Goldberg, Klaus Havelund, and Koushik Sen. Rule-based runtime verification. In Fifth International Conference on Verification, Model Checking and Abstract Interpretation (VMCAI 04), volume 2937, pages 44--57. Lecture Notes in Computer Science, 2003.Google Scholar
- Christoph Bockisch, Mira Mezini, and Klaus Ostermann. Quantifying over dynamic properties of program execution. In 2nd Dynamic Aspects Workshop (DAW05), Technical Report 05.01, pages 71--75. Research Institute for Advanced Computer Science, 2005.Google Scholar
- Eric Bodden, Laurie Hendren, and Ondřej Lhoták. A staged static program analysis to improve the performance of runtime monitoring. In Proceedings of the European Conference on Object-Oriented Programming, Lecture Notes in Computer Science, page to appear. Springer, 2007. Google ScholarDigital Library
- Eric Bodden, Patrick Lam, and Laurie Hendren. Flow-sensitive static optimizations for runtime monitors. Technical Report abc-2007-3, abc project, 2007. http://abc.comlab.ox.ac.uk/techreports#abc-2007-3.Google Scholar
- Feng Chen and Grigore Roşu. Towards monitoring-oriented programming: A paradigm combining specification and implementation. In Workshop on Runtime Verification (RV'03), volume 89(2) of ENTCS, pages 108--127, 2003.Google Scholar
- Feng Chen and Grigore Roşu. Mop: An efficient and generic runtime verification framework. In David Bacon, editor, Proceedings of OOPSLA 2007, 2007. Google ScholarDigital Library
- María Augustina Cibrán and Bart Verheecke. Dynamic business rules for web service composition. In 2nd Dynamic Aspects Workshop (DAW05), pages 13--18, 2005.Google Scholar
- Marcelo d'Amorim and Klaus Havelund. Event-based runtime verification of java programs. In WODA'05: Proceedings of the third international workshop on Dynamic analysis, pages 1--7. ACM Press, 2005. Google ScholarDigital Library
- Rémi Douence, Thomas Fritz, Nicolas Loriant, Jean-Marc Menaud, Marc Ségura, and Mario Südholt. An expressive aspect language for system applications with arachne. In Aspect-Oriented Software Development, pages 27--38. ACM Press, 2005. Google ScholarDigital Library
- Rémi Douence, Olivier Motelet, and Mario Südholt. A formal definition of crosscuts. In Akinori Yonezawa and Satoshi Matsuoka, editors, Reflection 2001, volume 2192 of Lecture Notes in Computer Science, pages 170--186. Springer, 2001. Google ScholarDigital Library
- Grigore Rosu et al. JavaMOP homepage. http://fsl.cs.uiuc.edu/index.php/JavaMOP, 2007.Google Scholar
- Stephen Fink, Eran Yahav, Nurit Dor, G. Ramalingam, and Emmanuel Geay. Effective typestate verification in the presence of aliasing. In ISSTA'06: Proceedings of the 2006 international symposium on Software testing and analysis, pages 133--144, New York, NY, USA, 2006. ACM Press. Google ScholarDigital Library
- Thomas Fritz, Marc Ségura, Mario Südholt, Egon Wuchner, and Jean-Marc Menaud. An application of dynamic AOP to medical image generation. In 2nd Dynamic Aspects Workshop (DAW05), Technical Report 05.01, pages 5--12. Research Institute for Advanced Computer Science, 2005.Google Scholar
- Erich Gamma. JHotDraw. Available from http://sourceforge.net/projects/jhotdraw, 2004.Google Scholar
- Simon Goldsmith, Robert O'Callahan, and Alex Aiken. Relational queries over program traces. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications, pages 385--402. ACM Press, 2005. Google ScholarDigital Library
- Peter Hui and James Riely. Temporal aspects as security automata. In Foundations of Aspect-Oriented Languages (FOAL 2006), Workshop at AOSD 2006, Technical Report #06--01, pages 19--28. Iowa State University, 2006.Google Scholar
- Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. An overview of AspectJ. In J.Lindskov Knudsen, editor, European Conference on Object-Oriented Programming, volume 2072 of Lecture Notes in Computer Science, pages 327--353. Springer, 2001. Google ScholarDigital Library
- Ramnivas Laddad. AspectJ in Action. Manning, 2003.Google Scholar
- Michael Martin, Benjamin Livshits, and Monica S. Lam. Finding application errors using PQL: a program query language. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages and Applications, pages 365--383. ACM Press, 2005. Google ScholarDigital Library
- Volker Stolz and Eric Bodden. Temporal Assertions using AspectJ. In Electronic Notes in Theoretical Computer Science, volume 144, pages 109--124, 2006. Google ScholarDigital Library
- Arie van Deursen, Leon Moonen, and Marius Marin. AJHotDraw. http://sourceforge.net/projects/ajhotdraw/, 2006.Google Scholar
- Wim Vanderperren, Davy Suvé, María Augustina Cibrán, and Bruno De Fraine. Stateful aspects in JAsCo. In Software Composition: 4th International Workshop, volume 3628 of Lecture Notes in Computer Science. Springer, 2005. Google ScholarDigital Library
- w3c. Jigsaw. http://www.w3.org/Jigsaw/, 2006.Google Scholar
- Robert Walker and Kevin Viggers. Implementing protocols via declarative event patterns. In ACM Sigsoft International Symposium on Foundations of Software Engineering (FSE-12), pages 159--169. ACM Press, 2004. Google ScholarDigital Library
- Ian H. Witten and Eibe Frank. Data Mining: Practical Machine Learning Tools and Techniques with Java implementations. Morgan Kaufmann Publishers, 2000. Google ScholarDigital Library
Index Terms
- Making trace monitors feasible
Recommendations
Making trace monitors feasible
Proceedings of the 2007 OOPSLA conferenceA trace monitor observes an execution trace at runtime; when it recognises a specified sequence of events, the monitor runs extra code. In the aspect-oriented programming community, the idea originatedas a generalisation of the advice-trigger mechanism: ...
Programming event monitors
AbstractSpecification languages for runtime verification are commonly rooted in formal languages, such as temporal logic, automata, or regular expressions. We argue that, for practical purposes, specification languages for monitoring should allow language ...
Overhead-Aware Deployment of Runtime Monitors
Runtime VerificationAbstractOne important issue needed to be handled when applying runtime verification is the time overhead introduced by online monitors. According to how monitors are deployed with the system to be monitored, the overhead may come from the execution of ...
Comments