skip to main content
research-article

Monitor optimization via stutter-equivalent loop transformation

Published:17 October 2010Publication History
Skip Abstract Section

Abstract

There has been significant interest in equipping programs with runtime checks aimed at detecting errors to improve fault detection during testing and in the field. Recent work in this area has studied methods for efficiently monitoring a program execution's conformance to path property specifications, e.g., such as those captured by a finite state automaton. These techniques show great promise, but their broad applicability is hampered by the fact that for certain combinations of programs and properties the overhead of checking can slow the program down by up to 3500%.

We have observed that, in many cases, the overhead of runtime monitoring is due to the behavior of program loops. We present a general framework for optimizing the monitoring of loops relative to a property. This framework allows monitors to process a loop in constant-time rather than time that is proportional to the number of loop iterations. We present the results of an empirical study that demonstrates that significant overhead reduction that can be achieved by applying the framework to monitor properties of several large Java programs.

References

  1. }}M. Arnold, M. Vechev, and E. Yahav. Qvm: An efficient runtime for detecting defects in deployed systems. In Conf. on Obj. Oriented Prog. Sys. Lang. and App., pages 143--162, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}P. Avgustinov, J. Tibble, and O. de Moor. Making trace monitors feasible. In Conf. on Obj. Oriented Prog. Sys. Lang. and App., pages 589--608, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}C. Baier and J.-P. Katoen. Principles of Model Checking. MIT Press, 2009.Google ScholarGoogle Scholar
  4. }}S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovi´c, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Proc. of the 21st ACM SIGPLAN Conf. on Object-Oriented Programing, Systems, Languages, and Applications, pages 169--190, Oct. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}E. Bodden. Verifying Finite-State Properties of Large-Scale Programs. PhD thesis, McGill University, June 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}E. Bodden. Efficient hybrid typestate analysis by determining continuation-equivalent states. In Int'l. Conf. on Soft. Eng., 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}E. Bodden, L. Hendren, and O. Lhotak. A staged static program analysis to improve the performance of runtime monitoring. In Euro. Conf. on Obj. Oriented Prog., pages 525--549, July 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}E. Bodden, L. J. Hendren, P. Lam, O. Lhotak, and N. A. Naeem. Collaborative runtime verification with tracematches. In Works. on Runtime Verif., pages 22--37, March 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}E. Bodden, P. Lam, and L. Hendren. Finding programming errors earlier by evaluating runtime monitors ahead-of-time. In Int'l Symp on Found. of Soft. Eng., pages 36--47, New York, NY, USA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}R. Bodik, R. Gupta, and V. Sarkar. Abcd: eliminating array bounds checks on demand. In Proc. of the ACM SIGPLAN 2000 Conf. Prog. lang. design and impl., pages 321--333, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}F. Chen and G. Rosu. Mop: an efficient and generic runtime verification framework. In Conf. on Obj. Oriented Prog. Sys. Lang. and App., pages 569--588, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}L. A. Clarke and D. S. Rosenblum. A historical perspective on runtime assertion checking in software development. SIGSOFT Softw. Eng. Notes, 31(3):25--37, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}M. Das, S. Lerner, and M. Seigle. Esp: path-sensitive program verification in polynomial time. In Proc. of the ACM SIGPLAN 2002 Conf. Prog. lang. design and impl., pages 57-- 68, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}M. Dwyer and R. Purandare. Residual dynamic typestate analysis. In Int'l. Conf. on Aut. Soft. Eng., pages 124--133, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}M. Dwyer, G. Avrunin, and J. Corbett. Patterns in property specifications for finite-state verification. In Int'l. Conf. on Soft. Eng., pages 411--420, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}M. Dwyer, A. Kinneer, and S. Elbaum. Adaptive online program analysis. In Int'l. Conf. on Soft. Eng., pages 220--229, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}M. B. Dwyer, M. Diep, and S. Elbaum. Reducing the cost of path property monitoring through sampling. In Int'l. Conf. on Aut. Soft. Eng., pages 228--237, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}S. J. Fink, E. Yahav, N. Dor, G. Ramalingam, and E. Geay. Effective typestate verification in the presence of aliasing. ACM Trans. Softw. Eng. Methodol., 17(2):1--34, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}J. E. Hopcroft and J. D. Ullman. Introduction to Automata Theory, Languages and Computation. Addison-Wesley, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}M. Kim, M. Viswanathan, S. Kannan, I. Lee, and O. V. Sokolsky. Java-MaC: A run-time assurance approach for Java programs. Formal Meth. Sys. Design, 24(2):129--155, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}L. Lamport. What good is temporal logic? In IFIP Congress, pages 657--668, 1983.Google ScholarGoogle Scholar
  22. }}O. Lhotak. Spark: A flexible points-to analysis framework for Java. Master's thesis, McGill University, Dec 2002.Google ScholarGoogle Scholar
  23. }}S. P. Midkiff, J. E. Moreira, and M. Snir. Optimizing array reference checking in java programs. IBM Syst. J., 37(3):409--453, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}N. A. Naeem. Programmer-friendly decompiled java. Master's thesis, McGill University, Aug 2006.Google ScholarGoogle Scholar
  25. }}N. A. Naeem and O. Lhotak. Typestate-like analysis of multiple interacting objects. In Proceedings of the ACM SIGPLAN conference on Object-oriented programming systems languages and applications, pages 347--366, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}K. M. Olender and L. J. Osterweil. Cecil: A sequencing constraint language for automatic static analysis generation. IEEE Trans. Softw. Eng., 16(3):268--280, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}D. S. Rosenblum. A practical approach to programming with assertions. IEEE Trans. Softw. Eng., 21(1):19--31, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}Soot. http://www.sable.mcgill.ca/soot/.Google ScholarGoogle Scholar
  29. }}R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Softw. Eng., 12(1):157--171, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Monitor optimization via stutter-equivalent loop transformation

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!