Proving Pointer Programs in Hoare Logic

It is possible, but difficult, to reason in Hoare logic about programs which address and modify data structures defined by pointers. The challenge is to approach the simplicity of Hoare logic’s treatment of variable assignment, where substitution affects only relevant assertion formula. The axiom of assignment to object components treats each component name as a pointer-indexed array. This permits a formal treatment of inductively defined data structures in the heap but tends to produce instances of modified component mappings in arguments to inductively defined assertions. The major weapons against these troublesome mappings are assertions which describe spatial separation of data structures. Three example proofs are sketched.

[1]  J. C. Byington,et al.  Mobile agents and security , 1998, IEEE Commun. Mag..

[2]  David Gries The Schorr-Waite Graph Marking Algorithm , 1978, Program Construction.

[3]  Niklaus Wirth,et al.  Pascal User Manual and Report , 1991, Springer New York.

[4]  John C. Reynolds,et al.  The craft of programming , 1981, Prentice Hall International series in computer science.

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

[6]  C. A. R. Hoare,et al.  An Axiomatic Definition of the Programming Language PASCAL , 1973, Acta Informatica.

[7]  David Gries,et al.  Assignment and Procedure Call Proof Rules , 1980, TOPL.

[8]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[9]  Joseph M. Morris A General Axiom of Assignment , 1982 .

[10]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[11]  Peter W. O'Hearn,et al.  Reasoning about Shared Mutable Data Structure , 2001 .

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

[13]  Robert W. Floyd,et al.  Assigning meaning to programs , 1967 .

[14]  George C. Necula,et al.  Safe, Untrusted Agents Using Proof-Carrying Code , 1998, Mobile Agents and Security.

[15]  J. Van Leeuwen,et al.  Handbook of theoretical computer science - Part A: Algorithms and complexity; Part B: Formal models and semantics , 1990 .

[16]  Jan van Leeuwen,et al.  Formal models and semantics , 1990 .

[17]  K. R Leino,et al.  Towards Reliable Modular Programs , 1995 .

[18]  Andrew W. Appel,et al.  A semantic model of types and machine instructions for proof-carrying code , 2000, POPL '00.

[19]  David C. Luckham,et al.  Verification of Array, Record, and Pointer Operations in Pascal , 1979, TOPL.

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

[21]  Tomasz Kowaltowski Data Structures and Correctness of Programs , 1979, JACM.

[22]  C. A. R. Hoare,et al.  A Trace Model for Pointers and Objects , 1999, ECOOP.

[23]  Brian W. Kernighan,et al.  The C Programming Language , 1978 .

[24]  T. Kowaltowski Examples of Informal but Rigorous Correctness Proofs for Tree Traversing Algorithms Examples of Informal but Rigorous Correctness Proofs for Tree Traversing Algorithms , 1992 .

[25]  Joyce Farrell Java Programming , 1999 .

[26]  Joseph M. Morris A Proof of the Schorr-Waite Algorithm , 1982 .

[27]  Rachid Guerraoui,et al.  ECOOP’ 99 — Object-Oriented Programming , 1999, Lecture Notes in Computer Science.

[28]  A. Bijlsma Calculating with Pointers , 1989, Sci. Comput. Program..

[29]  John McCarthy,et al.  Correctness of a compiler for arithmetic expressions , 1966 .

[30]  Patrick Coust,et al.  Methods and logics for proving programs , 1991 .