A specification-based approach to reasoning about pointers

This paper explains how a uniform, specification-based approach to reasoning about component-based programs can be used to reason about programs that manipulate pointers. No special axioms, language semantics, global heap model, or proof rules for pointers are necessary. We show how this is possible by capturing pointers and operations that manipulate them in the specification of a software component. The proposed approach is mechanizable as long as programmers are able to understand mathematical specifications and write assertions, such as loop invariants. While some of the previous efforts in reasoning do not require such mathematical sophistication on the part of programmers, they are limited in the kinds of properties they can prove about programs that use pointers. We illustrate the idea using a "Splice" operation for linked lists, which has been used previously to explain other analysis techniques. Not only can the proposed approach be used to establish shape properties given lightweight specifications, but also it can be used to establish total correctness given more complete specifications.

[1]  Stephen H. Edwards,et al.  Model variables: cleanly supporting abstraction in design by contract , 2005, Softw. Pract. Exp..

[2]  Radu Rugina,et al.  Region-based shape analysis with tracked locations , 2005, POPL '05.

[3]  Gary T. Leavens,et al.  How the design of JML accommodates both runtime assertion checking and formal verification , 2003, Sci. Comput. Program..

[4]  Murali Sitaraman,et al.  Impact of performance considerations on formal specification design , 1996, Formal Aspects of Computing.

[5]  K. Rustan M. Leino,et al.  The Spec# Programming System: An Overview , 2004, CASSIS.

[6]  Murali Sitaraman,et al.  DEET for Component-Based Software , 2004 .

[7]  Daniel Jackson,et al.  Checking Properties of Heap-Manipulating Procedures with a Constraint Solver , 2003, TACAS.

[8]  Gregory Kulczycki,et al.  Component Technology for Pointers: Why and How , 2003 .

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

[10]  Michael I. Schwartzbach,et al.  The pointer assertion logic engine , 2000, PLDI '01.

[11]  Bruce W. Weide,et al.  Specification and Verification with References , 2001 .

[12]  Murali Sitaraman,et al.  Modular Verification of Performance Correctness , 2001 .

[13]  Gregory Kulczycki,et al.  Reasoning about Software-Component Behavior , 2000, ICSR.

[14]  Reinhard Wilhelm,et al.  Shape Analysis , 2000, CC.

[15]  Arnd Poetzsch-Heffter,et al.  Modular specification and verification techniques for object-oriented software components , 2000 .

[16]  Bruce W. Weide,et al.  Checkmate: cornering C++ dynamic memory errors with checked pointers , 2000, SIGCSE '00.

[17]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 1999, POPL '99.

[18]  K. Rustan M. Leino,et al.  Data groups: specifying the modification of extended state , 1998, OOPSLA '98.

[19]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[20]  Jan Vitek,et al.  Flexible Alias Protection , 1998, ECOOP.

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

[22]  Martín Abadi,et al.  A Logic of Object-Oriented Programs , 1997, Verification: Theory and Practice.

[23]  Wayne D. Heym Computer program verification: improvements for human reasoning , 1996 .

[24]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[25]  Bruce Weide,et al.  Component-based software using RESOLVE , 1994, SOEN.

[26]  John Mylopoulos,et al.  '. . . and nothing else changes': the frame problem in procedure specifications , 1993, Proceedings of 1993 15th International Conference on Software Engineering.

[27]  Richard C. Holt,et al.  The Geneva convention on the treatment of object aliasing , 1992, OOPS.

[28]  Jeannette M. Wing A specifier's introduction to formal methods , 1990, Computer.

[29]  Joan Krone,et al.  The role of verification in software reusability , 1988 .