Compositional Reasoning for Pointer Structures

  • Yifeng Chen
  • J. W. Sanders
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4014)


This paper studies the compositional definition and behaviour of properties that arise in pointer structures. A pointer structure is represented as a (pointer) graph. A pointer property is a set of pointer structures. A parameterised binary combinator is defined that enables important properties (like acyclicity, canonicity and reachability) to be defined in a compositional manner. The technique of parameterising a combinator derives from the definition of parallel-by-merge in ‘Unifying Theories of Programming’. It is applied here to the study of disjointness combinators that extend the separating conjunction of Separation Logic. A case study is provided to demonstrate how these ideas are used, in the form of rules of Hoare logic, to verify the correctness of an Object-Oriented program.


Canonical Model Pointer Structure Canonical Representation Galois Connection Unique Decomposition 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bornat, R.: Proving pointer programs in Hoare logic. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 102–126. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  2. 2.
    Cardelli, L., Gardner, P., Ghelli, G.: A spatial logic for querying graphs. In: Widmayer, P., Triguero, F., Morales, R., Hennessy, M., Eidenbenz, S., Conejo, R. (eds.) ICALP 2002. LNCS, vol. 2380, pp. 597–610. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  3. 3.
    Chen, Y.: Generic composition. Formal Aspects of Computing 14(2), 108–122 (2002)MATHCrossRefGoogle Scholar
  4. 4.
    Harel, D.: Dynamic logic. In: Gabbay, D., Guenthner, F. (eds.) Handbook of Philosophical Logic, Extensions of Classical Logic, vol. II, pp. 497–604. D. Reidel Publ. Co. (1984)Google Scholar
  5. 5.
    Hoare, C.A.R.: Communicating Sequential Processes. Prentice Hall, Englewood Cliffs (1985)MATHGoogle Scholar
  6. 6.
    He, J., Hoare, C.A.R.: Unifying Theories of Programming. Prentice Hall, Englewood Cliffs (1998)Google Scholar
  7. 7.
    He, J., Hoare, C.A.R.: A trace model for pointers and objects. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 1–17. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  8. 8.
    Ishtiaq, S.S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: Conf. Record of 28th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL 2001, pp. 14–26. ACM Press, New York (2001)CrossRefGoogle Scholar
  9. 9.
    Mijajlović, I., Torp-Smith, N., O’Hearn, P.W.: Refinement and separation contexts. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 421–433. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  10. 10.
    Milner, R.: Communication and Concurrency. Prentice Hall, Englewood Cliffs (1989)MATHGoogle Scholar
  11. 11.
    O’Hearn, P.W., Reynolds, J.C., Yang, H.: Local reasoning about programs that alter data structures. In: Fribourg, L. (ed.) CSL 2001 and EACSL 2001. LNCS, vol. 2142, pp. 1–19. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  12. 12.
    O’Hearn, P.W., Reynolds, J.C., Yang, H.: Separation and information hiding. In: Proc. of 31st ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL 2004, pp. 268–280. ACM Press, New York (2004)CrossRefGoogle Scholar
  13. 13.
    Paige, R.F., Ostroff, J.S.: ERC—an object-oriented refinement calculus for Eiffel. Formal Aspects of Computing 16(1), 51–79 (2004)MATHCrossRefGoogle Scholar
  14. 14.
    Parkinson, M., Bierman, G.: Separation logic and abstraction. In: Proc. of 32nd ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, POPL 2005, pp. 259–270. ACM Press, New York (2005)Google Scholar
  15. 15.
    Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Proc. of 17th IEEE Symp. on Logic in Computer Science, LICS 2002, pp. 55–74. IEEE Comput. Soc. Press, Los Alamitos (2002)CrossRefGoogle Scholar
  16. 16.
    Yang, H.: Relational separation logic. Theor. Comput. Sci. (submitted)Google Scholar
  17. 17.
    Yang, H.: Verification of the Schorr–Waite graph marking algorithm by refinement. In: Workshop presentation (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Yifeng Chen
    • 1
  • J. W. Sanders
    • 2
  1. 1.Department of Computer ScienceUniversity of DurhamDurhamUK
  2. 2.Oxford University Computing LaboratoryOxfordUK

Personalised recommendations