Skip to main content

On the Complexity of Timed Pattern Matching

  • Conference paper
  • First Online:
Formal Modeling and Analysis of Timed Systems (FORMATS 2021)

Abstract

Timed pattern matching consists in finding occurrences of a timed regular expression in a timed word. This problem has been addressed using several techniques, its solutions are implemented in tools (quite efficient in practice), and used, for example in log analysis and runtime verification. In this article, we explore computational complexity of timed pattern matching, and prove P, NP and PSPACE bounds, depending on connectives used in expressions and other details. We conclude with a couple of open questions.

E. Asarin—Supported by ANR-JST grant CyPhAI.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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.

    To avoid confusion, we recall that high complexity bounds, such as the famous non-elementary bound of [18], deal with quite a different problem of emptiness checking.

  2. 2.

    We avoid empty matches, and for this reason use \(^+\) rather than \(^*\) for Kleene iteration.

  3. 3.

    Note that the present bound, unlike the ones in [21], does not rely on expressions having integer interval bounds.

  4. 4.

    This would not work for Kleene \(^+\).

References

  1. Alur, R., Dill, D.L.: A theory of timed automata. Theor. Comput. Sci. 126(2), 183–235 (1994). https://doi.org/10.1016/0304-3975(94)90010-8

    Article  MathSciNet  MATH  Google Scholar 

  2. Asarin, E., Caspi, P., Maler, O.: A Kleene theorem for timed automata. In: LICS, pp. 160–171 (1997). https://doi.org/10.1109/LICS.1997.614944

  3. Asarin, E., Caspi, P., Maler, O.: Timed regular expressions. J. ACM 49(2), 172–206 (2002). https://doi.org/10.1145/506147.506151

    Article  MathSciNet  MATH  Google Scholar 

  4. Bakhirkin, A., Ferrère, T., Maler, O., Ulus, D.: On the quantitative semantics of regular expressions over real-valued signals. In: Abate, A., Geeraerts, G. (eds.) FORMATS 2017. LNCS, vol. 10419, pp. 189–206. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-65765-3_11

    Chapter  MATH  Google Scholar 

  5. Bakhirkin, A., Ferrère, T., Nickovic, D., Maler, O., Asarin, E.: Online timed pattern matching using automata. In: Jansen, D.N., Prabhakar, P. (eds.) FORMATS 2018. LNCS, vol. 11022, pp. 215–232. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-00151-3_13

    Chapter  MATH  Google Scholar 

  6. Choffrut, C., Goldwurm, M.: Timed automata with periodic clock constraints. J. Autom. Lang. Comb. 5(4), 371–403 (2000). https://doi.org/10.25596/jalc-2000-371

    Article  MathSciNet  MATH  Google Scholar 

  7. Dima, C.: Real-time automata. J. Autom. Lang. Comb. 6(1), 3–23 (2001). https://doi.org/10.25596/jalc-2001-003

    Article  MathSciNet  MATH  Google Scholar 

  8. Eisenbrand, F., Shmonin, G.: Carathéodory bounds for integer cones. Oper. Res. Lett. 34(5), 564–568 (2006). https://doi.org/10.1016/j.orl.2005.09.008

    Article  MathSciNet  MATH  Google Scholar 

  9. Fearnley, J., Jurdzinski, M.: Reachability in two-clock timed automata is PSPACE-complete. Inf. Comput. 243, 26–36 (2015). https://doi.org/10.1016/j.ic.2014.12.004

    Article  MathSciNet  MATH  Google Scholar 

  10. Bakhirkin, A., Ferrère, T., Nickovic, D., Maler, O., Asarin, E.: Online timed pattern matching using automata. In: Jansen, D.N., Prabhakar, Pavithra (eds.) FORMATS 2018. LNCS, vol. 11022, pp. 215–232. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-00151-3_13

    Chapter  MATH  Google Scholar 

  11. Haase, C., Zetzsche, G.: Presburger arithmetic with stars, rational subsets of graph groups, and nested zero tests. In: LICS, pp. 1–14 (2019). https://doi.org/10.1109/LICS.2019.8785850

  12. Hopcroft, J., Ullman, J.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley (1979)

    Google Scholar 

  13. Narayan, A., Cutulenco, G., Joshi, Y., Fischmeister, S.: Mining timed regular specifications from system traces. ACM Trans. Embed. Comput. Syst. 17(2),(2018). https://doi.org/10.1145/3147660

  14. Ničković, D., Lebeltel, O., Maler, O., Ferrère, T., Ulus, D.: AMT 2.0: qualitative and quantitative trace analysis with extended signal temporal logic. In: Beyer, D., Huisman, M. (eds.) TACAS 2018. LNCS, vol. 10806, pp. 303–319. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89963-3_18

    Chapter  Google Scholar 

  15. Ničković, D., Qin, X., Ferrère, T., Mateis, C., Deshmukh, J.: Shape expressions for specifying and extracting signal features. In: Finkbeiner, B., Mariani, L. (eds.) RV 2019. LNCS, vol. 11757, pp. 292–309. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-32079-9_17

    Chapter  Google Scholar 

  16. Petersen, H.: The membership problem for regular expressions with intersection is complete in LOGCFL. In: Alt, H., Ferreira, A. (eds.) STACS 2002. LNCS, vol. 2285, pp. 513–522. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45841-7_42

    Chapter  Google Scholar 

  17. Piskac, R., Kuncak, V.: Linear arithmetic with stars. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 268–280. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-70545-1_25

    Chapter  Google Scholar 

  18. Stockmeyer, L.J., Meyer, A.R.: Word problems requiring exponential time (preliminary report). In: STOC, pp. 1–9. ACM (1973). https://doi.org/10.1145/800125.804029

  19. Ulus, D.: Montre: a tool for monitoring timed regular expressions. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10426, pp. 329–335. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63387-9_16

    Chapter  Google Scholar 

  20. Ulus, D.: Pattern matching with time: theory and applications. Ph.D. thesis, Université Grenoble Alpes (2018). https://hal.archives-ouvertes.fr/tel-01901576

  21. Ulus, D., Ferrère, T., Asarin, E., Maler, O.: Timed pattern matching. In: Legay, A., Bozga, M. (eds.) FORMATS 2014. LNCS, vol. 8711, pp. 222–236. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10512-3_16

    Chapter  MATH  Google Scholar 

  22. Ulus, D., Ferrère, T., Asarin, E., Maler, O.: Online timed pattern matching using derivatives. In: Chechik, M., Raskin, J.-F. (eds.) TACAS 2016. LNCS, vol. 9636, pp. 736–751. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49674-9_47

    Chapter  Google Scholar 

  23. Waga, M., Akazaki, T., Hasuo, I.: A Boyer-Moore type algorithm for timed pattern matching. In: Fränzle, M., Markey, N. (eds.) FORMATS 2016. LNCS, vol. 9884, pp. 121–139. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-44878-7_8

    Chapter  MATH  Google Scholar 

  24. Waga, M., André, E.: Online parametric timed pattern matching with automata-based skipping. In: Badger, J.M., Rozier, K.Y. (eds.) NFM 2019. LNCS, vol. 11460, pp. 371–389. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-20652-9_26

    Chapter  Google Scholar 

  25. Waga, M., Hasuo, I., Suenaga, K.: Efficient online timed pattern matching by automata-based skipping. In: Abate, A., Geeraerts, G. (eds.) FORMATS 2017. LNCS, vol. 10419, pp. 224–243. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-65765-3_13

    Chapter  MATH  Google Scholar 

Download references

Acknowledgement

We would like to thank Thao Dang, Nicolas Basset, and Akshay Mambakam for motivating and technically relevant discussions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Eugene Asarin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Asarin, E., Ferrère, T., Ničković, D., Ulus, D. (2021). On the Complexity of Timed Pattern Matching. In: Dima, C., Shirmohammadi, M. (eds) Formal Modeling and Analysis of Timed Systems. FORMATS 2021. Lecture Notes in Computer Science(), vol 12860. Springer, Cham. https://doi.org/10.1007/978-3-030-85037-1_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-85037-1_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-85036-4

  • Online ISBN: 978-3-030-85037-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics