Decision Procedures for Region Logic

  • Stan Rosenberg
  • Anindya Banerjee
  • David A. Naumann
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7148)

Abstract

Region logic is Hoare logic for object-based programs. It features local reasoning with frame conditions expressed in terms of sets of heap locations. This paper studies tableau-based decision procedures for RL, the quantifier-free fragment of the assertion language. This fragment combines sets and (functional) images with the theories of arrays and partial orders. The procedures are of practical interest because they can be integrated efficiently into the satisfiability modulo theories (SMT) framework. We provide a semi-decision procedure for RL and its implementation as a theory plugin inside the SMT solver Z3. We also provide a decision procedure for an expressive fragment of RL termed restricted-RL. We prove that deciding satisfiability of restricted-RL formulas is NP-complete. Both procedures are proven sound and complete. Preliminary performance results indicate that the semi-decision procedure has the potential toscale to large input formulas.

Keywords

Decision Procedure Cardinality Constraint Region Logic Presburger Arithmetic Rule Instance 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Banerjee, A., Barnett, M., Naumann, D.A.: Boogie Meets Regions: A Verification Experience Report. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 177–191. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Banerjee, A., Naumann, D.A., Rosenberg, S.: Regional Logic for Local Reasoning about Global Invariants. In: Ryan, M. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 387–411. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  3. 3.
    Banerjee, A., Naumann, D.A., Rosenberg, S.: Local reasoning for global invariants, part I: Region logic. Extended version of [2], available at [24] (July 2011)Google Scholar
  4. 4.
    Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., Leino, K.R.M.: Boogie: A Modular Reusable Verifier for Object-Oriented Programs. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 364–387. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  5. 5.
    de Moura, L., Bjørner, N.: Model-based theory combination. Electr. Notes Theor. Comput. Sci. 198(2), 37–49 (2008)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    de Moura, L., Bjørner, N.: Z3: An Efficient SMT Solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  7. 7.
    Detlefs, D., Nelson, G., Saxe, J.B.: Simplify: a theorem prover for program checking. J. ACM 52(3), 365–473 (2005)MathSciNetCrossRefMATHGoogle Scholar
  8. 8.
    Fitting, M.: First-Order Logic and Automated Theorem Proving. Graduate texts in Computer Science. Springer, Heidelberg (1996)CrossRefMATHGoogle Scholar
  9. 9.
    Ganzinger, H., Hagen, G., Nieuwenhuis, R., Oliveras, A., Tinelli, C.: DPLL(T): Fast Decision Procedures. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 175–188. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  10. 10.
    Givan, R., McAllester, D.A., Witty, C., Kozen, D.: Tarskian set constraints. Inf. Comput. 174(2), 105–131 (2002)MathSciNetCrossRefMATHGoogle Scholar
  11. 11.
    Kapur, D., Zarba, C.G.: A reduction approach to decision procedures. Technical report, University of New Mexico (2005)Google Scholar
  12. 12.
    Kassios, I.T.: Dynamic Frames: Support for Framing, Dependencies and Sharing Without Restrictions. In: Misra, J., Nipkow, T., Karakostas, G. (eds.) FM 2006. LNCS, vol. 4085, pp. 268–283. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  13. 13.
    Kroening, D., Strichman, O.: Decision Procedures: An Algorithmic Point of View. EATCS. Springer, Heidelberg (2008)MATHGoogle Scholar
  14. 14.
    Kuncak, V., Nguyen, H.H., Rinard, M.C.: An Algorithm for Deciding BAPA: Boolean Algebra with Presburger Arithmetic. In: Nieuwenhuis, R. (ed.) CADE 2005. LNCS (LNAI), vol. 3632, pp. 260–277. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  15. 15.
    Kuncak, V., Rinard, M.C.: Decision procedures for set-valued fields. Electr. Notes Theor. Comput. Sci. 131, 51–62 (2005)CrossRefGoogle Scholar
  16. 16.
    Kuncak, V., Rinard, M.C.: Towards Efficient Satisfiability Checking for Boolean Algebra with Presburger Arithmetic. In: Pfenning, F. (ed.) CADE 2007. LNCS (LNAI), vol. 4603, pp. 215–230. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  17. 17.
    Leino, K.R.M.: Dafny: An Automatic Program Verifier for Functional Correctness. In: Clarke, E.M., Voronkov, A. (eds.) LPAR-16 2010. LNCS, vol. 6355, pp. 348–370. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  18. 18.
    Manna, Z., Zarba, C.G.: Combining Decision Procedures. In: Aichernig, B.K. (ed.) Formal Methods at the Crossroads. From Panacea to Foundational Support. LNCS, vol. 2757, pp. 381–422. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  19. 19.
    Marron, M., Méndez-Lojo, M., Hermenegildo, M.V., Stefanovic, D., Kapur, D.: Sharing analysis of arrays, collections, and recursive structures. In: PASTE, pp. 43–49 (2008)Google Scholar
  20. 20.
    Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM Trans. Program. Lang. Syst. 1(2), 245–257 (1979)CrossRefMATHGoogle Scholar
  21. 21.
    Rosenberg, S.: Region Logic: Local Reasoning for Java Programs and its Automation. PhD thesis, Stevens Institute of Technology (June 2011); available at [25]Google Scholar
  22. 22.
    Rosenberg, S., Banerjee, A., Naumann, D.A.: Local Reasoning and Dynamic Framing for the Composite Pattern and Its Clients. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds.) VSTTE 2010. LNCS, vol. 6217, pp. 183–198. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  23. 23.
    Smullyan, R.M.: First-Order Logic. Springer, Heidelberg (1968)CrossRefMATHGoogle Scholar
  24. 24.
    Suter, P., Steiger, R., Kuncak, V.: Sets with Cardinality Constraints in Satisfiability Modulo Theories. In: Jhala, R., Schmidt, D. (eds.) VMCAI 2011. LNCS, vol. 6538, pp. 403–418. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  25. 25.
    Verl: VErifier for Region Logic. Software distribution, at http://www.cs.stevens.edu/~naumann/pub/VERL/
  26. 26.
    Yessenov, K., Piskac, R., Kuncak, V.: Collections, Cardinalities, and Relations. In: Barthe, G., Hermenegildo, M. (eds.) VMCAI 2010. LNCS, vol. 5944, pp. 380–395. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  27. 27.
    Zarba, C.G.: Combining Sets with Elements. In: Dershowitz, N. (ed.) Verification (Manna Festschrift). LNCS, vol. 2772, pp. 762–782. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  28. 28.
    Zee, K., Kuncak, V., Rinard, M.C.: Full functional verification of linked data structures. In: PLDI, pp. 349–361 (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Stan Rosenberg
    • 1
  • Anindya Banerjee
    • 2
  • David A. Naumann
    • 1
  1. 1.Stevens Institute of TechnologyHobokenUSA
  2. 2.IMDEA Software InstituteMadridSpain

Personalised recommendations