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]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 2002, TOPL.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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