ABSTRACT
We study a derivative method allowing to prove termination of computations on regular expressions. A Coq formalisation of a canonical non-deterministic finite automaton construction on a regular expression is presented. The correctness of the functional definitions is formally verified in Coq using the libraries and the small-scale reflection tools of Ssreflect. We propose to extend the proofs further, and this is a work in progress, to study termination of containment and equivalence in terms of partial derivatives. This serves as a major motivation and intended application of the presented approach. A method that we develop in the paper, called shadowing, allows for a smooth program extraction from decision procedures whatever the complexity of the dependently typed proofs.
- J. B. Almeida, N. Moreira, D. Pereira, and S. M. de Sousa. Partial derivative automata formalized in Coq. In Implementation and Application of Automata 2010, volume 6482/2011 of Lecture Notes in Computer Science, pages 59--68, 2011. Google ScholarDigital Library
- V. M. Antimirov. Partial derivatives of regular expressions and finite automaton constructions. Theor. Comput. Sci., 155 (2): 291--319, 1996. Google ScholarDigital Library
- Y. Bertot, G. Gonthier, S. Ould Biha, and I. Pasca. Canonical big operators. In phProceedings of the 21st International Conference on Theorem Proving in Higher Order Logics (TPHOLs'08), LNCS, pages 86--101. Springer-Verlag, 2008. Google ScholarDigital Library
- T. Braibant and D. Pous. An efficient coq tactic for deciding kleene algebras. In M. Kaufmann and L. Paulson, editors, phInteractive Theorem Proving, volume 6172 of phLecture Notes in Computer Science, pages 163--178. Springer Berlin / Heidelberg, 2010. ISBN 978--3--642--14051--8. Google ScholarDigital Library
- J. A. Brzozowski. Derivatives of regular expressions. J. ACM, 11 (4): 481--494, 1964. 10.1145/321239.321249. Google ScholarDigital Library
- J.-M. Champarnaud and D. Ziadi. From Mirkin's prebases to Antimirov's word partial derivatives. Fundam. Inf., 45: 195--205, January 2001. ISSN 0169--2968. Google ScholarDigital Library
- N. A. Danielsson. Total parser combinators. In Proceedings of the 15th ACM SIGPLAN international conference on Functional programming, ICFP'10, pages 285--296, New York, NY, USA, 2010. ACM. ISBN 978--1--60558--794--3. 10.1145/1863543.1863585. URL http://doi.acm.org/10.1145/1863543.1863585. Google ScholarDigital Library
- F. Garillot, G. Gonthier, A. Mahboubi, and L. Rideau. Packaging mathematical structures. In Theorem Proving in Higher Order Logics (2009), volume 5674 of phLNCS, 2009. Google ScholarDigital Library
- G. Gonthier. Expressions regulieres, May 2010. E-mail correspondence.Google Scholar
- G. Gonthier, A. Mahboubi, and E. Tassi. A Small Scale Reflection Extension for the Coq system. Research Report RR-6455, INRIA, 2011. URL http://hal.inria.fr/inria-00258384/en/.Google Scholar
- F. Henglein and L. Nielsen. Declarative coinductive axiomatization of regular expression containment and its computational interpretation (preliminary version). Technical Report 612, Department of Computer Science, University of Copenhagen (DIKU), February 2010.Google Scholar
- F. Henglein and L. Nielsen. Regular expression containment: Coinductive axiomatization and computational interpretation. In Proc. 38th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL). ACM, January 2011. Google ScholarDigital Library
- V. Komendantsky. Formal proofs of the prebase theorem of Mirkin, 2011. Coq script available at http://www.cs.st-andrews.ac.uk/\ vk/doc/prebase.v.Google Scholar
- V. Komendantsky. Regular expression containment as a proof search problem. In S. Lengrand, editor, Proceedings of the International Workshop on Proof-Search in Axiomatic Theories and Type Theories (PSATTT'11), Wrocław, Poland, 30 July 2011.Google Scholar
- A. Krauss and T. Nipkow. Proof pearl: Regular expression equivalence and relation algebra. Journal of Automated Reasoning, March 2011. Google ScholarDigital Library
- B. G. Mirkin. New algorithm for construction of base in the language of regular expressions. Tekhnicheskaya Kibernetika, 5: 113--119, 1966. English translation in Engineering Cybernetics, No. 5, Sept.--Oct. 1966, pp. 110--116.Google Scholar
- J. J. M. M. Rutten. Automata and coinduction (an exercise in coalgebra). In D. Sangiorigi and R. de Simone, editors, CONCUR'98, volume 1466 of LNCS, pages 194--218. Springer, 1998. Google ScholarDigital Library
- M. Sulzmann and K. Z. M. Lu. Regular expression matching using partial derivatives, 2010. Draft.Google Scholar
- The Coq development team. The Coq proof assistant reference manual. http://coq.inria.fr/refman/.Google Scholar
Index Terms
- Reflexive toolbox for regular expression matching: verification of functional programs in Coq+Ssreflect
Recommendations
Completeness and decidability of converse PDL in the constructive type theory of Coq
CPP 2018: Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and ProofsThe completeness proofs for Propositional Dynamic Logic (PDL) in the literature are non-constructive and usually presented in an informal manner. We obtain a formal and constructive completeness proof for Converse PDL by recasting a completeness proof ...
Regular Language Representations in the Constructive Type Theory of Coq
We explore the theory of regular language representations in the constructive type theory of Coq. We cover various forms of automata (deterministic, nondeterministic, one-way, two-way), regular expressions, and the logic WS1S. We give translations ...
Completeness and Decidability Results for CTL in Constructive Type Theory
We prove completeness and decidability results for the temporal logic CTL in Coq/Ssreflect. Our main result is a constructive proof that for every formula one can obtain either a finite model satisfying the formula or a proof in a Hilbert system ...
Comments