Skip to main content
Log in

Proof Pearl: Regular Expression Equivalence and Relation Algebra

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

We describe and verify an elegant equivalence checker for regular expressions. It works by constructing a bisimulation relation between (derivatives of) regular expressions. By mapping regular expressions to binary relations, an automatic and complete proof method for (in)equalities of binary relations over union, composition and (reflexive) transitive closure is obtained. The verification is carried out in the theorem prover Isabelle/HOL, yielding a practically useful decision procedure.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Berghofer, S., Nipkow, T.: Executing higher order logic. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R. (eds.) Types for Proofs and Programs (TYPES 2000). Lect. Notes in Comp. Sci., vol. 2277, pp. 24–40. Springer (2000)

  2. Bonsangue, M.M., Caltais, G., Goriac, E., Lucanu, D., J.Rutten, J.M.M., Silva, A.: A decision procedure for bisimilarity of generalized regular expressions. In: Brazilian Symposium on Formal Methods (SBMF 2010). Lect. Notes in Comp. Sci. Springer (2010)

  3. Boyer, R.S., Moore, J S.: Metafunctions: proving them correct and using them efficiently as new proof procedures. In Boyer, R., Moore, J S. (eds.) The Correctness Problem in Computer Science, pp. 103–184. Academic Press (1981)

  4. Braibant, T., Pous, D.: An efficient Coq tactic for deciding Kleene algebras. In: Kaufmann, M., Paulson, L. (eds.) Interactive Theorem Proving (ITP 2010). Lect. Notes in Comp. Sci., vol. 6172, pp. 163–178. Springer (2010)

  5. Brzozowski, J.: Derivatives of regular expressions. J. ACM 11, 481–494 (1964)

    Article  MathSciNet  MATH  Google Scholar 

  6. Haftmann, F., Nipkow, T.: Code generation via higher-order rewrite systems. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) Functional and Logic Programming (FLOPS 2010). Lect. Notes in Comp. Sci., vol. 6009, pp. 103–117. Springer (2010)

  7. Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular events. Inf. Comput. 110, 366–390 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  8. Kozen, D.: On the coalgebraic theory of Kleene algebra with tests. Technical Report, Computing and Information Science, Cornell University. http://hdl.handle.net/1813/10173 (2008)

  9. Krauss, A., Nipkow, T.: Regular sets and expressions. In: Klein, G., Nipkow, T., Paulson, L.C. (eds.) The Archive of Formal Proofs. Formal proof development. http://afp.sf.net/entries/Regular-Sets.shtml (2010)

  10. Owens, S., Reppy, J., Turon, A.: Regular-expression derivatives re-examined. J. Funct. Program. 19, 173–190 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  11. Rutten, J.J.M.M.: Automata and coinduction (an exercise in coalgebra). In: Sangiorgi, D., de Simone, R. (eds.) Concurrency Theory (CONCUR’98). Lect. Notes in Comp. Sci., vol. 1466, pp. 194–218. Springer (1998)

  12. Thiemann, R., Sternagel, C.: Certification of termination proofs using CeTA. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) Theorem Proving in Higher Order Logics (TPHOLs 2009). Lect. Notes in Comp. Sci., vol. 5674, pp. 452–468. Springer (2009)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alexander Krauss.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Krauss, A., Nipkow, T. Proof Pearl: Regular Expression Equivalence and Relation Algebra. J Autom Reasoning 49, 95–106 (2012). https://doi.org/10.1007/s10817-011-9223-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10817-011-9223-4

Keywords

Navigation