Formal Methods in System Design

, Volume 54, Issue 3, pp 449–478 | Cite as

Almost event-rate independent monitoring

  • David Basin
  • Bhargav Nagaraja Bhatt
  • Srđan KrstićEmail author
  • Dmitriy TraytelEmail author


A monitoring algorithm is trace-length independent if its space consumption does not depend on the number of events processed. The analysis of many monitoring algorithms has aimed at establishing their trace-length independence. But a monitor’s space consumption can depend on characteristics of the trace other than its size. We put forward the stronger notion of event-rate independence, where a monitor’s space usage does not depend on the event rate, i.e., the number of events in a fixed time unit. This property is critical for monitoring voluminous streams of events with a high arrival rate. We propose a new algorithm for metric temporal logic (MTL) that is almost event-rate independent, where “almost” denotes a logarithmic dependence on the event rate: the algorithm must store the event rate as a number. Afterwards, we investigate more expressive logics. In particular, we extend linear dynamic logic with past operators and metric features. The resulting metric dynamic logic (MDL) offers the quantitative temporal conveniences of MTL while increasing its expressiveness. We show how to modify our MTL algorithm in a modular way, yielding an almost event-rate independent monitor for MDL. Finally, we compare our algorithms with traditional monitoring approaches, providing empirical evidence that almost event-rate independence matters in practice.


Runtime verification Monitoring Temporal logic Regular expressions 



