Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-642-25379-9_11guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

A decision procedure for regular expression equivalence in type theory

Published: 07 December 2011 Publication History

Abstract

We describe and formally verify a procedure to decide regular expressions equivalence: two regular expressions are equivalent if and only if they recognize the same language. Our approach to this problem is inspired by Brzozowski's algorithm using derivatives of regular expressions, with a new definition of finite sets. In this paper, we detail a complete formalization of Brzozowki's derivatives, a new definition of finite sets along with its basic meta-theory, and a decidable equivalence procedure correctly proved using Coq and Ssreflect.

References

[1]
Almeida, J.B., Moreira, N., Pereira, D., de Sousa, S.M.: Partial Derivative Automata Formalized in Coq. In: Domaratzki, M., Salomaa, K. (eds.) CIAA 2010. LNCS, vol. 6482, pp. 59-68. Springer, Heidelberg (2011).
[2]
Bezem, M., Nakata, K., Uustalu, T.: On streams that are finitely red (submitted, 2011).
[3]
Braibant, T., Pous, D.: A tactic for deciding Kleene algebras. In: First Coq Workshop (August 2009).
[4]
Braibant, T., Pous, D.: An Efficient Coq Tactic for Deciding Kleene Algebras. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 163-178. Springer, Heidelberg (2010).
[5]
Brzozowski, J.A.: Derivatives of regular expressions. JACM 11(4), 481-494 (1964).
[6]
Büchi, J.R.: Weak second order arithmetica and finite automata. Zeitscrift Fur Mathematische Logic und Grundlagen Der Mathematik 6, 66-92 (1960).
[7]
The Coq Development Team, http://coq.inria.fr
[8]
Coquand, T., Gonthier, G., Siles, V.: Source code of the formalization, http://www.cse.chalmers.se/~siles/coq/regexp.tar.bzip2.
[9]
Coquand, T., Spiwack, A.: Constructively finite? In: Laureano Lambán, L., Romero, A., Rubio, J. (eds.) Scientific Contributions in Honor of Mirian Andrés Gómez Servicio de Publicaciones, Universidad de La rioja, Spain (2010).
[10]
Johnstone, P.: Topos theory. Academic Press (1977).
[11]
Krauss, A., Nipkow, T.: Proof Pearl: Regular Expression Equivalence and Relation Algebra. Journal of Automated Reasoning (March 2011) (published online).
[12]
Martin-Löf, P.: An intuitionistic type theory: predicative part. In: Logic Colloquium 1973, pp. 73-118. North-Holland, Amsterdam (1973).
[13]
Mirkin, B.G.: An algorithm for constructing a base in a language of regular expressions. Engineering Cybernetics 5, 51-57 (1996).
[14]
Nordström, B.: Terminating general recursion BIT, vol. 28, pp. 605-619 (1988).
[15]
Owens, S., Reppy, J., Turon, A.: Regular-expression Derivatives Re-examined. Journal of Functional Programming 19(2), 173-190.
[16]
Richman, F., Stolzenberg, G.: Well-Quasi-Ordered sets. Advances in Mathematics 97, 145-153 (1993).
[17]
Russell, B., Whitehead, A.N.: Principia Mathematica. Cambridge University Press (1910).
[18]
Gonthier, G., Mahboubi, A.: An introduction to small scale reflection in Coq. Journal of Formalized Reasoning 3(2), 95-152 (2010).
[19]
Tarski, A.: Sur les ensembles finis. Fundamenta Mathematicae 6, 45-95 (1924).
[20]
Thiemann, R., Sternagel, C.: Certification of Termination Proofs Using CeTA. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 452-468. Springer, Heidelberg (2009).
[21]
Wu, C., Zhang, X., Urban, C.: A Formalisation of the Myhill-Nerode Theorem Based on Regular Expressions (Proof Pearl). In: van Eekelen, M., Geuvers, H., Schmaltz, J., Wiedijk, F. (eds.) ITP 2011. LNCS, vol. 6898, pp. 341-356. Springer, Heidelberg (2011).

Cited By

View all
  • (2025)Verified and Efficient Matching of Regular Expressions with LookaroundProceedings of the 14th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3703595.3705884(198-213)Online publication date: 10-Jan-2025
  • (2024)Efficient Matching of Regular Expressions with Lookaround AssertionsProceedings of the ACM on Programming Languages10.1145/36329348:POPL(2761-2791)Online publication date: 5-Jan-2024
  • (2022)Verbatim++: verified, optimized, and semantically rich lexing with derivativesProceedings of the 11th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3497775.3503694(27-39)Online publication date: 17-Jan-2022
  • Show More Cited By
  1. A decision procedure for regular expression equivalence in type theory

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image Guide Proceedings
      CPP'11: Proceedings of the First international conference on Certified Programs and Proofs
      December 2011
      400 pages
      ISBN:9783642253782
      • Editors:
      • Jean-Pierre Jouannaud,
      • Zhong Shao

      Sponsors

      • Tsinghua University: TsingHua University Philips Research
      • Academia Sinica: Academia Sinica
      • Advances in image and video technology: Advances in image and video technology
      • National Science Council: National Science Council (Taiwan)

      Publisher

      Springer-Verlag

      Berlin, Heidelberg

      Publication History

      Published: 07 December 2011

      Qualifiers

      • Article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)0
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 12 Jan 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2025)Verified and Efficient Matching of Regular Expressions with LookaroundProceedings of the 14th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3703595.3705884(198-213)Online publication date: 10-Jan-2025
      • (2024)Efficient Matching of Regular Expressions with Lookaround AssertionsProceedings of the ACM on Programming Languages10.1145/36329348:POPL(2761-2791)Online publication date: 5-Jan-2024
      • (2022)Verbatim++: verified, optimized, and semantically rich lexing with derivativesProceedings of the 11th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3497775.3503694(27-39)Online publication date: 17-Jan-2022
      • (2018)Regular Language Representations in the Constructive Type Theory of CoqJournal of Automated Reasoning10.1007/s10817-018-9460-x61:1-4(521-553)Online publication date: 1-Jun-2018
      • (2015)Model checking recursive programs interacting via the heapScience of Computer Programming10.1016/j.scico.2014.09.009100:C(61-83)Online publication date: 15-Mar-2015
      • (2013)Verified decision procedures for MSO on words based on derivatives of regular expressionsACM SIGPLAN Notices10.1145/2544174.250061248:9(3-12)Online publication date: 25-Sep-2013
      • (2013)Verified decision procedures for MSO on words based on derivatives of regular expressionsProceedings of the 18th ACM SIGPLAN international conference on Functional programming10.1145/2500365.2500612(3-12)Online publication date: 25-Sep-2013
      • (2013)Kleene algebra with tests and coq tools for while programsProceedings of the 4th international conference on Interactive Theorem Proving10.1007/978-3-642-39634-2_15(180-196)Online publication date: 22-Jul-2013
      • (2013)Certified Parsing of Regular LanguagesCertified Programs and Proofs10.1007/978-3-319-03545-1_7(98-113)Online publication date: 11-Dec-2013
      • (2013)A Constructive Theory of Regular Languages in CoqCertified Programs and Proofs10.1007/978-3-319-03545-1_6(82-97)Online publication date: 11-Dec-2013
      • Show More Cited By

      View Options

      View options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media