A Complete Mechanization of Correctness of a String-Preprocessing Algorithm

We report on mechanization of a correctness proof of a string-preprocessing algorithm. This preprocessing algorithm is employed in Boyer-Moore’s pattern matching algorithm. The mechanization is carried out using the PVS system. The correctness proof being mechanized has been formulated in Linear Time Temporal Logic. It consists of fourteen lemmata which are related to safety properties and two additional lemmata dealing with liveness properties. The entire mechanization of the safety and liveness parts has been completed. Several small errors and omissions were found in the handwritten proof and corrected. Yet, the manual correctness proof of the string-preprocessing algorithm was found to satisfy the usual mathematical validity. We conclude that the string-preprocessing algorithm in Boyer-Moore’s pattern matching algorithm, corrected a number of times because of flaws, does not contain any more undiscovered errors.

[1]  Zohar Manna,et al.  The Temporal Logic of Reactive and Concurrent Systems , 1991, Springer New York.

[2]  M. Gordon,et al.  Introduction to HOL: a theorem proving environment for higher order logic , 1993 .

[3]  Robert S. Boyer,et al.  A fast string searching algorithm , 1977, CACM.

[4]  Alfred V. Aho,et al.  Algorithms for Finding Patterns in Strings , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[5]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..

[6]  Milos Besta,et al.  Mechanization of a proof of string-preprocessing in Boyer-Moore's pattern matching algorithm , 2002, Eighth IEEE International Conference on Engineering of Complex Computer Systems, 2002. Proceedings..

[7]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[8]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[9]  Robert S. Boyer,et al.  Automated Correctness Proofs of Machine Code Programs for a Commercial Microprocessor , 1992, CADE.

[10]  K. Mani Chandy,et al.  Parallel program design - a foundation , 1988 .

[11]  Frank A. Stomp Correctness of substring-preprocessing in Boyer-Moore's pattern matching algorithm , 2003, Theor. Comput. Sci..

[12]  Amy P. Felty,et al.  Protocol Verification in Nuprl , 1998, CAV.

[13]  J. Van Leeuwen,et al.  Handbook of theoretical computer science - Part A: Algorithms and complexity; Part B: Formal models and semantics , 1990 .

[14]  Allen Van Gelder,et al.  Computer Algorithms: Introduction to Design and Analysis , 1978 .

[15]  Wojciech Rytter A Correct Preprocessing Algorithm for Boyer-Moore String-Searching , 1980, SIAM J. Comput..

[16]  Mandayam K. Srivas,et al.  Applying formal verification to the AAMP5 microprocessor: A case study in the industrial use of formal methods , 1996, Formal Methods Syst. Des..

[17]  K. Mani Chandy Parallel program design , 1989 .

[18]  Dan Gusfield,et al.  Algorithms on Strings, Trees, and Sequences - Computer Science and Computational Biology , 1997 .

[19]  Robert S. Boyer,et al.  A Verification Condition Generator for FORTRAN. , 1980 .

[20]  Gerard Zwaan,et al.  A Taxonomy of Sublinear Multiple Keyword Pattern Matching Algorithms , 1996, Sci. Comput. Program..