Data Structure Specifications via Local Equality Axioms

  • Scott McPeak
  • George C. Necula
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3576)


We describe a program verification methodology for specifying global shape properties of data structures by means of axioms involving predicates on scalar fields, pointer equalities, and pointer disequalities, in the neighborhood of a memory cell. We show that such local invariants are both natural and sufficient for describing a large class of data structures. We describe a complete decision procedure for axioms without disequalities, and practical heuristics for the full language. The procedure has the key advantage that it can be extended easily with reasoning for any decidable theory of scalar fields.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Cantone, D., Zarba, C.G.: A new fast decision procedure for an unquantified fragment of set theory. First-Order Theorem Proving, 97–105 (1998)Google Scholar
  2. 2.
    Detlefs, D., Nelson, G., Saxe, J.B.: Simplify: A theorem prover for program checking. Technical Report HPL-2003-148, HP Labs (July 2003)Google Scholar
  3. 3.
    Detlefs, D.L., Leino, K.R.M., Nelson, G., Saxe, J.B.: Extended static checking. Technical Report SRC-159, COMPAQ SRC, Palo Alto, USA (December 1998)Google Scholar
  4. 4.
    Fradet, P., Métayer, D.L.: Shape types. In: POPL, pp. 27–39 (1997)Google Scholar
  5. 5.
    Hackett, B., Rugina, R.: Region-based shape analysis with tracked locations. In: POPL, pp. 310–323 (2005)Google Scholar
  6. 6.
    Immerman, N., Rabinovich, A., Reps, T., Sagiv, M., Yorsh, G.: The boundary between decidability and undecidability for transitive-closure logics. In: Marcinkowski, J., Tarlecki, A. (eds.) CSL 2004. LNCS, vol. 3210, pp. 160–174. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Klarlund, N., Schwartzbach, M.: Graph types. In: POPL, pp. 196–205 (1993)Google Scholar
  8. 8.
    Knuth, D.E., Bendix, P.B.: Simple word problems in universal algebra. In: Leech, J. (ed.) Computational Problems in Abstract Algebras, pp. 263–297. Pergamon Press, Oxford (1970)Google Scholar
  9. 9.
    Kuncak, V., Lam, P., Rinard, M.: Role analysis. In: POPL, pp. 17–32 (2002)Google Scholar
  10. 10.
    Kuncak, V., Rinard, M.: Existential heap abstraction entailment is undecidable. In: SAS, pp. 418–438 (2003)Google Scholar
  11. 11.
    Leino, K.R.M., Müller, P.: Object invariants in dynamic contexts. In: European Conference on Object-Oriented Programming, ECOOP (2004)Google Scholar
  12. 12.
    Lev-Ami, T., Sagiv, S.: TVLA: A system for implementing static analyses. In: Palsberg, J. (ed.) SAS 2000. LNCS, vol. 1824, pp. 280–301. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  13. 13.
    Möller, A., Schwartzbach, M.: The pointer assertion logic engine. In: PLDI, pp. 221–231 (2001)Google Scholar
  14. 14.
    Nelson, G.: Techniques for program verification. Technical Report CSL-81-10, Xerox Palo Alto Research Center (1981)Google Scholar
  15. 15.
    Nelson, G.: Verifying reachability invariants of linked structures. In: POPL, pp. 38–47 (1983)Google Scholar
  16. 16.
    Nelson, G., Oppen, D.C.: Fast decision procedures based on congruence closure. JACM 27(2), 356–364 (1980)MATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Oppen, D.C.: Reasoning about recursively defined data structures. JACM 27(3), 403–411 (1980)MATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. Logic in Computer Science, pp. 55–74 (2002)Google Scholar
  19. 19.
    Sagiv, S., Reps, T.W., Wilhelm, R.: Parametric shape analysis via 3-valued logic. TOPLAS 24(3), 217–298 (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Scott McPeak
    • 1
  • George C. Necula
    • 1
  1. 1.University of CaliforniaBerkeley

Personalised recommendations