Skip to main content

Abstraction of Object Graphs in Program Verification

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6120))

Abstract

A set-theoretic formalism, AOG, is introduced to support automated verification of pointer programs. AOG targets pointer reasoning for source programs before compilation (before removal of field names). Pointer structures are represented as object graphs instead of heaps. Each property in AOG is a relation between object graphs and name assignments of program variables, and specifications result from composing properties. AOG extends Separation Logic’s compositions of address-disjoint separating conjunction to more restrictive compositions with different disjointness conditions; the extension is shown to be strict when fixpoints are present. A composition that is a ‘unique decomposition’ decomposes any given graph uniquely into two parts. An example is the separation between the non-garbage and garbage parts of memory. Although AOG is in general undecidable, it is used to define the semantics of specialised decidable logics that support automated program verification of specific topologies of pointer structure. One logic studied in this paper describes pointer variables located on multiple parallel linked lists. That logic contains quantifiers and fixpoints but is nonetheless decidable. It is applied to the example of in-place list reversal for automated verification, and in outline to the Schorr-Waite marking algorithm. The technique of unique decomposition is found to be particularly useful in establishing laws for such logics.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Berdine, J., Calcagno, C., O’Hearn, P.W.: A decidable fragment of separation logic. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 97–109. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  2. Calcagno, C., Gardner, P., Hague, M.: From separation logic to first-order logic. In: Sassone, V. (ed.) FOSSACS 2005. LNCS, vol. 3441, pp. 395–409. Springer, Heidelberg (2005)

    Google Scholar 

  3. Calcagno, C., Yang, H., O’Hearn, P.W.: Computability and complexity results for a spatial assertion language for data structures. In: APLAS, pp. 289–300 (2001)

    Google Scholar 

  4. Chang, B.Y.E., Rival, X.: Relational inductive shape analysis. In: POPL ’08, pp. 247–260. ACM, New York (2008)

    Chapter  Google Scholar 

  5. Chen, Y., Sanders, J.W.: Logic of global synchrony. ACM TOPLAS 26(2), 221–262 (2004)

    Article  Google Scholar 

  6. Chen, Y., Sanders, J.W.: Compositional reasoning for pointer structures. In: Uustalu, T. (ed.) MPC 2006. LNCS, vol. 4014, pp. 115–139. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  7. Courcelle, B.: Graph decompositions definable in monadic second-order logic. In: 7th International Colloquium on Graph Theory. Electronic Notes in Discrete Mathematics, vol. 22(15), pp. 13–19 (2005)

    Google Scholar 

  8. Dawar, A., Gardiner, P., Ghelli, G.: Expressiveness and complexity of graph logic. Information and Computation 205, 263–310 (2006)

    Article  Google Scholar 

  9. Distefano, D., O’Hearn, P.W., Yang, H.: A local shape analysis based on separation logic. In: Hermanns, H., Palsberg, J. (eds.) TACAS 2006. LNCS, vol. 3920, pp. 287–302. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  10. Gries, D.: The Schorr-Waite graph marking algorithm. Acta Inf. 11, 223–232 (1979)

    Article  MATH  Google Scholar 

  11. Harwood, W., Cavalcanti, A., Woodcock, J.: A theory of pointers for the UTP. In: Fitzgerald, J.S., Haxthausen, A.E., Yenigun, H. (eds.) ICTAC 2008. LNCS, vol. 5160, pp. 141–155. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  12. Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice Hall, Englewood Cliffs (1998)

    Google Scholar 

  13. Hoare, C.A.R., He, J.: A trace model for pointers and objects. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 1–17. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  14. Hoare, C.A.R.: The verifying compiler: A grand challenge for computing research. Journal of the ACM 50(1), 63–69 (2003)

    Article  Google Scholar 

  15. Ke, W., Liu, Z., Wang, S., Zhao, L.: A graph-based operational semantics of OO programs (May 2009)

    Google Scholar 

  16. Kuncak, V., Rinard, M.C.: On spatial conjunction as second-order logic. MIT CSAIL Technical Report 970 (October 2004)

    Google Scholar 

  17. Liu, X., Liu, Z., Zhao, L.: Object-oriented structure renement A graph transformational approach. UNU-IIST Technical Report 340 (July 2006)

    Google Scholar 

  18. Møller, A., Schwartzbach, M.I.: The pointer assertion logic engine. In: PLDI’01, pp. 221–231 (2001)

    Google Scholar 

  19. O’Hearn, P.W., Reynolds, J., Yang, H.: Separation and information hiding. In: POPL’04, vol. 2142, pp. 268–280. ACM, New York (2004)

    Google Scholar 

  20. Paige, R.F., Ostroff, J.S.: Erc: an object-oriented renement calculus for Eiffel. Formal Aspects of Computing 16(1), 51–79 (2004)

    Article  MATH  Google Scholar 

  21. Parkinson, M.J.: Local Reasoning for Java. PhD thesis, University of Cambridge, Computer Laboratory (November 2005)

    Google Scholar 

  22. Preoteasa, V.: Frame rule for mutually recursive procedures manipulating pointers. Theoretical Computer Science 410(42) (2009)

    Google Scholar 

  23. Rakamarić, Z., Bingham, J., Hu, A.J.: An inference-rule-based decision procedure for verification of heap-manipulating programs with mutable data and cyclic data structures. In: Cook, B., Podelski, A. (eds.) VMCAI 2007. LNCS, vol. 4349, pp. 106–121. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  24. Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: LICS’02, pp. 55–74. IEEE Computer Society, Los Alamitos (2002)

    Google Scholar 

  25. Schieder, B.: Pointer theory and weakest preconditions without addresses and heap. In: Kozen, D., Shankland, C. (eds.) MPC 2004. LNCS, vol. 3125, pp. 357–380. Springer, Heidelberg (2004)

    Google Scholar 

  26. Silva, L., Sampaio, A., Liu, Z.: Laws of object-orientation with reference semantics. In: SEFM, pp. 217–226 (2008)

    Google Scholar 

  27. Sims, E.J.: Extending Separation Logic with fixpoints and postponed substitution. Theoretical Computer Science 351(2), 258–275 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  28. Smith, M.A., Gibbons, J.: Unifying theories of locations. In: Butterfield, A. (ed.) Unifying Theories of Programming, Dublin (September 2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chen, Y., Sanders, J.W. (2010). Abstraction of Object Graphs in Program Verification. In: Bolduc, C., Desharnais, J., Ktari, B. (eds) Mathematics of Program Construction. MPC 2010. Lecture Notes in Computer Science, vol 6120. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13321-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-13321-3_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-13320-6

  • Online ISBN: 978-3-642-13321-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics