A Formal Semantics for Isorecursive and Equirecursive State Abstractions

  • Alexander J. Summers
  • Sophia Drossopoulou
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7920)

Abstract

Methodologies for static program verification and analysis often support recursive predicates in specifications, in order to reason about recursive data structures. Intuitively, a predicate instance represents the complete unrolling of its definition; this is the equirecursive interpretation. However, this semantics is unsuitable for static verification, when the recursion becomes unbounded. For this reason, most static verifiers differentiate between, e.g., a predicate instance and its corresponding body, while providing a facility to map between the two; this is the isorecursive semantics. While this latter interpretation is usually implemented in practice, only the equirecursive semantics is typically treated in theoretical work.

In this paper, we provide both an isorecursive and an equirecursive formal semantics for recursive definitions in the context of Chalice, a verification methodology based on implicit dynamic frames. We show that development of such formalisations requires addressing several subtle issues, such as the possibility of infinitely-recursive definitions and the need for the isorecursive semantics to correctly reflect the restrictions that make it readily implementable. These questions are made more challenging still in the context of implicit dynamic frames, where the use of heap-dependent expressions provides further pitfalls for a correct formal treatment.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abadi, M., Fiore, M.P.: Syntactic considerations on recursive types. In: Proceedings of the Eleventh Annual IEEE Symposium on Logic in Computer Science (LICS 1996), pp. 242–252. IEEE Computer Society Press (July 1996)Google Scholar
  2. 2.
    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)CrossRefGoogle Scholar
  3. 3.
    Bornat, R., Calcagno, C., O’Hearn, P., Parkinson, M.: Permission accounting in separation logic. In: POPL, pp. 259–270 (2005)Google Scholar
  4. 4.
    Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  5. 5.
    DiStefano, D., Parkinson, M.J.: jStar: Towards practical verification for Java. In: OOPSLA. ACM Press (2008)Google Scholar
  6. 6.
    Haack, C., Hurlin, C.: Separation logic contracts for a Java-like language with fork/Join. In: Meseguer, J., Roşu, G. (eds.) AMAST 2008. LNCS, vol. 5140, pp. 199–215. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  7. 7.
    Heule, S., Kassios, I.T., Müller, P., Summers, A.J.: Verification condition generation for permission logics with abstract predicates and abstraction functions. In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920, pp. 451–476. Springer, Heidelberg (2013)Google Scholar
  8. 8.
    Ishtiaq, S.S., O’Hearn, P.W.: BI as an assertion language for mutable data structures. In: POPL, pp. 14–26. ACM Press (2001)Google Scholar
  9. 9.
    Jacobs, B., Smans, J., Philippaerts, P., Vogels, F., Penninckx, W., Piessens, F.: VeriFast: A powerful, sound, predictable, fast verifier for C and Java. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 41–55. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  10. 10.
    Leino, K.R.M., Müller, P.: A basis for verifying multi-threaded programs. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 378–393. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 11.
    Leino, K.R.M., Müller, P., Smans, J.: Verification of concurrent programs with Chalice. In: Aldini, A., Barthe, G., Gorrieri, R. (eds.) FOSAD 2007/2008/2009. LNCS, vol. 5705, pp. 195–222. Springer, Heidelberg (2009)Google Scholar
  12. 12.
    Moskał, M.: Programming with triggers. In: SMT 2009: Proceedings of the 7th International Workshop on Satisfiability Modulo Theories (2009)Google Scholar
  13. 13.
    O’Hearn, P.W., Reynolds, J., Yang, H.: Local reasoning about programs that alter data structures. In: Fribourg, L. (ed.) CSL 2001. LNCS, vol. 2142, pp. 1–19. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  14. 14.
    Parkinson, M.J.: Local Reasoning for Java. PhD thesis, University of Cambridge (November 2005)Google Scholar
  15. 15.
    Parkinson, M.J., Bierman, G.: Separation logic and abstraction. In: POPL, pp. 247–258. ACM Press (2005)Google Scholar
  16. 16.
    Parkinson, M.J., Bierman, G.: Separation logic, abstraction and inheritance. In: POPL, pp. 75–86. ACM Press (2008)Google Scholar
  17. 17.
    Parkinson, M.J., Summers, A.J.: The relationship between separation logic and implicit dynamic frames. In: Barthe, G. (ed.) ESOP 2011. LNCS, vol. 6602, pp. 439–458. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  18. 18.
    Parkinson, M.J., Summers, A.J.: The relationship between separation logic and implicit dynamic frames. Logical Methods in Computer Science 8(3:01), 1–54 (2012)MathSciNetGoogle Scholar
  19. 19.
    Raad, A., Drossopoulou, S.: A sip of the chalice. In: FTfJP (July 2011)Google Scholar
  20. 20.
    Schmalz, M.: Formalizing the logic of event-B. PhD thesis, ETH Zurich (November 2012)Google Scholar
  21. 21.
    Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames: Combining dynamic frames and separation logic. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 148–172. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  22. 22.
    Smans, J., Jacobs, B., Piessens, F.: Implicit Dynamic Frames. In: ToPLAS (2012)Google Scholar
  23. 23.
    Summers, A.J., Drossopoulou, S.: A formal semantics for isorecursive and equirecursive state abstractions. Technical Report 773, ETH Zurich (2012)Google Scholar
  24. 24.
    Farmer, W.M.: A partial functions version of Church’s simple theory of types. Journal of Symbolic Logic 55, 1269–1291 (1990)MathSciNetMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Alexander J. Summers
    • 1
  • Sophia Drossopoulou
    • 2
  1. 1.ETH ZurichSwitzerland
  2. 2.Imperial College LondonUK

Personalised recommendations