Skip to Main content Skip to Navigation
Preprints, Working Papers, ...

Formal proofs of two algorithms for strongly connected components in graphs

Ran Chen 1, 2 Jean-Jacques Levy 3 
2 TOCCATA - Formally Verified Programs, Certified Tools and Numerical Computations
LRI - Laboratoire de Recherche en Informatique, Inria Saclay - Ile de France
3 PI.R2 - Design, study and implementation of languages for proofs and programs
UPD7 - Université Paris Diderot - Paris 7, CNRS - Centre National de la Recherche Scientifique, IRIF (UMR_8243) - Institut de Recherche en Informatique Fondamentale, Inria de Paris
Abstract : We present formal proofs for the two classical Tarjan-1972 and Kosaraju-1978 algorithms for finding strongly connected components in directed graphs. We describe the two algorithms in a functional programming style with abstract values for vertices in graphs, with functions between vertices and their successors, and with data types such that lists (for representing immutable stacks) and sets. We use the Why3 system and the Why3-logic to express these proofs and fully check them by computer. The Why3-logic is a simple multi-sorted first-order logic augmented by inductively defined predicates. Furthermore it provides useful libraries for lists and sets. The Why3 system allows description of programs in a Why3-ML programming language (a first-order programming language with ML syntax) and provides interfaces to various state-of-the-art automatic provers and to manual interactive proof-checkers (we use mainly Coq). One important point of our article is that our proofs are intuitive and human readable.
Complete list of metadata

Cited literature [19 references]  Display  Hide  Download
Contributor : Jean-Jacques Levy Connect in order to contact the contributor
Submitted on : Saturday, December 24, 2016 - 10:07:39 AM
Last modification on : Wednesday, June 15, 2022 - 3:48:20 AM
Long-term archiving on: : Monday, March 20, 2017 - 8:37:37 PM


Files produced by the author(s)


  • HAL Id : hal-01422216, version 1


Ran Chen, Jean-Jacques Levy. Formal proofs of two algorithms for strongly connected components in graphs. 2016. ⟨hal-01422216⟩



Record views


Files downloads