Testing Extended Regular Language Membership Incrementally by Rewriting

In this paper we present lower bounds and rewriting algorithms for testing membership of a word in a regular language described by an extended regular expression. Motivated by intuitions from monitoring and testing, where the words to be tested (execution traces) are typically much longer than the size of the regular expressions (patterns or requirements), and by the fact that in many applications the traces are only available incrementally, on an event by event basis, our algorithms are based on an event-consumption idea: a just arrived event is "consumed" by the regular expression, i.e., the regular expression modifies itself into another expression discarding the event. We present an exponential space lower bound for monitoring extended regular expressions and argue that the presented rewriting-based algorithms, besides their simplicity and elegance, are practical and almost as good as one can hope. We experimented with and evaluated our algorithms in Maude.

[1]  Eugene W. Myers,et al.  A Four Russians algorithm for regular expression pattern matching , 1992, JACM.

[2]  Grigore Rosu,et al.  Electronic Notes in Theoretical Computer Science: Preface , 2001 .

[3]  Debra J. Richardson,et al.  Specification-based test oracles for reactive systems , 1992, International Conference on Software Engineering.

[4]  Valentin M. Antimirov Partial Derivatives of Regular Expressions and Finite Automaton Constructions , 1996, Theor. Comput. Sci..

[5]  Orna Kupferman,et al.  Model Checking of Safety Properties , 1999, CAV.

[6]  Eugene W. Myers,et al.  Super-pattern matching , 1995, Algorithmica.

[7]  Orna Kupferman,et al.  An Improved Algorithm for the Membership Problem for Extended Regular Expressions , 2002, MFCS.

[8]  Narciso Martí-Oliet,et al.  Maude: specification and programming in rewriting logic , 2002, Theor. Comput. Sci..

[9]  Mahesh Viswanathan,et al.  Runtime Assurance Based On Formal Specifications , 1999, PDPTA.

[10]  Gérard P. Huet,et al.  Confluent Reductions: Abstract Properties and Applications to Term Rewriting Systems , 1980, J. ACM.

[11]  Grigore Rosu,et al.  Monitoring Java Programs with Java PathExplorer , 2001, RV@CAV.

[12]  Hiroaki Yamamoto An Automata-Based Recognition Algorithm for Semi-extended Regular Expressions , 2000, MFCS.

[13]  Grigore Rosu,et al.  Synthesizing Monitors for Safety Properties , 2002, TACAS.

[14]  Gerard Huet,et al.  Conflunt reductions: Abstract properties and applications to term rewriting systems , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[15]  SymposiumT. Owen O'MalleyDept Eecient Speciication-based Oracles for Critical Systems , 1996 .

[16]  Grigore Rosu,et al.  Monitoring programs using rewriting , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[17]  Peter D. Mosses,et al.  Rewriting Extended Regular Expressions , 1993, International Conference on Developments in Language Theory.

[18]  Orna Kupferman,et al.  Freedom, weakness, and determinism: from linear-time to branching-time , 1998, Proceedings. Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.98CB36226).

[19]  Doron Drusinsky,et al.  The Temporal Rover and the ATG Rover , 2000, SPIN.

[20]  Dimitra Giannakopoulou,et al.  Automata-based verification of temporal properties on running programs , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).