Tractable Reasoning in a Fragment of Separation Logic

  • Byron Cook
  • Christoph Haase
  • Joël Ouaknine
  • Matthew Parkinson
  • James Worrell
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6901)

Abstract

In 2004, Berdine, Calcagno and O’Hearn introduced a fragment of separation logic that allows for reasoning about programs with pointers and linked lists. They showed that entailment in this fragment is in coNP, but the precise complexity of this problem has been open since. In this paper, we show that the problem can actually be solved in polynomial time. To this end, we represent separation logic formulae as graphs and show that every satisfiable formula is equivalent to one whose graph is in a particular normal form. Entailment between two such formulae then reduces to a graph homomorphism problem. We also discuss natural syntactic extensions that render entailment intractable.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Berdine, J., Calcagno, C., Cook, B., Distefano, D., O’Hearn, P.W., Wies, T., Yang, H.: Shape analysis for composite data structures. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 178–192. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  2. 2.
    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)CrossRefGoogle Scholar
  3. 3.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: Modular automatic assertion checking with separation logic. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 115–137. Springer, Heidelberg (2006)Google Scholar
  4. 4.
    Calcagno, C., Distefano, D., O’Hearn, P.W., Yang, H.: Space invading systems code. In: Logic-Based Program Synthesis and Transformation, pp. 1–3. Springer, Heidelberg (2009)Google Scholar
  5. 5.
    Calcagno, C., Yang, H., O’Hearn, P.W.: Computability and complexity results for a spatial assertion language for data structures. In: Hariharan, R., Mukund, M., Vinay, V. (eds.) FSTTCS 2001. LNCS, vol. 2245, pp. 108–119. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  6. 6.
    Cook, B., Haase, C., Ouaknine, J., Parkinson, M., Worrell, J.: Tracatable reasoning in a fragment of separation logics (full version). Technical report, University of Oxford (2011), http://www.cs.ox.ac.uk/people/christoph.haase/sl.pdf
  7. 7.
    Distefano, D., Parkinson, M.: jstar: towards practical verification for java. In: OOPSLA 2008, pp. 213–226. ACM, New York (2008)Google Scholar
  8. 8.
    Garey, M.R., Johnson, D.S.: Computers and Intractability; A Guide to the Theory of NP-Completeness. W. H. Freeman & Co., New York (1990)MATHGoogle Scholar
  9. 9.
    Gorogiannis, N., Kanovich, M., O’Hearn, P.: The complexity of abduction for separated heap abstraction. In: SAS 2011. Springer, Heidelberg (to appear, 2011)Google Scholar
  10. 10.
    Haase, C., Lutz, C.: Complexity of subsumption in the EL family of description logics: Acyclic and cyclic tboxes. In: ECAI 2008, pp. 25–29. IOS Press, Amsterdam (2008)Google Scholar
  11. 11.
    Ishtiaq, S.S., O’Hearn, P.W.: Bi as an assertion language for mutable data structures. In: POPL 2001, pp. 14–26. ACM, New York (2001)Google Scholar
  12. 12.
    Jacobs, B., Piessens, F.: The VeriFast program verifier. Technical Report 520, Department of Computer Science, Katholieke Universiteit Leuven (2008)Google Scholar
  13. 13.
    Miklau, G., Suciu, D.: Containment and equivalence for an XPath fragment. In: PODS 2002, pp. 65–76. ACM, New York (2002)Google Scholar
  14. 14.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS 2002, IEEE Computer Society Press, Los Alamitos (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Byron Cook
    • 1
    • 3
  • Christoph Haase
    • 2
  • Joël Ouaknine
    • 2
  • Matthew Parkinson
    • 1
  • James Worrell
    • 2
  1. 1.Microsoft Research CambridgeUK
  2. 2.Department of Computer ScienceUniversity of OxfordUK
  3. 3.Department of Computer ScienceQueen Mary University of LondonUK

Personalised recommendations