This research is supported by the Swiss National Science Foundation grant Big Data Monitoring (167162) and by the US Air Force grant Monitoring at Any Cost (FA9550-17-1-0306). The authors are listed alphabetically. Felix Klaedtke showed us an example property not expressible in MTL. Joshua Schneider participated in discussions about simplifying MDL’s syntax. Domenico Bianculli, Jasmin Blanchette, Joshua Schneider, and anonymous reviewers helped us to improve the presentation of this work.


  1. 1.
    Antimirov V (1996) Partial derivatives of regular expressions and finite automaton constructions. Theor Comput Sci 155(2):291–319MathSciNetCrossRefGoogle Scholar
  2. 2.
    Asarin E, Caspi P, Maler O (2002) Timed regular expressions. J ACM 49(2):172–206MathSciNetCrossRefGoogle Scholar
  3. 3.
    Basin DA, Bhatt B, Traytel D (2017) Almost event-rate indepedent monitoring of metric temporal logic. In: Legay A, Margaria T (eds) TACAS 2017, LNCS, vol 10206. Springer, New York, pp 94–112Google Scholar
  4. 4.
    Basin DA, Klaedtke F, Zălinescu E (2017) Algorithms for monitoring real-time properties. Acta Inf 55:309–338MathSciNetCrossRefGoogle Scholar
  5. 5.
    Basin DA, Klaedtke F, Zălinescu E (2017) The MonPoly monitoring tool. In: Reger G, Havelund K (eds) RV-CuBES 2017, Kalpa Publications in computing, vol 3. EasyChair, Seattle, pp 19–28Google Scholar
  6. 6.
    Basin DA, Krstić S, Traytel D (2017) AERIAL: almost event-rate independent algorithms for monitoring metric regular properties. In: Reger G, Havelund K (eds) RV-CuBES 2017, Kalpa Publications in computing, vol 3. EasyChair, Seattle, pp 29–36Google Scholar
  7. 7.
    Basin DA, Krstić S, Traytel D (2017) Almost event-rate indepedent monitoring of metric dynamic logic. In: Lahiri S, Reger G (eds) RV 2017, LNCS, vol 10548. Springer, New York, pp 85–102Google Scholar
  8. 8.
    Basin DA, Klaedtke F, Müller S, Pfitzmann B (2008) Runtime monitoring of metric first-order temporal properties. In: Hariharan R, Mukund M, Vinay V (eds) FSTTCS 2008, LIPIcs, vol 2. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, Wadern, pp 49–60Google Scholar
  9. 9.
    Basin DA, Klaedtke F, Müller S, Zălinescu E (2015) Monitoring metric first-order temporal properties. J ACM 62(2):15:1–15:45MathSciNetCrossRefGoogle Scholar
  10. 10.
    Basin DA, Klaedtke F, Zălinescu E (2012) Algorithms for monitoring real-time properties. In: Khurshid S, Sen K (eds) RV 2011, LNCS, vol 7186. Springer, New York, pp 260–275Google Scholar
  11. 11.
    Bauer A, Küster J, Vegliach G (2013) From propositional to first-order monitoring. In: Legay A, Bensalem S (eds) RV 2013, LNCS, vol 8174. Springer, New York, pp 59–75Google Scholar
  12. 12.
    Bouyer P, Chevalier F, Markey N (2010) On the expressiveness of TPTL and MTL. Inf Comput 208(2):97–116MathSciNetCrossRefGoogle Scholar
  13. 13.
    Brzozowski JA (1964) Derivatives of regular expressions. J ACM 11(4):481–494MathSciNetCrossRefGoogle Scholar
  14. 14.
    D’Angelo B, Sankaranarayanan S, Sánchez C, Robinson W, Finkbeiner B, Sipma HB, Mehrotra S, Manna Z (2005) LOLA: runtime monitoring of synchronous systems. In: TIME 2005. IEEE Computer Society, pp 166–174Google Scholar
  15. 15.
    Dax C, Klaedtke F, Lange M (2010) On regular temporal logics with past. Acta Inf 47(4):251–277CrossRefGoogle Scholar
  16. 16.
    De Giacomo G, De Masellis R, Grasso M, Maggi FM, Montali M (2014) LTLf and LDLf monitoring: a technical report. CoRR arXiv:1405.0054
  17. 17.
    De Giacomo G, De Masellis R, Grasso M, Maggi FM, Montali M (2014) Monitoring business metaconstraints based on LTL and LDL for finite traces. In: Sadiq SW, Soffer P, Völzer H (eds) BPM 2014, LNCS, vol 8659. Springer, New York, pp 1–17Google Scholar
  18. 18.
    De Giacomo G, Vardi MY (2013) Linear temporal logic and linear dynamic logic on finite traces. In: Rossi F (ed) IJCAI-13. AAAI Press, New Orleans, pp 854–860Google Scholar
  19. 19.
    Du X, Liu Y, Tiu A (2015) Trace-length independent runtime monitoring of quantitative policies in LTL. In: Bjørner N, de Boer F (eds) FM 2015, LNCS, vol 9109. Springer, New York, pp 231–247Google Scholar
  20. 20.
    Faymonville P, Zimmermann M (2014) Parametric linear dynamic logic. In: Peron A, Piazza C (eds) Proceedings 5th GandALF 2014, EPTCS, vol 161, pp 60–73MathSciNetCrossRefGoogle Scholar
  21. 21.
    Faymonville P, Zimmermann M (2017) Parametric linear dynamic logic. Inf Comput 253:237–256MathSciNetCrossRefGoogle Scholar
  22. 22.
    Filliâtre J, Conchon S (2006) Type-safe modular hash-consing. In: Kennedy A, Pottier F (eds) ACM workshop on ML. ACM, New York, pp 12–19Google Scholar
  23. 23.
    Fischer MJ, Ladner RE (1979) Propositional dynamic logic of regular programs. J Comput Syst Sci 18(2):194–211MathSciNetCrossRefGoogle Scholar
  24. 24.
    Furia CA, Spoletini P (2014) Bounded variability of metric temporal logic. In: Cesta A, Combi C, Laroussinie F (eds) TIME 2014. IEEE Computer Society, Washington, pp 155–163Google Scholar
  25. 25.
    Gorostiaga F, Sánchez C (2018) Striver: stream runtime verification for real-time event-streams. In: Colombo C, Leucker M (eds) RV 2018, LNCS, vol 11237. Springer, New York, pp 282–298Google Scholar
  26. 26.
    Gunadi H, Tiu A (2014) Efficient runtime monitoring with metric temporal logic: a case study in the Android operating system. In: Jones CB, Pihlajasaari P, Sun J (eds) FM 2014, LNCS, vol 8442. Springer, New York, pp 296–311CrossRefGoogle Scholar
  27. 27.
    Havelund K, Peled D, Ulus D (2018) DejaVu: a monitoring tool for first-order temporal logic. In: 3rd workshop on monitoring and testing of cyber-physical systems, MT@CPSWeek 2018, Porto, Portugal, April 10, 2018, pp 12–13Google Scholar
  28. 28.
    Havelund K, Roşu G (2002) Synthesizing monitors for safety properties. In: Katoen J, Stevens P (eds) TACAS 2002, LNCS, vol 2280. Springer, New York, pp 342–356Google Scholar
  29. 29.
    Henriksen JG, Thiagarajan P (1999) Dynamic linear time temporal logic. Ann Pure Appl Log 96(1):187–207MathSciNetCrossRefGoogle Scholar
  30. 30.
    Ho H, Ouaknine J, Worrell J (2014) Online monitoring of metric temporal logic. In: Bonakdarpour B, Smolka SA (eds) RV 2014, LNCS, vol 8734. Springer, New York, pp 178–192Google Scholar
  31. 31.
    Kapoutsis CA (2005) Removing bidirectionality from nondeterministic finite automata. In: Jedrzejowicz J, Szepietowski A (eds) MFCS 2005, LNCS, vol 3618. Springer, New York, pp 544–555Google Scholar
  32. 32.
    Koymans R (1990) Specifying real-time properties with metric temporal logic. Real-Time Syst 2(4):255–299CrossRefGoogle Scholar
  33. 33.
    Leucker M, Sánchez C (2007) Regular linear temporal logic. In: Jones CB, Liu Z, Woodcock J (eds) ICTAC 2007, LNCS, vol 4711. Springer, New York, pp 291–305Google Scholar
  34. 34.
    Leucker M, Sánchez C, Scheffel T, Schmitz M, Schramm A (2018) Tessla: runtime verification of non-synchronized real-time streams. In: Haddad HM, Wainwright RL, Chbeir R (eds) SAC 2018. ACM, New York, pp 1925–1933Google Scholar
  35. 35.
    Maler O, Nickovic D, Pnueli A (2005) Real time temporal logic: past, present, future. In: Pettersson P, Yi W (eds) FORMATS 2005, LNCS, vol 3829. Springer, New York, pp 2–16Google Scholar
  36. 36.
    McAfee A, Brynjolfsson E (2012) Big data: the management revolution. Harv Bus Rev 90(10):61–67Google Scholar
  37. 37.
    Pous D (2015) Symbolic algorithms for language equivalence and Kleene algebra with tests. In: Walker D (ed) POPL 2015. ACM, New York, pp 357–368Google Scholar
  38. 38.
    Sánchez C, Leucker M (2010) Regular linear temporal logic with past. In: Barthe G, Hermenegildo MV (eds) VMCAI 2010, LNCS, vol 5944. Springer, New York, pp 295–311Google Scholar
  39. 39.
    Tange O (2011) GNU Parallel—the command-line power tool. login USENIX Mag 36(1):42–47.
  40. 40.
    Thati P, Roşu G (2005) Monitoring algorithms for metric temporal logic specifications. Electron Notes Theor Comput Sci 113:145–162CrossRefGoogle Scholar
  41. 41.
    Ulus D (2016) Montre: a tool for monitoring timed regular expressions. arXiv preprint arXiv:1605.05963
  42. 42.
    Ulus D, Ferrère T, Asarin E, Maler O (2014) Timed pattern matching. In: Legay A, Bozga M (eds) FORMATS 2014, LNCS, vol 8711. Springer, New York, pp 222–236Google Scholar
  43. 43.
    Ulus D, Ferrère T, Asarin E, Maler O (2016) Online timed pattern matching using derivatives. In: Chechik M, Raskin JF (eds) TACAS 2016, LNCS, vol 9636. Springer, New York, pp 736–751Google Scholar
  44. 44.
    Vardi MY (2008) From church and prior to PSL. In: Grumberg O, Veith H (eds) 25 Years of model checking—history, achievements, perspectives, LNCS, vol 5000. Springer, New York, pp 150–171CrossRefGoogle Scholar
  45. 45.
    Wolper P (1983) Temporal logic can be more expressive. Inf Control 56(1/2):72–99MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Institute of Information Security, Department of Computer ScienceETH ZürichZurichSwitzerland

Personalised recommendations