Skip to main content

Randomized First-Order Monitoring with Hashing

  • Conference paper
  • First Online:
Book cover Runtime Verification (RV 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13498))

Included in the following conference series:

Abstract

Online monitors for first-order specifications may need to store many domain values in their state, requiring significant memory. We propose an approach that compresses the monitor’s state using randomized hash functions. Unlike input sampling, our approach does not require the knowledge of distributions over traces to achieve low error probability. We develop algorithms that insert hash functions into temporal–relational algebra specifications and compute upper bounds on the resulting error probability. We employ a special hashing scheme that allows us to merge values across attributes, which further reduces memory usage. We evaluated our implementation and achieved memory reductions up to \(33\%\) when monitoring traces with large domain values, with error probability less than two in a million.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The meta-variable I will later be used for both types of intervals.

  2. 2.

    The support of a discrete probability distribution is the set of values with nonzero probability.

References

  1. Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Boston (1995)

    Google Scholar 

  2. Almeida, P.S., Baquero, C., Preguiça, N.M., Hutchison, D.: Scalable Bloom filters. Inf. Process. Lett. 101(6), 255–261 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  3. Bartocci, E., Grosu, R., Karmarkar, A., Smolka, S.A., Stoller, S.D., Zadok, E., Seyster, J.: Adaptive runtime verification. In: Qadeer, S., Tasiran, S. (eds.) RV 2012. LNCS, vol. 7687, pp. 168–182. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-35632-2_18

    Chapter  Google Scholar 

  4. Basin, D., Dardinier, T., Heimes, L., Krstić, S., Raszyk, M., Schneider, J., Traytel, D.: A formally verified, optimized monitor for metric first-order dynamic logic. In: Peltier, N., Sofronie-Stokkermans, V. (eds.) IJCAR 2020. LNCS (LNAI), vol. 12166, pp. 432–453. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-51074-9_25

    Chapter  Google Scholar 

  5. Basin, D., Klaedtke, F., Marinovic, S., Zălinescu, E.: Monitoring of temporal first-order properties with aggregations. Formal Methods Syst. Des. 46(3), 262–285 (2015). https://doi.org/10.1007/s10703-015-0222-7

    Article  MATH  Google Scholar 

  6. Basin, D., Klaedtke, F., Müller, S., Zălinescu, E.: Monitoring metric first-order temporal properties. J. ACM 62(2), 15:1–15:45 (2015)

    Google Scholar 

  7. Berg, F.I.: Recursive variable-length state compression for multi-core software model checking. In: Dutle, A., Moscato, M.M., Titolo, L., Muñoz, C.A., Perez, I. (eds.) NFM 2021. LNCS, vol. 12673, pp. 340–357. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-76384-8_21

    Chapter  Google Scholar 

  8. Bloom, B.H.: Space/time trade-offs in hash coding with allowable errors. Commun. ACM 13(7), 422–426 (1970)

    Article  MATH  Google Scholar 

  9. Carter, L., Floyd, R.W., Gill, J., Markowsky, G., Wegman, M.N.: Exact and approximate membership testers. In: STOC 1978, pp. 59–65. ACM (1978)

    Google Scholar 

  10. Chomicki, J.: Efficient checking of temporal integrity constraints using bounded history encoding. ACM Trans. Database Syst. 20(2), 149–186 (1995)

    Article  Google Scholar 

  11. Clayton, D., Patton, C., Shrimpton, T.: Probabilistic data structures in adversarial environments. In: CCS 2019, pp. 1317–1334. ACM (2019)

    Google Scholar 

  12. D’Angelo, B., et al.: LOLA: runtime monitoring of synchronous systems. In: TIME 2005, pp. 166–174. IEEE Computer Society (2005)

    Google Scholar 

  13. Dillinger, P.C., Manolios, P.: Bloom filters in probabilistic verification. In: Hu, A.J., Martin, A.K. (eds.) FMCAD 2004. LNCS, vol. 3312, pp. 367–381. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30494-4_26

    Chapter  MATH  Google Scholar 

  14. Fan, B., Andersen, D.G., Kaminsky, M., Mitzenmacher, M.: Cuckoo filter: practically better than bloom. In: CoNEXT 2014, pp. 75–88. ACM (2014)

    Google Scholar 

  15. Fan, L., Cao, P., Almeida, J.M., Broder, A.Z.: Summary cache: a scalable wide-area web cache sharing protocol. IEEE/ACM Trans. Netw. 8(3), 281–293 (2000)

    Article  Google Scholar 

  16. Faymonville, P., Finkbeiner, B., Schledjewski, M., Schwenger, M., Stenger, M., Tentrup, L., Torfah, H.: StreamLAB: stream-based monitoring of cyber-physical systems. In: Dillig, I., Tasiran, S. (eds.) CAV 2019. LNCS, vol. 11561, pp. 421–431. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-25540-4_24

    Chapter  Google Scholar 

  17. Fox, E.A., Chen, Q.F., Daoud, A.M., Heath, L.S.: Order-preserving minimal perfect hash functions and information retrieval. ACM Trans. Inf. Syst. 9(3), 281–308 (1991)

    Article  Google Scholar 

  18. Grigore, R., Kiefer, S.: Selective monitoring. In: CONCUR 2018. LIPIcs, vol. 118, pp. 20:1–20:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2018)

    Google Scholar 

  19. Guo, D., Wu, J., Chen, H., Yuan, Y., Luo, X.: The dynamic bloom filters. IEEE Trans. Knowl. Data Eng. 22(1), 120–133 (2010)

    Article  Google Scholar 

  20. Havelund, K.: Rule-based runtime verification revisited. Int. J. Softw. Tools Technol. Transf. 17(2), 143–170 (2014). https://doi.org/10.1007/s10009-014-0309-2

    Article  Google Scholar 

  21. Havelund, K., Peled, D.: First-order timed runtime verification using BDDs. In: Hung, D.V., Sokolsky, O. (eds.) ATVA 2020. LNCS, vol. 12302, pp. 3–24. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-59152-6_1

    Chapter  Google Scholar 

  22. Havelund, K., Peled, D., Ulus, D.: First-order temporal logic monitoring with BDDs. Formal Methods Syst. Des. 56(1), 1–21 (2020)

    Google Scholar 

  23. Havelund, K., Reger, G., Thoma, D., Zălinescu, E.: Monitoring events that carry data. In: Bartocci, E., Falcone, Y. (eds.) Lectures on Runtime Verification. LNCS, vol. 10457, pp. 61–102. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-75632-5_3

    Chapter  Google Scholar 

  24. Havelund, K., Roşu, G.: Synthesizing monitors for safety properties. In: Katoen, J.-P., Stevens, P. (eds.) TACAS 2002. LNCS, vol. 2280, pp. 342–356. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-46002-0_24

    Chapter  MATH  Google Scholar 

  25. Heydari, A., Ali Tavakoli, M., Salim, N.: Detection of fake opinions using time series. Expert Syst. Appl. 58, 83–92 (2016)

    Google Scholar 

  26. Holzmann, G.J.: State compression in SPIN: recursive indexing and compression training runs. In: SPIN Workshop 1997 (1997)

    Google Scholar 

  27. Holzmann, G.J.: An analysis of bitstate hashing. Formal Methods Syst. Des. 13(3), 289–307 (1998)

    Article  Google Scholar 

  28. Kalajdzic, K., Bartocci, E., Smolka, S.A., Stoller, S.D., Grosu, R.: Runtime verification with particle filtering. In: Legay, A., Bensalem, S. (eds.) RV 2013. LNCS, vol. 8174, pp. 149–166. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40787-1_9

    Chapter  Google Scholar 

  29. Koymans, R.: Specifying real-time properties with metric temporal logic. Real Time Syst. 2(4), 255–299 (1990)

    Article  Google Scholar 

  30. Laarman, A., van de Pol, J., Weber, M.: Parallel recursive state compression for free. In: Groce, A., Musuvathi, M. (eds.) SPIN 2011. LNCS, vol. 6823, pp. 38–56. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22306-8_4

    Chapter  Google Scholar 

  31. Legay, A., Delahaye, B., Bensalem, S.: Statistical model checking: an overview. In: Barringer, H., et al. (eds.) RV 2010. LNCS, vol. 6418, pp. 122–135. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16612-9_11

    Chapter  Google Scholar 

  32. Lemire, D., Kaser, O.: Faster 64-bit universal hashing using carry-less multiplications. J. Cryptogr. Eng. 6(3), 171–185 (2015). https://doi.org/10.1007/s13389-015-0110-5

    Article  Google Scholar 

  33. Mamouras, K., Raghothaman, M., Alur, R., Ives, Z.G., Khanna, S.: StreamQRE: modular specification and efficient evaluation of quantitative queries over streaming data. In: PLDI 2017, pp. 693–708. ACM (2017)

    Google Scholar 

  34. Mitzenmacher, M., Upfal, E.: Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis, 2nd edn. Cambridge University Press, Cambridge (2017)

    Google Scholar 

  35. Naor, M., Yogev, E.: Tight bounds for sliding bloom filters. Algorithmica 73(4), 652–672 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  36. Ni, J., Li, J., McAuley, J.J.: Justifying recommendations using distantly-labeled reviews and fine-grained aspects. In: EMNLP 2019, pp. 188–197. Association for Computational Linguistics (2019). Dataset: https://nijianmo.github.io/amazon/index.html

  37. de Oliveira, D.B., Cucinotta, T., de Oliveira, R.S.: Efficient formal verification for the Linux kernel. In: Ölveczky, P.C., Salaün, G. (eds.) SEFM 2019. LNCS, vol. 11724, pp. 315–332. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30446-1_17

    Chapter  Google Scholar 

  38. Orgun, M.A., Wadge, W.W.: A relational algebra as a query language for temporal DATALOG. In: Tjoa, A., Ramos, I. (eds.) DEXA 1992, pp. 276–281. Springer, Vienna (1992). https://doi.org/10.1007/978-3-7091-7557-6_48

  39. Pagh, A., Pagh, R., Rao, S.S.: An optimal Bloom filter replacement. In: SODA 2005, pp. 823–829. SIAM (2005)

    Google Scholar 

  40. Pagh, R., Segev, G., Wieder, U.: How to approximate a set without knowing its size in advance. In: FOCS 2013, pp. 80–89. IEEE Computer Society (2013)

    Google Scholar 

  41. Roşu, G., Chen, F.: Semantics and algorithms for parametric monitoring. Log. Methods Comput. Sci. 8(1) (2012)

    Google Scholar 

  42. Schneider, J.: Randomized first-order monitoring with hashing (extended report) (2022). https://ethz.ch/content/dam/ethz/special-interest/infk/inst-infsec/information-security-group-dam/research/publications/pub2022/rv22-extended.pdf

  43. Schumann, J., Rozier, K.Y., Reinbacher, T., Mengshoel, O.J., Mbaya, T., Ippolito, C.: Towards real-time, on-board, hardware-supported sensor and software health management for unmanned aerial systems. Int. J. Progn. Health Manag. 6(1), 1–27 (2015)

    Google Scholar 

  44. Sen, K., Viswanathan, M., Agha, G.: Statistical model checking of black-box probabilistic systems. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 202–215. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-27813-9_16

    Chapter  Google Scholar 

  45. Stinson, D.R.: Universal hashing and authentication codes. Des. Codes Cryptogr. 4(4), 369–380 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  46. Tuzhilin, A., Clifford, J.: A temporal relational algebra as basis for temporal relational completeness. In: VLDB Conference 1990, pp. 13–23. Morgan Kaufmann (1990)

    Google Scholar 

  47. Vardi, M.Y.: The complexity of relational query languages (extended abstract). In: STOC 1982, pp. 137–146. ACM (1982)

    Google Scholar 

  48. Wang, Z., Luo, T., Xu, G., Wang, X.: The application of cartesian-join of Bloom filters to supporting membership query of multidimensional data. In: 2014 IEEE International Congress on Big Data, pp. 288–295. IEEE Computer Society (2014)

    Google Scholar 

  49. Wegman, M.N., Carter, L.: New hash functions and their use in authentication and set equality. J. Comput. Syst. Sci. 22(3), 265–279 (1981)

    Article  MathSciNet  MATH  Google Scholar 

  50. Wilson, E.B.: Probable inference, the law of succession, and statistical inference. J. Am. Stat. Assoc. 22(158), 209–212 (1927)

    Article  Google Scholar 

Download references

Acknowledgement

The author thanks David Basin, Srđan Krstić, Dmitriy Traytel, and the anonymous reviewers for their helpful comments and suggestions. This research was supported by the US Air Force grant “Monitoring at Any Cost” (FA9550-17-1-0306).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Joshua Schneider .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Schneider, J. (2022). Randomized First-Order Monitoring with Hashing. In: Dang, T., Stolz, V. (eds) Runtime Verification. RV 2022. Lecture Notes in Computer Science, vol 13498. Springer, Cham. https://doi.org/10.1007/978-3-031-17196-3_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-17196-3_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-17195-6

  • Online ISBN: 978-3-031-17196-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics