We use cookies to improve your experience with our site.
Zhao-Peng Li, Yu Zhang, Yi-Yun Chen. A Shape Graph Logic and A Shape System[J]. Journal of Computer Science and Technology, 2013, 28(6): 1063-1084. DOI: 10.1007/s11390-013-1398-1
Citation: Zhao-Peng Li, Yu Zhang, Yi-Yun Chen. A Shape Graph Logic and A Shape System[J]. Journal of Computer Science and Technology, 2013, 28(6): 1063-1084. DOI: 10.1007/s11390-013-1398-1

A Shape Graph Logic and A Shape System

  • Analysis and verification of pointer programs are still difficult problems so far. This paper uses a shape graph logic and a shape system to solve these problems in two stages. First, shape graphs at every program point are constructed using an analysis tool. Then, they are used to support the verification of other properties (e.g., orderedness). Our prototype supports automatic verification of programs manipulating complex data structures such as splay trees, treaps, AVL trees and AA trees, etc. The proposed shape graph logic, as an extension to Hoare logic, uses shape graphs directly as assertions. It can be used in the analysis and verification of programs manipulating mutable data structures. The benefit using shape graphs as assertions is that it is convenient for acquiring the relations between pointers in the verification stage. The proposed shape system requires programmers to provide lightweight shape declarations in recursive structure type declarations. It can help rule out programs that construct shapes deviating from what programmers expect (reflected in shape declarations) in the analysis stage. As a benefit, programmers need not provide specifications (e.g., pre-/post-conditions, loop invariants) about pointers. Moreover, we present a method doing verification in the second stage using traditional Hoare logic rules directly by eliminating aliasing with the aid of shape graphs. Thus, verification conditions could be discharged by general theorem provers.
  • loading

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return