Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Elements of Timed Pattern Matching

Published: 10 June 2024 Publication History
  • Get Citation Alerts
  • Abstract

    The rise of machine learning and cloud technologies has led to a remarkable influx of data within modern cyber-physical systems. However, extracting meaningful information from this data has become a significant challenge due to its volume and complexity. Timed pattern matching has emerged as a powerful specification-based runtime verification and temporal data analysis technique to address this challenge.
    In this paper, we provide a comprehensive tutorial on timed pattern matching that ranges from the underlying algebra and pattern specification languages to performance analyses and practical case studies. Analogous to textual pattern matching, timed pattern matching is the task of finding all time periods within temporal behaviors of cyber-physical systems that match a predefined pattern. Originally we introduced and solved several variants of the problem using the name of match sets, which has evolved into the concept of timed relations over the past decade. Here we first formalize and present the algebra of timed relations as a standalone mathematical tool to solve the pattern matching problem of timed pattern specifications. In particular, we show how to use the algebra of timed relations to solve the pattern matching problem for timed regular expressions and metric compass logic in a unified manner. We experimentally demonstrate that our timed pattern matching approach performs and scales well in practice. We further provide in-depth insights into the similarities and fundamental differences between monitoring and matching problems as well as regular expressions and temporal logic formulas. Finally, we illustrate the practical application of timed pattern matching through two case studies, which show how to extract structured information from temporal datasets obtained via simulations or real-world observations. These results and examples show that timed pattern matching is a rigorous and efficient technique in developing and analyzing cyber-physical systems.

    References

    [1]
    Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. 1986. Compilers: Principles, Techniques, and Tools. Addison-Wesley. https://www.worldcat.org/oclc/12285707
    [2]
    James F. Allen. 1983. Maintaining knowledge about temporal intervals. Commun. ACM 26, 11 (1983), 832–843. DOI:
    [3]
    Étienne André, Ichiro Hasuo, and Masaki Waga. 2018. Offline timed pattern matching under uncertainty. In Proceedings of the International Conference on Engineering of Complex Computer Systems, ICECCS. IEEE Computer Society, 10–20. DOI:
    [4]
    Eugene Asarin, Paul Caspi, and Oded Maler. 1997. A Kleene theorem for timed automata. In Proceedings of the Symposium on Logic in Computer Science (LICS). IEEE, 160–171. DOI:
    [5]
    Eugene Asarin, Paul Caspi, and Oded Maler. 2002. Timed regular expressions. J. ACM 49, 2 (2002), 172–206. DOI:
    [6]
    Eugene Asarin, Thomas Ferrère, Dejan Nickovic, and Dogan Ulus. 2021. On the complexity of timed pattern matching. In Proceedings of the Conference on Formal Modeling and Analysis of Timed Systems (FORMATS) (LNCS), Vol. 12860. Springer, 1–17. DOI:
    [7]
    Eugene Asarin, Oded Maler, Dejan Nickovic, and Dogan Ulus. 2017. Combining the temporal and epistemic dimensions for MTL monitoring. In Proceedings of the Conference on Formal Modeling and Analysis of Timed Systems (FORMATS) (LNCS), Vol. 10419. Springer, 207–223. DOI:
    [8]
    Alexey Bakhirkin, Thomas Ferrère, Oded Maler, and Dogan Ulus. 2017. On the quantitative semantics of regular expressions over real-valued signals. In Proceedings of the Conference on Formal Modeling and Analysis of Timed Systems (FORMATS) (LNCS), Vol. 10419. Springer, 189–206. DOI:
    [9]
    Alexey Bakhirkin, Thomas Ferrère, Dejan Nickovic, Oded Maler, and Eugene Asarin. 2018. Online timed pattern matching using automata. In Proceedings of the Conference on Formal Modeling and Analysis of Timed Systems (FORMATS) (LNCS), Vol. 11022. Springer, 215–232. DOI:
    [10]
    Howard Barringer, Michael Fisher, Dov Gabbay, Graham Gough, and Richard Owens. 1990. METATEM: A framework for programming in temporal logic. In Stepwise Refinement of Distributed Systems Models, Formalisms, Correctness: REX Workshop, Mook, The Netherlands May 29–June 2, 1989 Proceedings. Springer, 94–129.
    [11]
    Ezio Bartocci and Yliès Falcone (Eds.). 2018. Lectures on Runtime Verification — Introductory and Advanced Topics. Lecture Notes in Computer Science, Vol. 10457. Springer. DOI:
    [12]
    Ezio Bartocci, Yliès Falcone, Adrian Francalanza, and Giles Reger. 2018. Introduction to runtime verification. In Lectures on Runtime Verification - Introductory and Advanced Topics. 1–33. DOI:
    [13]
    Andreas Bauer, Martin Leucker, and Christian Schallhart. 2006. Monitoring of real-time properties. In FSTTCS 2006: Foundations of Software Technology and Theoretical Computer Science, 26th International Conference, Kolkata, India, December 13-15, 2006, Proceedings. 260–272. DOI:
    [14]
    B. Berthomieu and M. Diaz. 1991. Modeling and verification of time dependent systems using time Petri nets. IEEE Transactions on Software Engineering 17, 3 (1991), 259–273. DOI:
    [15]
    Archie Blake. 1938. Canonical Expressions in Boolean Algebra. Ph.D. Dissertation. University of Chicago.
    [16]
    Stephan Börzsönyi, Donald Kossmann, and Konrad Stocker. 2001. The Skyline operator. In Proceedings of the International Conference on Data Engineering (ICDE). IEEE Computer Society, 421–430. DOI:
    [17]
    Davide Bresolin, Dario Della Monica, Valentin Goranko, Angelo Montanari, and Guido Sciavicco. 2010. Metric propositional neighborhood logics: Expressiveness, decidability, and undecidability. In Proceedings of the European Conference on Artificial Intelligence (ECAI) (Frontiers in Artificial Intelligence and Applications), Vol. 215. IOS Press, 695–700. DOI:
    [18]
    Eduard Cerny, Surrendra Dudani, John Havlicek, and Dmitry Korchemny. 2014. SVA: The Power of Assertions in SystemVerilog. Springer.
    [19]
    Angel X. Chang and Christopher D. Manning. 2012. SUTime: A library for recognizing and normalizing time expressions. In Proceedings of the Conference on Language Resources and Evaluation (LREC). European Language Resources Association (ELRA), 3735–3740. http://www.lrec-conf.org/proceedings/lrec2012/summaries/284.html
    [20]
    Zhou Chaochen, Charles Anthony Richard Hoare, and Anders P. Ravn. 1991. A calculus of durations. Inform. Process. Lett. 40, 5 (1991), 269–276.
    [21]
    Sarah E. Chodrow, Farnam Jahanian, and Marc Donner. 1991. Run-time monitoring of real-time systems. In Proceedings of the Real-Time Systems Symposium - 1991, San Antonio, Texas, USA, December 1991. 74–83. DOI:
    [22]
    Dario Della Monica, Valentin Goranko, Angelo Montanari, and Guido Sciavicco. 2011. Expressiveness of the interval logics of Allen’s relations on the class of all linear orders: complete classification. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI). AAAI, 845–850. https://www.aaai.org/ocs/index.php/IJCAI/IJCAI11/paper/viewPaper/3273
    [23]
    Dario Della Monica, Valentin Goranko, Angelo Montanari, and Guido Sciavicco. 2013. Interval temporal logics: A journey. Bulletin of the EATCS 3, 105 (2013). http://smtp.eatcs.org/index.php/beatcs/article/download/94/90
    [24]
    L. Peter Deutsch and Butler W. Lampson. 1967. An online editor. Commun. ACM 10, 12 (1967), 793–799. DOI:
    [25]
    David L. Dill. 1989. Timing assumptions and verification of finite-state concurrent systems. In Proceedings of the Conference on Computer Aided Verification (CAV) (LNCS), Vol. 407. Springer, 197–212. DOI:
    [26]
    Matthew B. Dwyer, George S. Avrunin, and James C. Corbett. 1999. Patterns in property specifications for finite-state verification. In Proceedings of the Conference on Software Engineering. 411–420.
    [27]
    Cindy Eisner and Dana Fisman. 2007. A Practical Introduction to PSL. Springer.
    [28]
    Thomas Ferrère, Oded Maler, Dejan Nickovic, and Dogan Ulus. 2015. Measuring with timed patterns. In Proceedings of the Conference on Computer Aided Verification (CAV) (LNCS), Vol. 9207. Springer, 322–337. DOI:
    [29]
    Frantisek Franek, Christopher G. Jennings, and William F. Smyth. 2007. A simple fast hybrid pattern-matching algorithm. J. Discrete Algorithms 5, 4 (2007), 682–695. DOI:
    [30]
    Dov Gabbay, Amir Pnueli, Saharon Shelah, and Jonathan Stavi. 1980. On the temporal analysis of fairness. In Proceedings of the Symposium on Principles of Programming Languages (POPL). ACM, 163–173. DOI:
    [31]
    Dimitra Giannakopoulou and Klaus Havelund. 2001. Automata-based verification of temporal properties on running programs. In 16th IEEE International Conference on Automated Software Engineering (ASE 2001), 26-29 November 2001, Coronado Island, San Diego, CA, USA. 412–416. DOI:
    [32]
    Joseph Y. Halpern and Yoav Shoham. 1991. A propositional modal logic of time intervals. J. ACM 38, 4 (1991), 935–962. DOI:
    [33]
    Klaus Havelund and Grigore Rosu. 2002. Synthesizing monitors for safety properties. In Tools and Algorithms for the Construction and Analysis of Systems, 8th International Conference, TACAS 2002, held as part of the Joint European Conference on Theory and Practice of Software, ETAPS 2002, Grenoble, France, April 8-12, 2002, Proceedings. 342–356. DOI:
    [34]
    John Havlicek and Scott Little. 2011. Realtime regular expressions for analog and mixed-signal assertions. In Proceedings of the Conference on Formal Methods in Computer-Aided Design (FMCAD). 155–162.
    [35]
    Edwin H. Jacox and Hanan Samet. 2007. Spatial join techniques. ACM Transactions on Database Systems 32, 1 (2007), 7. DOI:
    [36]
    Claude Jard and Thierry Jéron. 1989. On-line model checking for finite linear temporal logic specifications. In Automatic Verification Methods for Finite State Systems, International Workshop, Grenoble, France, June 12-14, 1989, Proceedings. 189–196. DOI:
    [37]
    Ron Koymans. 1990. Specifying real-time properties with metric temporal logic. Real-Time Systems 2, 4 (1990), 255–299. DOI:
    [38]
    H. T. Kung, Fabrizio Luccio, and Franco P. Preparata. 1975. On finding the maxima of a set of vectors. Journal of the ACM 22, 4 (1975), 469–476. DOI:
    [39]
    Oded Maler and Dejan Nickovic. 2004. Monitoring temporal properties of continuous signals. In Proceedings of the Conference on Formal Techniques, Modeling and Analysis of Timed and Fault-Tolerant Systems (FORMATS/FTRTFT). LNCS, Vol. 3253. Springer, 152–166. DOI:
    [40]
    Akshay Mambakam, Eugene Asarin, Nicolas Basset, and Thao Dang. 2023. Pattern matching and parameter identification for parametric timed regular expressions. In Proceedings of the 26th ACM International Conference on Hybrid Systems: Computation and Control, HSCC 2023, San Antonio, TX, USA, May 9-12, 2023. 14:1–14:13. DOI:
    [41]
    Sudipa Mandal and Pallab Dasgupta. 2021. Migrating assertions from dense to discrete time. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 41, 7 (2021), 2362–2371.
    [42]
    Ben Moszkowski. 1984. Executing temporal logic programs. In Proceedings of the Conference on Concurrency Theory (CONCUR). 111–130.
    [43]
    David Nadeau and Satoshi Sekine. 2007. A survey of named entity recognition and classification. Lingvisticae Investigationes 30, 1 (2007), 3–26.
    [44]
    Apurva Narayan, Greta Cutulenco, Yogi Joshi, and Sebastian Fischmeister. 2018. Mining timed regular specifications from system traces. ACM Trans. Embed. Comput. Syst. 17, 2 (2018), 46:1–46:21. DOI:
    [45]
    Apurva Narayan and Sebastian Fischmeister. 2019. Mining time for timed regular specifications. In 2019 IEEE International Conference on Systems, Man and Cybernetics, SMC. IEEE, 63–69. DOI:
    [46]
    Dejan Nickovic. 2008. Checking Timed and Hybrid Properties: Theory and Applications. Ph.D. Dissertation. Université Joseph Fourier. https://tel.archives-ouvertes.fr/tel-00411957
    [47]
    Jürg Nievergelt and Franco P. Preparata. 1982. Plane-sweep algorithms for intersecting geometric figures. Commun. ACM 25, 10 (1982), 739–747. DOI:
    [48]
    Paritosh K. Pandya. 2001. Specifying and deciding quantified discrete-time duration calculus formulae using DCVALID. Real-Time Tools, RTTOOLS (2001).
    [49]
    Jean-Eric Pin. 1997. Syntactic semigroups. In Handbook of Formal Languages. Springer, 679–746.
    [50]
    Eduardo Romera, Luis M. Bergasa, and Roberto Arroyo. 2016. Need data for driver behaviour analysis? Presenting the public UAH-DriveSet. In Proceedings of Intelligent Transportation Systems Conference (ITSC). IEEE, 387–392. DOI:
    [51]
    Sayandeep Sanyal, Antonio Anastasio Bruto da Costa, and Pallab Dasgupta. 2020. Recurrence in dense-time AMS assertions. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 40, 11 (2020), 2416–2420.
    [52]
    A. Schrijver. 1998. Theory of Linear and Integer Programming. Wiley.
    [53]
    Ken Thompson. 1968. Regular expression search algorithm. Commun. ACM 11, 6 (1968), 419–422. DOI:
    [54]
    Grace Tsai, M. Insall, and Bruce M. McMillin. 1995. Ensuring the satisfaction of a temporal specification at run-time. In 1st IEEE International Conference on Engineering of Complex Computer Systems (ICECCS’95), November 6-10, 1995, Fort Lauderdale, Florida, USA. 397–404. DOI:
    [55]
    Dogan Ulus. 2017. Montre: A tool for monitoring timed regular expressions. In Proceedings of the Conference on Computer Aided Verification (CAV) (LNCS), Vol. 10426. Springer, 329–335. DOI:
    [56]
    Dogan Ulus. 2019. Online monitoring of metric temporal logic using sequential networks. arXiv preprint arXiv:1901.00175 (2019).
    [57]
    Dogan Ulus. 2019. Timescales: A benchmark generator for MTL monitoring tools. In Proceedings of the Conference on Runtime Verification (RV). Springer, 402–412.
    [58]
    Dogan Ulus, Thomas Ferrère, Eugene Asarin, and Oded Maler. 2014. Timed pattern matching. In Proceedings of the Conference on Formal Modeling and Analysis of Timed Systems (FORMATS) (LNCS), Vol. 8711. Springer, 222–236. DOI:
    [59]
    Dogan Ulus, Thomas Ferrère, Eugene Asarin, and Oded Maler. 2016. Online timed pattern matching using derivatives. In Proceedings of the Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS) (LNCS), Vol. 9636. Springer, 736–751. DOI:
    [60]
    Dogan Ulus and Oded Maler. 2018. Specifying timed patterns using temporal logic. In Proceedings of the Conference on Hybrid Systems: Computation and Control (HSCC). ACM, 167–176. DOI:
    [61]
    Johan van Benthem. 1991. The Logic of Time. A Model-Theoretic Investigation into the Varieties of Temporal Ontology and Temporal Discourse. Springer.
    [62]
    Yde Venema. 1990. Expressiveness and completeness of an interval tense logic. Notre Dame Journal of Formal Logic 31, 4 (1990), 529–547. DOI:
    [63]
    Masaki Waga. 2019. Online quantitative timed pattern matching with semiring-valued weighted automata. In Formal Modeling and Analysis of Timed Systems (LNCS), Étienne André and Mariëlle Stoelinga (Eds.), Vol. 11750. Springer, 3–22. DOI:
    [64]
    Masaki Waga, Takumi Akazaki, and Ichiro Hasuo. 2016. A Boyer-Moore type algorithm for timed pattern matching. In Proceedings of the Conference on Formal Modeling and Analysis of Timed Systems (FORMATS) (LNCS), Vol. 9884. Springer, 121–139. DOI:
    [65]
    Masaki Waga, Ichiro Hasuo, and Kohei Suenaga. 2017. Efficient online timed pattern matching by automata-based skipping. In Proceedings of the Conference on Formal Modeling and Analysis of Timed Systems (FORMATS) (LNCS), Vol. 10419. Springer, 224–243. DOI:
    [66]
    Masaki Waga, Ichiro Hasuo, and Kohei Suenaga. 2018. MONAA: A tool for timed pattern matching with automata-based acceleration. In Proceedings of the Workshop on Monitoring and Testing of Cyber-Physical Systems (MT-CPS). IEEE, 14–15. DOI:
    [67]
    Bruce W. Watson and Richard E. Watson. 2003. A Boyer-Moore-style algorithm for regular expression pattern matching. Sci. Comput. Program. 48, 2-3 (2003), 99–117. DOI:

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Embedded Computing Systems
    ACM Transactions on Embedded Computing Systems  Volume 23, Issue 4
    July 2024
    333 pages
    ISSN:1539-9087
    EISSN:1558-3465
    DOI:10.1145/3613607
    • Editor:
    • Tulika Mitra
    Issue’s Table of Contents

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Journal Family

    Publication History

    Published: 10 June 2024
    Online AM: 10 February 2024
    Accepted: 15 January 2024
    Revised: 10 August 2023
    Received: 22 June 2022
    Published in TECS Volume 23, Issue 4

    Check for updates

    Author Tags

    1. Regular expressions
    2. pattern matching
    3. temporal logic

    Qualifiers

    • Research-article

    Funding Sources

    • Boğaziçi Research Fund
    • Agence Nationale de Recherche
    • Japan Science and Technology Agency

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 243
      Total Downloads
    • Downloads (Last 12 months)243
    • Downloads (Last 6 weeks)23
    Reflects downloads up to 26 Jul 2024

    Other Metrics

    Citations

    View Options

    Get Access

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Full Text

    View this article in Full Text.

    Full Text

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media