Advertisement

Tree Buffers

  • Radu Grigore
  • Stefan Kiefer
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9206)

Abstract

In runtime verification, the central problem is to decide if a given program execution violates a given property. In online runtime verification, a monitor observes a program’s execution as it happens. If the program being observed has hard real-time constraints, then the monitor inherits them. In the presence of hard real-time constraints it becomes a challenge to maintain enough information to produce error traces, should a property violation be observed. In this paper we introduce a data structure, called tree buffer, that solves this problem in the context of automata-based monitors: If the monitor itself respects hard real-time constraints, then enriching it by tree buffers makes it possible to provide error traces, which are essential for diagnosing defects. We show that tree buffers are also useful in other application domains. For example, they can be used to implement functionality of capturing groups in regular expressions. We prove optimal asymptotic bounds for our data structure, and validate them using empirical data from two sources: regular expression searching through Wikipedia, and runtime verification of execution traces obtained from the DaCapo test suite.

Notes

Acknowledgements

Grigore is supported by EPSRC Programme Grant Resource Reasoning (EP/H008373/2). Kiefer is supported by a Royal Society University Research Fellowship. We thank the reviewers for their comments. We thank Rasmus Lerchedahl Petersen for his contribution to the implementation of an early version of the amortized algorithm in the runtime verifier TOPL.

