Certification of Breadth-First Algorithms by Extraction

Abstract : By using pointers, breadth-first algorithms are very easy to implement efficiently in imperative languages. Implementing them with the same bounds on execution time in purely functional style can be challenging, as explained in Okasaki’s paper at ICFP 2000 that even restricts the problem to binary trees but considers numbering instead of just traversal. Okasaki’s solution is modular and factors out the problem of implementing queues (FIFOs) with worst-case constant time operations. We certify those FIFO-based breadth-first algorithms on binary trees by extracting them from fully specified Coq terms, given an axiomatic description of FIFOs. In addition, we axiomatically characterize the strict and total order on branches that captures the nature of breadth-first traversal and propose alternative characterizations of breadth-first traversal of forests. We also propose efficient certified implementations of FIFOs by extraction, either with pairs of lists (with amortized constant time operations) or triples of lazy lists (with worst-case constant time operations), thus getting from extraction certified breadth-first algorithms with the optimal bounds on execution time.
Complete list of metadatas

Cited literature [21 references]  Display  Hide  Download

https://hal.archives-ouvertes.fr/hal-02333423
Contributor : Dominique Larchey-Wendling <>
Submitted on : Monday, November 18, 2019 - 4:32:44 PM
Last modification on : Tuesday, November 19, 2019 - 8:13:10 AM

File

 Restricted access
To satisfy the distribution rights of the publisher, the document is embargoed until : 2020-04-11

Please log in to resquest access to the document

Identifiers

Citation

Dominique Larchey-Wendling, Ralph Matthes. Certification of Breadth-First Algorithms by Extraction. Mathematics of Program Construction. MPC 2019. Lecture Notes in Computer Science, 11825, pp.45-75, 2019, ⟨10.1007/978-3-030-33636-3_3⟩. ⟨hal-02333423⟩

Share

Metrics

Record views

40