A Framework for Verified Depth-First Algorithms

We present a framework in Isabelle/HOL for formalizing variants of depth-first search. This framework allows to easily prove non-trivial properties of these variants. Moreover, verified code in several programming languages including Haskell, Scala and Standard ML can be generated. In this paper, we present an abstract formalization of depth-first search and demonstrate how it is refined to an efficiently executable version. Further we use the emptiness-problem of Büchi-automata known from model checking as the motivation to present three Nested DFS algorithms. They are formalized, verified and transformed into executable code using our framework.

[1]  John Launchbury,et al.  Structuring depth-first search algorithms in Haskell , 1995, POPL '95.

[2]  Peter Lammich,et al.  Applying Data Refinement for Monadic Programs to Hopcroft's Algorithm , 2012, ITP.

[3]  Tobias Nipkow,et al.  Code Generation via Higher-Order Rewrite Systems , 2010, FLOPS.

[4]  Stephan Merz,et al.  Model Checking: A Tutorial Overview , 2000, MOVEP.

[5]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[6]  Florian Haftmann,et al.  Code generation from specifications in higher-order logic , 2009 .

[7]  Pierre Wolper,et al.  Memory-efficient algorithms for the verification of temporal properties , 1990, Formal Methods Syst. Des..

[8]  Mihalis Yannakakis,et al.  On nested depth first search , 1996, The Spin Verification System.

[9]  S. Sieber On a decision method in restricted second-order arithmetic , 1960 .

[10]  Xin-She Yang,et al.  Introduction to Algorithms , 2021, Nature-Inspired Optimization Algorithms.

[11]  Lawrence Charles Paulson,et al.  Isabelle/HOL: A Proof Assistant for Higher-Order Logic , 2002 .

[12]  Sandip Ray,et al.  Certifying Compositional Model Checking Algorithms in ACL2 , 2003, ACL 2003.

[13]  Jean-Michel Couvreur,et al.  On-the-Fly Verification of Linear Temporal Logic , 1999, World Congress on Formal Methods.

[14]  Peter Lammich,et al.  The Isabelle Collections Framework , 2010, ITP.

[15]  Doron A. Peled,et al.  Formal Verification of a Partial-Order Reduction Technique for Model Checking , 2004, Journal of Automated Reasoning.

[16]  Ronald L. Rivest,et al.  Introduction to Algorithms, third edition , 2009 .

[17]  Jaco Geldenhuys,et al.  Tarjan's Algorithm Makes On-the-Fly LTL Verification More Efficient , 2004, TACAS.

[18]  Stephan Merz,et al.  Construction of Büchi Automata for LTL Model Checking Verified in Isabelle/HOL , 2009, TPHOLs.

[19]  Javier Esparza,et al.  A Note on On-the-Fly Verification Algorithms , 2005, TACAS.

[20]  R. McNaughton Review: J. Richard Buchi, Weak Second-Order Arithmetic and Finite Automata; J. Richard Buchi, On a Decision Method in Restricted second Order Arithmetic , 1963, Journal of Symbolic Logic.

[21]  Pierre Wolper,et al.  Reasoning About Infinite Computations , 1994, Inf. Comput..

[22]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[23]  Peter Lammich,et al.  Collections Framework , 2009, Arch. Formal Proofs.

[24]  Moshe Y. Vardi Verification of Concurrent Programs: The Automata-Theoretic Framework , 1991, Ann. Pure Appl. Log..