Skip to main content

2018 | OriginalPaper | Buchkapitel

Proof Pearl: Constructive Extraction of Cycle Finding Algorithms

verfasst von : Dominique Larchey-Wendling

Erschienen in: Interactive Theorem Proving

Verlag: Springer International Publishing

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

search-config
loading …

Abstract

We present a short implementation of the well-known Tortoise and Hare cycle finding algorithm in the constructive setting of Coq. This algorithm is interesting from a constructive perspective because it is both very simple and potentially non-terminating (depending on the input). To overcome potential non-termination, we encode the given termination argument (there exists a cycle) into a bar inductive predicate that we use as termination certificate. From this development, we extract the standard OCaml implementation of this algorithm. We generalize the method to the full Floyd’s algorithm that computes the entry point and the period of the cycle in the iterated sequence, and to the more efficient Brent’s algorithm for computing the period only, again with accurate extractions of their respective standard OCaml implementations.

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 "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!

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!

Fußnoten
1
OCaml equality decider is partially correct, e.g. it throws exceptions on functions.
 
2
Conventional bar induction often requires Brouwer’s thesis which precisely postulates that bar predicates are inductive.
 
3
Descending induction is implemented by https://static-content.springer.com/image/chp%3A10.1007%2F978-3-319-94821-8_22/470383_1_En_22_IEq142_HTML.gif in file utils.v .
 
4
For \(=_X\), this is precisely the assumption of the \(\mathrel {=^?_X}\) equality decider.
 
5
See  th_rel.v where an arbitrary decidable relation https://static-content.springer.com/image/chp%3A10.1007%2F978-3-319-94821-8_22/470383_1_En_22_IEq163_HTML.gif replaces \(=_X\).
 
6
Least for the natural order \(\mathrel {\leqslant }\) over https://static-content.springer.com/image/chp%3A10.1007%2F978-3-319-94821-8_22/470383_1_En_22_IEq254_HTML.gif .
 
Literatur
8.
Zurück zum Zitat Coen, C.S., Valentini, S.: General Recursion and Formal Topology. In: PAR-2010, Partiality and Recursion in Interactive Theorem Provers. EPiC Series in Computing, vol. 5, pp. 72–83. EasyChair (2012). https://doi.org/10.29007/hl75 Coen, C.S., Valentini, S.: General Recursion and Formal Topology. In: PAR-2010, Partiality and Recursion in Interactive Theorem Provers. EPiC Series in Computing, vol. 5, pp. 72–83. EasyChair (2012). https://​doi.​org/​10.​29007/​hl75
14.
Zurück zum Zitat Joux, A.: Algorithmic Cryptanalysis. Cryptography and Network Security. Chapman & Hall/CRC (2009) Joux, A.: Algorithmic Cryptanalysis. Cryptography and Network Security. Chapman & Hall/CRC (2009)
15.
Zurück zum Zitat Knuth, D.E.: The Art of Computer Programming, Volume 2: Seminumerical Algorithms. Addison-Wesley Longman Publishing Co., Inc., Boston (1997) Knuth, D.E.: The Art of Computer Programming, Volume 2: Seminumerical Algorithms. Addison-Wesley Longman Publishing Co., Inc., Boston (1997)
Metadaten
Titel
Proof Pearl: Constructive Extraction of Cycle Finding Algorithms
verfasst von
Dominique Larchey-Wendling
Copyright-Jahr
2018
DOI
https://doi.org/10.1007/978-3-319-94821-8_22

Premium Partner