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.
Similar content being viewed by others
References
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)
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)
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)
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)
Brzozowski, J.: Derivatives of regular expressions. J. ACM 11, 481–494 (1964)
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)
Kozen, D.: A completeness theorem for Kleene algebras and the algebra of regular events. Inf. Comput. 110, 366–390 (1994)
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)
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)
Owens, S., Reppy, J., Turon, A.: Regular-expression derivatives re-examined. J. Funct. Program. 19, 173–190 (2009)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Rights 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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10817-011-9223-4