Variables as Resource in Hoare Logics

Hoare logic is bedevilled by complex but coarse side conditions on the use of variables. We define a logic, free of side conditions, which permits more precise statements of a program's use of variables. We show that it admits translations of proofs in Hoare logic, thereby showing that nothing is lost, and also that it admits proofs of some programs outside the scope of Hoare logic. We include a treatment of reference parameters and global variables in procedure call (though not of parameter aliasing). Our work draws on ideas from separation logic: program variables are treated as resource rather than as logical variables in disguise. For clarity we exclude a treatment of the heap

[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]  Robert Cartwright,et al.  Unrestricted procedure calls in Hoare's logic , 1978, POPL '78.

[3]  Cristiano Calcagno,et al.  Modular Automatic Assertion Checking with Separation Logic , 2005 .

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

[5]  Peter W. O'Hearn,et al.  Resources, concurrency, and local reasoning , 2007 .

[6]  Hongseok Yang,et al.  Variables as Resource in Separation Logic , 2005, MFPS.

[7]  Peter W. O'Hearn,et al.  Local Reasoning about Programs that Alter Data Structures , 2001, CSL.

[8]  Charles Antony Richard Hoare Towards a theory of parallel programming , 2002 .

[9]  Peter W. O'Hearn,et al.  Permission accounting in separation logic , 2005, POPL '05.

[10]  Stephen D. Brookes,et al.  Variables as Resource for Shared-Memory Programs: Semantics and Soundness , 2006, MFPS.

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

[12]  Christopher Strachey,et al.  Fundamental Concepts in Programming Languages , 2000, High. Order Symb. Comput..

[13]  Susan Owicki,et al.  An axiomatic proof technique for parallel programs I , 1976, Acta Informatica.

[14]  Stephen Brookes A semantics for concurrent separation logic , 2007, Theor. Comput. Sci..

[15]  Peter W. O'Hearn,et al.  Smallfoot: Modular Automatic Assertion Checking with Separation Logic , 2005, FMCO.

[16]  Gregory R. Andrews,et al.  Concurrent programming - principles and practice , 1991 .

[17]  Stephen D. Brookes,et al.  A Semantics for Concurrent Separation Logic , 2004, CONCUR.

[18]  John C. Reynolds,et al.  Intuitionistic reasoning about shared mutable data structure , 1999 .

[19]  David Lorge Parnas,et al.  Concurrent control with “readers” and “writers” , 1971, CACM.

[20]  Peter W. O'Hearn,et al.  Resources, Concurrency and Local Reasoning , 2004, CONCUR.

[21]  Rasmus Ejlers Møgelberg,et al.  Proceedings of the 22nd Annual IEEE Symposium on Logic in Computer Science , 2007 .