Skip to main content
Erschienen in: Journal of Automated Reasoning 1-4/2018

10.03.2018

Regular Language Representations in the Constructive Type Theory of Coq

verfasst von: Christian Doczkal, Gert Smolka

Erschienen in: Journal of Automated Reasoning | Ausgabe 1-4/2018

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

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 between all representations, show decidability results, and provide operations for various closure properties. Our results include a constructive decidability proof for the logic WS1S, a constructive refinement of the Myhill-Nerode characterization of regularity, and translations from two-way automata to one-way automata with verified upper bounds for the increase in size. All results are verified with an accompanying Coq development of about 3000 lines.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Anhänge
Nur mit Berechtigung zugänglich
Fußnoten
1
Here, abstract means that no witness can be extracted from the existence proof. The function \(\mathsf {xchoose}_X\) computes a witness by enumerating elements of X. The proof argument is only used to guarantee termination.
 
2
The language \(L := \{\,a^nb^m\,\big |\,\text {The} n-\text {th Turing machine holds within m steps on input} \varepsilon \,\}\) is decidable, but the image of L under the homomorphism mapping a to a and b to \(\varepsilon \) is undecidable.
 
3
In [24], \({\hat{\delta }}\,\) is defined recursively starting from the right end of the word. In Coq, structural recursion is more natural and the impact on the proofs appears to be minimal.
 
4
Wu et al. [42] derive the closure of regular expressions under complement by proving the Myhill–Nerode theorem using regular expressions. The proof is significantly more complex than the automata constructions.
 
5
That the transitive closure of a decidable relation is decidable is established in the Ssreflect libraries using depth-first search.
 
