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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
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)
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)
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)
Chang, B.Y.E., Rival, X.: Relational inductive shape analysis. In: POPL ’08, pp. 247–260. ACM, New York (2008)
Chen, Y., Sanders, J.W.: Logic of global synchrony. ACM TOPLAS 26(2), 221–262 (2004)
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)
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)
Dawar, A., Gardiner, P., Ghelli, G.: Expressiveness and complexity of graph logic. Information and Computation 205, 263–310 (2006)
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)
Gries, D.: The Schorr-Waite graph marking algorithm. Acta Inf. 11, 223–232 (1979)
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)
Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice Hall, Englewood Cliffs (1998)
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)
Hoare, C.A.R.: The verifying compiler: A grand challenge for computing research. Journal of the ACM 50(1), 63–69 (2003)
Ke, W., Liu, Z., Wang, S., Zhao, L.: A graph-based operational semantics of OO programs (May 2009)
Kuncak, V., Rinard, M.C.: On spatial conjunction as second-order logic. MIT CSAIL Technical Report 970 (October 2004)
Liu, X., Liu, Z., Zhao, L.: Object-oriented structure renement A graph transformational approach. UNU-IIST Technical Report 340 (July 2006)
Møller, A., Schwartzbach, M.I.: The pointer assertion logic engine. In: PLDI’01, pp. 221–231 (2001)
O’Hearn, P.W., Reynolds, J., Yang, H.: Separation and information hiding. In: POPL’04, vol. 2142, pp. 268–280. ACM, New York (2004)
Paige, R.F., Ostroff, J.S.: Erc: an object-oriented renement calculus for Eiffel. Formal Aspects of Computing 16(1), 51–79 (2004)
Parkinson, M.J.: Local Reasoning for Java. PhD thesis, University of Cambridge, Computer Laboratory (November 2005)
Preoteasa, V.: Frame rule for mutually recursive procedures manipulating pointers. Theoretical Computer Science 410(42) (2009)
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)
Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: LICS’02, pp. 55–74. IEEE Computer Society, Los Alamitos (2002)
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)
Silva, L., Sampaio, A., Liu, Z.: Laws of object-orientation with reference semantics. In: SEFM, pp. 217–226 (2008)
Sims, E.J.: Extending Separation Logic with fixpoints and postponed substitution. Theoretical Computer Science 351(2), 258–275 (2006)
Smith, M.A., Gibbons, J.: Unifying theories of locations. In: Butterfield, A. (ed.) Unifying Theories of Programming, Dublin (September 2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)