Proving pointer programs in higher-order logic

Building on the work of Burstall, this paper develops sound modelling and reasoning methods for imperative programs with pointers: heaps are modelled as mappings from addresses to values, and pointer structures are mapped to higher-level data types for verification. The programming language is embedded in higher-order logic. Its Hoare logic is derived. The whole development is purely definitional and thus sound. Apart from some smaller examples, the viability of this approach is demonstrated with a non-trivial case study. We show the correctness of the Schorr-Waite graph marking algorithm and present part of its readable proof in Isabelle/HOL.

[1]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

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

[3]  Donald Michie,et al.  Machine Intelligence 7 , 1975 .

[4]  Robert Veroff,et al.  Automated Reasoning and Its Applications: Essays in Honor of Larry Wos , 1997 .

[5]  Richard Bornat,et al.  Proving Pointer Programs in Hoare Logic , 2000, MPC.

[6]  William M. Waite,et al.  An efficient machine-independent procedure for garbage collection in various list structures , 1967, CACM.

[7]  Jean-Raymond Abrial Event Based Sequential Program Development: Application to Constructing a Pointer Program , 2003, FME.

[8]  Richard Bornat,et al.  Animating Formal Proof at the Surface: The Jape Proof Calculator , 1999, Comput. J..

[9]  Nils Klarlund,et al.  Automatic verification of pointer programs using monadic second-order logic , 1997, PLDI '97.

[10]  Tobias Nipkow,et al.  Structured Proofs in Isar/HOL , 2002, TYPES.

[11]  David May Millenial Perspectives in Computer Science , 2000 .

[12]  Lawrence C. Paulson,et al.  Generic Automatic Proof Tools , 1997, ArXiv.

[13]  Lawrence C. Paulson,et al.  A Generic Tableau Prover and its Integration with Isabelle , 1999, J. Univers. Comput. Sci..

[14]  Markus Wenzel,et al.  Isabelle, Isar - a versatile environment for human readable formal proof documents , 2002 .

[15]  Michael J. C. Gordon,et al.  Mechanizing programming logics in higher order logic , 1989 .

[16]  Dominique Cansell,et al.  Click'n Prove: Interactive Proofs within Set Theory , 2003, TPHOLs.

[17]  Tobias Nipkow,et al.  Winskel is (almost) Right: Towards a Mechanized Semantics Textbook , 1996, Formal Aspects of Computing.

[18]  Tatiana Tambouratzis Counter-clustering for Training Pattern Selection , 2000, Comput. J..

[19]  Hongseok Yang,et al.  Local reasoning for stateful programs , 2001 .

[20]  Norihisa Suzuki Automatic Verification of Programs with Complex Data Structures , 1976, Outstanding Dissertations in the Computer Sciences.