References

  1. 1.
    Barringer, H., Falcone, Y., Havelund, K., Reger, G., Rydeheard, D.: Quantified event automata: towards expressive and efficient runtime monitors. In: Giannakopoulou, D., Méry, D. (eds.) FM 2012. LNCS, vol. 7436, pp. 68–84. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  2. 2.
    Bauer, A., Küster, J.-C., Vegliach, G.: From propositional to first-order monitoring. In: Legay, A., Bensalem, S. (eds.) RV 2013. LNCS, vol. 8174, pp. 59–75. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  3. 3.
    Björklund, H., Schwentick, T.: On notions of regularity for data languages. Theor. Comput. Sci. 411(4–5), 702–715 (2010)CrossRefzbMATHGoogle Scholar
  4. 4.
    Blackburn, S.M., Garner, R., Hoffmann, C., Khan, A.M., McKinley, K.S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M., Hosking, A.L., Jump, M., Lee, H.B., Moss, J.E.B., Phansalkar, A., Stefanovic, D., VanDrunen, T., von Dincklage, D., Wiedermann, B.: The DaCapo benchmarks: Java benchmarking development and analysis. In: Tarr, P.L., Cook, W.R. (eds.) Proceedings of the 21th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2006, 22–26 Oct 2006, Portland, Oregon, USA, pp. 169–190. ACM (2006)Google Scholar
  5. 5.
    Bodden, E.: MOPBox: A library approach to runtime verification – (tool demonstration). In: Khurshid and Sen [17], pp. 365–369Google Scholar
  6. 6.
    Bojanczyk, M., Muscholl, A., Schwentick, T., Segoufin, L., David, C.: Two-variable logic on words with data. In: Proceedings of the 21th IEEE Symposium on Logic in Computer Science (LICS 2006), 12–15 Aug 2006, Seattle, WA, USA, pp. 7–16. IEEE Computer Society (2006)Google Scholar
  7. 7.
    Amit, C.: CS49: Data Stream Algorithms. Lecture Notes. Dartmouth College, New Hampshire (2014) Google Scholar
  8. 8.
    Finkbeiner, B., Sipma, H.: Checking finite traces using alternating automata. Form. Methods Syst. Des. 24(2), 101–127 (2004)CrossRefzbMATHGoogle Scholar
  9. 9.
    Grigore, R., Distefano, D., Petersen, R.L., Tzevelekos, N.: Runtime verification based on register automata. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013 (ETAPS 2013). LNCS, vol. 7795, pp. 260–276. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  10. 10.
    Grigore, R., Kiefer, S.: Tree buffers. http://arxiv.org/abs/1504.04757. Full version, with proofs
  11. 11.
    Grigore, R., Kiefer, S.: Tree buffers. http://github.com/rgrig/treebuffers/. Implementation
  12. 12.
    Gündüzhan, E., Momtahan, K.: Linear prediction based packet loss concealment algorithm for PCM coded speech. IEEE Trans. Speech Audio Process. 9(8), 778–785 (2001)CrossRefGoogle Scholar
  13. 13.
    Havelund, K.: Monitoring with data automata. In: Margaria, T., Steffen, B. (eds.) ISoLA 2014, Part II. LNCS, vol. 8803, pp. 254–273. Springer, Heidelberg (2014) Google Scholar
  14. 14.
    Jin, D., Meredith, P.O., Lee, C., Rosu, G.: JavaMOP: Efficient parametric runtime monitoring framework. In: Glinz, M., Murphy, G.C., Pezzè, M. (eds.) 34th International Conference on Software Engineering, ICSE 2012, 2–9 June 2012, Zurich, Switzerland, pp. 1427–1430. IEEE (2012)Google Scholar
  15. 15.
    Kaashoek, M.F., Tanenbaum, A.S.: Group communication in the Amoeba distributed operating system. In: Distributed, Computing Systems, pp. 222–230 (1991)Google Scholar
  16. 16.
    Kaminski, M., Francez, N.: Finite-memory automata (extended abstract). In: FOCS, pp. 683–688. IEEE Computer Society (1990)Google Scholar
  17. 17.
    Stoller, S.D., Bartocci, E., Seyster, J., Grosu, R., Havelund, K., Smolka, S.A., Zadok, E.: Runtime verification with state estimation. In: Khurshid, S., Sen, K. (eds.) RV 2011. LNCS, vol. 7186, pp. 193–207. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  18. 18.
    Knuth, D.E.: The stanford graphBase – a platform for combinatorial computing. ACM (1993)Google Scholar
  19. 19.
    Rustan, K., Leino, M., Millstein, T.D.: Generating error traces from verification-condition counterexamples. Sci. Comput. Program. 55(1–3), 209–226 (2005)zbMATHGoogle Scholar
  20. 20.
    Leskovec, J., Rajaraman, A., Ullman, J.D.: Mining Massive Datasets. http://mmds.org/ (2014)
  21. 21.
    Luo, Q., Zhang, Y., Lee, C., Jin, D., Meredith, P.O.N., Şerbănuţă, T.F., Roşu, G.: RV-Monitor: efficient parametric runtime verification with simultaneous properties. In: Bonakdarpour, B., Smolka, S.A. (eds.) RV 2014. LNCS, vol. 8734, pp. 285–300. Springer, Heidelberg (2014) Google Scholar
  22. 22.
    Pike, L., Niller, S., Wegmann, N.: Runtime verification for ultra-critical systems. In: Khurshid, S., Sen, K. (eds.) RV 2011. LNCS, vol. 7186, pp. 310–324. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  23. 23.
    Rosu, G., Chen, F.: Semantics and algorithms for parametric monitoring. Log. Methods Comput. Sci. 8(1), 1–47 (2012)MathSciNetCrossRefGoogle Scholar
  24. 24.
    Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. In: Proceedings of the 13th Annual ACM Symposium on Theory of Computing, 11–13 May 1981, Milwaukee, Wisconsin, USA, pp. 114–122. ACM (1981)Google Scholar
  25. 25.
    Smith, J.E., Pleszkun, A.R.: Implementing precise interrupts in pipelined processors. IEEE Trans. Comput. 37(5), 562–573 (1988)CrossRefGoogle Scholar
  26. 26.
    Tzevelekos, N., Grigore, R.: History-register automata. In: Pfenning, F. (ed.) FOSSACS 2013 (ETAPS 2013). LNCS, vol. 7794, pp. 17–33. Springer, Heidelberg (2013) CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.University of OxfordOxfordUK

Personalised recommendations