Literatur
2.
Zurück zum Zitat Berghofer, S., Reiter, M.: Formalizing the logic-automaton connection. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) Theorem Proving in Higher Order Logics (TPHOLs 2009). LNCS, vol. 5674, pp. 147–163. Springer (2009) Berghofer, S., Reiter, M.: Formalizing the logic-automaton connection. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) Theorem Proving in Higher Order Logics (TPHOLs 2009). LNCS, vol. 5674, pp. 147–163. Springer (2009)
3.
Zurück zum Zitat Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.): Interactive Theorem Proving—4th International Conference, ITP 2013, Rennes, France, July 22–26, 2013. Proceedings, LNCS, vol. 7998. Springer (2013) Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.): Interactive Theorem Proving—4th International Conference, ITP 2013, Rennes, France, July 22–26, 2013. Proceedings, LNCS, vol. 7998. Springer (2013)
4.
Zurück zum Zitat Braibant, T., Pous, D.: Deciding kleene algebras in Coq. Log. Methods. Comput. Sci. 8(1:16), 1–42 (2012)MathSciNetMATH Braibant, T., Pous, D.: Deciding kleene algebras in Coq. Log. Methods. Comput. Sci. 8(1:16), 1–42 (2012)MathSciNetMATH
6.
Zurück zum Zitat Büchi, J.R.: Weak second-order arithmetic and finite automata. Zeitschr. f. math. Logic und Grundladen d. Math. 6, 66–92 (1960)MathSciNetCrossRefMATH Büchi, J.R.: Weak second-order arithmetic and finite automata. Zeitschr. f. math. Logic und Grundladen d. Math. 6, 66–92 (1960)MathSciNetCrossRefMATH
7.
Zurück zum Zitat Cohen, C.: Pragmatic quotient types in Coq. In: Blazy et al. [3], pp. 213–228 Cohen, C.: Pragmatic quotient types in Coq. In: Blazy et al. [3], pp. 213–228
8.
Zurück zum Zitat Constable, R.L., Jackson, P.B., Naumov, P., Uribe, J.C.: Constructively formalizing automata theory. In: Plotkin, G.D., Stirling, C., Tofte, M. (eds.) Proof, Language, and Interaction, pp. 213–238. The MIT Press, Cambridge (2000) Constable, R.L., Jackson, P.B., Naumov, P., Uribe, J.C.: Constructively formalizing automata theory. In: Plotkin, G.D., Stirling, C., Tofte, M. (eds.) Proof, Language, and Interaction, pp. 213–238. The MIT Press, Cambridge (2000)
9.
Zurück zum Zitat Coquand, T., Siles, V.: A decision procedure for regular expression equivalence in type theory. In: Jouannaud, J.P., Shao, Z. (eds.) Certified Programs and Proofs (CPP 2011). LNCS, vol. 7086, pp. 119–134. Springer (2011) Coquand, T., Siles, V.: A decision procedure for regular expression equivalence in type theory. In: Jouannaud, J.P., Shao, Z. (eds.) Certified Programs and Proofs (CPP 2011). LNCS, vol. 7086, pp. 119–134. Springer (2011)
11.
Zurück zum Zitat Doczkal, C., Kaiser, J., Smolka, G.: A constructive theory of regular languages in Coq. In: Gonthier, G., Norrish, M. (eds.) Certified Programs and Proofs (CPP 2013). LNCS, vol. 8307, pp. 82–97. Springer (2013) Doczkal, C., Kaiser, J., Smolka, G.: A constructive theory of regular languages in Coq. In: Gonthier, G., Norrish, M. (eds.) Certified Programs and Proofs (CPP 2013). LNCS, vol. 8307, pp. 82–97. Springer (2013)
12.
Zurück zum Zitat Doczkal, C., Smolka, G.: Two-way automata in Coq. In: Blanchette, J.C., Merz, S. (eds.) Interactive Theorem Proving (ITP 2016). LNCS, vol. 9807, pp. 151–166. Springer (2016) Doczkal, C., Smolka, G.: Two-way automata in Coq. In: Blanchette, J.C., Merz, S. (eds.) Interactive Theorem Proving (ITP 2016). LNCS, vol. 9807, pp. 151–166. Springer (2016)
13.
14.
Zurück zum Zitat Filliâtre, J.C.: Finite automata theory in Coq: A constructive proof of kleene’s theorem. Tech. Rep. 97-04, LIP - ENS Lyon (1997) Filliâtre, J.C.: Finite automata theory in Coq: A constructive proof of kleene’s theorem. Tech. Rep. 97-04, LIP - ENS Lyon (1997)
15.
Zurück zum Zitat Gelade, W., Neven, F.: Succinctness of the complement and intersection of regular expressions. ACM Trans. Comput. Logic 13(1), 4:1–4:19 (2012)MathSciNetCrossRefMATH Gelade, W., Neven, F.: Succinctness of the complement and intersection of regular expressions. ACM Trans. Comput. Logic 13(1), 4:1–4:19 (2012)MathSciNetCrossRefMATH
16.
Zurück zum Zitat Gonthier, G., Mahboubi, A., Rideau, L., Tassi, E., Théry, L.: A modular formalisation of finite group theory. In: Schneider, K., Brandt, J. (eds.) Theorem Proving in Higher Order Logics (TPHOLs 2007). LNCS, vol. 4732, pp. 86–101. Springer (2007) Gonthier, G., Mahboubi, A., Rideau, L., Tassi, E., Théry, L.: A modular formalisation of finite group theory. In: Schneider, K., Brandt, J. (eds.) Theorem Proving in Higher Order Logics (TPHOLs 2007). LNCS, vol. 4732, pp. 86–101. Springer (2007)
17.
Zurück zum Zitat Grädel, E., Thomas, W., Wilke, T. (eds.): Automata, logics, and infinite games: a guide to current research [outcome of a Dagstuhl seminar, February 2001], LNCS, vol. 2500. Springer (2002) Grädel, E., Thomas, W., Wilke, T. (eds.): Automata, logics, and infinite games: a guide to current research [outcome of a Dagstuhl seminar, February 2001], LNCS, vol. 2500. Springer (2002)
19.
Zurück zum Zitat Hofmann, M., Lange, M.: Automatentheorie und Logik. eXamen.press, Springer, Berlin (2011)CrossRefMATH Hofmann, M., Lange, M.: Automatentheorie und Logik. eXamen.press, Springer, Berlin (2011)CrossRefMATH
20.
Zurück zum Zitat Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation - international edition (2. ed). Addison-Wesley, Boston (2001)MATH Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation - international edition (2. ed). Addison-Wesley, Boston (2001)MATH
21.
Zurück zum Zitat Johnsonbaugh, R., Miller, D.P.: Converses of pumping lemmas. In: Austing, R.H., Cassel, L.N., Miller, J.E., Joyce, D.T. (eds.) Proceedings of the 21st SIGCSE Technical Symposium on Computer Science Education, 1990, Washington, DC, USA, 1990. pp. 27–30. ACM (1990) Johnsonbaugh, R., Miller, D.P.: Converses of pumping lemmas. In: Austing, R.H., Cassel, L.N., Miller, J.E., Joyce, D.T. (eds.) Proceedings of the 21st SIGCSE Technical Symposium on Computer Science Education, 1990, Washington, DC, USA, 1990. pp. 27–30. ACM (1990)
22.
Zurück zum Zitat Khoussainov, B., Nerode, A.: Automata Theory and its Applications. Springer, Berlin (2012)MATH Khoussainov, B., Nerode, A.: Automata Theory and its Applications. Springer, Berlin (2012)MATH
23.
Zurück zum Zitat Kleene, S.C.: Representation of events in nerve nets and finite automata. In: Shannon, C.E., McCarthy, J. (eds.) Automata Studies, pp. 3–42. Princeton University Press, Princeton (1956) Kleene, S.C.: Representation of events in nerve nets and finite automata. In: Shannon, C.E., McCarthy, J. (eds.) Automata Studies, pp. 3–42. Princeton University Press, Princeton (1956)
24.
Zurück zum Zitat Kozen, D.: Automata and computability. Undergraduate texts in computer science. Springer, Berlin (1997) Kozen, D.: Automata and computability. Undergraduate texts in computer science. Springer, Berlin (1997)
25.
Zurück zum Zitat Krauss, A., Nipkow, T.: Proof pearl: Regular expression equivalence and relation algebra. J. Autom. Reason. 49(1), 95–106 (2012)MathSciNetCrossRefMATH Krauss, A., Nipkow, T.: Proof pearl: Regular expression equivalence and relation algebra. J. Autom. Reason. 49(1), 95–106 (2012)MathSciNetCrossRefMATH
26.
Zurück zum Zitat Moreira, N., Pereira, D., de Sousa, S.M.: Deciding kleene algebra terms equivalence in Coq. J. Log. Algebr. Methods Program. 84(3), 377–401 (2015)MathSciNetCrossRefMATH Moreira, N., Pereira, D., de Sousa, S.M.: Deciding kleene algebra terms equivalence in Coq. J. Log. Algebr. Methods Program. 84(3), 377–401 (2015)MathSciNetCrossRefMATH
27.
Zurück zum Zitat Nipkow, T.: Verified lexical analysis. In: Grundy, J., Newey, M.C. (eds.) Theorem Proving in Higher Order Logics (TPHOLs ’98). LNCS, vol. 1479, pp. 1–15. Springer (1998) Nipkow, T.: Verified lexical analysis. In: Grundy, J., Newey, M.C. (eds.) Theorem Proving in Higher Order Logics (TPHOLs ’98). LNCS, vol. 1479, pp. 1–15. Springer (1998)
28.
Zurück zum Zitat Paulson, L.C.: A formalisation of finite automata using hereditarily finite sets. In: Felty, A.P., Middeldorp, A. (eds.) Automated deduction (CADE-25). LNCS, vol. 9195, pp. 231–245. Springer (2015) Paulson, L.C.: A formalisation of finite automata using hereditarily finite sets. In: Felty, A.P., Middeldorp, A. (eds.) Automated deduction (CADE-25). LNCS, vol. 9195, pp. 231–245. Springer (2015)
29.
Zurück zum Zitat Pighizzini, G.: Two-way finite automata: old and recent results. Fundam. Inform. 126(2–3), 225–246 (2013)MathSciNetMATH Pighizzini, G.: Two-way finite automata: old and recent results. Fundam. Inform. 126(2–3), 225–246 (2013)MathSciNetMATH
30.
Zurück zum Zitat Pous, D.: Kleene algebra with tests and coq tools for while programs. In: Blazy et al. [3], pp. 180–196 Pous, D.: Kleene algebra with tests and coq tools for while programs. In: Blazy et al. [3], pp. 180–196
32.
Zurück zum Zitat Reinhardt, K.: The complexity of translating logic to finite automata. In: Grädel et al. [17], pp. 231–238 Reinhardt, K.: The complexity of translating logic to finite automata. In: Grädel et al. [17], pp. 231–238
33.
Zurück zum Zitat Rosenberg, A.L.: State. In: Goldreich, O., Rosenberg, A.L., Selman, A.L. (eds.) Theoretical computer science, essays in memory of Shimon even. LNCS, vol. 3895, pp. 375–398. Springer (2006) Rosenberg, A.L.: State. In: Goldreich, O., Rosenberg, A.L., Selman, A.L. (eds.) Theoretical computer science, essays in memory of Shimon even. LNCS, vol. 3895, pp. 375–398. Springer (2006)
37.
Zurück zum Zitat Trakhtenbrot, B.A.: Finite automata and the logic of monadic predicates. Dokl. Akad. Nauk SSSR 140, 326–329 (1961) Trakhtenbrot, B.A.: Finite automata and the logic of monadic predicates. Dokl. Akad. Nauk SSSR 140, 326–329 (1961)
38.
Zurück zum Zitat Traytel, D., Nipkow, T.: Verified decision procedures for MSO on words based on derivatives of regular expressions. J. Funct. Program. 25, 1–30 (2015)MathSciNetCrossRefMATH Traytel, D., Nipkow, T.: Verified decision procedures for MSO on words based on derivatives of regular expressions. J. Funct. Program. 25, 1–30 (2015)MathSciNetCrossRefMATH
39.
41.
Zurück zum Zitat Wu, C., Zhang, X., Urban, C.: A formalisation of the Myhill-Nerode theorem based on regular expressions (proof pearl). In: van Eekelen, M.C.J.D., Geuvers, H., Schmaltz, J., Wiedijk, F. (eds.) Interactive Theorem Proving (ITP 2011). LNCS, vol. 6898, pp. 341–356. Springer (2011) Wu, C., Zhang, X., Urban, C.: A formalisation of the Myhill-Nerode theorem based on regular expressions (proof pearl). In: van Eekelen, M.C.J.D., Geuvers, H., Schmaltz, J., Wiedijk, F. (eds.) Interactive Theorem Proving (ITP 2011). LNCS, vol. 6898, pp. 341–356. Springer (2011)
42.
Zurück zum Zitat Wu, C., Zhang, X., Urban, C.: A formalisation of the Myhill-Nerode theorem based on regular expressions. J. Autom. Reason. 52(4), 451–480 (2014)MathSciNetCrossRefMATH Wu, C., Zhang, X., Urban, C.: A formalisation of the Myhill-Nerode theorem based on regular expressions. J. Autom. Reason. 52(4), 451–480 (2014)MathSciNetCrossRefMATH
Metadaten
Titel
Regular Language Representations in the Constructive Type Theory of Coq
verfasst von
Christian Doczkal
Gert Smolka
Publikationsdatum
10.03.2018
Verlag
Springer Netherlands
Erschienen in
Journal of Automated Reasoning / Ausgabe 1-4/2018
Print ISSN: 0168-7433
Elektronische ISSN: 1573-0670
DOI
https://doi.org/10.1007/s10817-018-9460-x

Weitere Artikel der Ausgabe 1-4/2018

Journal of Automated Reasoning 1-4/2018 Zur Ausgabe