Using First-Order Theorem Provers in the Jahob Data Structure Verification System

  • Charles Bouillaguet
  • Viktor Kuncak
  • Thomas Wies
  • Karen Zee
  • Martin Rinard
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4349)


This paper presents our integration of efficient resolution-based theorem provers into the Jahob data structure verification system. Our experimental results show that this approach enables Jahob to automatically verify the correctness of a range of complex dynamically instantiable data structures, such as hash tables and search trees, without the need for interactive theorem proving or techniques tailored to individual data structures.

Our primary technical results include: (1) a translation from higher-order logic to first-order logic that enables the application of resolution-based theorem provers and (2) a proof that eliminating type (sort) information in formulas is both sound and complete, even in the presence of a generic equality operator. Our experimental results show that the elimination of type information often dramatically decreases the time required to prove the resulting formulas.

These techniques enabled us to verify complex correctness properties of Java programs such as a mutable set implemented as an imperative linked list, a finite map implemented as a functional ordered tree, a hash table with a mutable array, and a simple library system example that uses these container data structures. Our system verifies (in a matter of minutes) that data structure operations correctly update the finite map, that they preserve data structure invariants (such as ordering of elements, membership in appropriate hash table buckets, or relationships between sets and relations), and that there are no run-time errors such as null dereferences or array out of bounds accesses.


Representation Invariant Hash Table Theorem Prover Proof Obligation Binary Search Tree 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Arkoudas, K., et al.: Verifying a file system implementation. In: Davies, J., Schulte, W., Barnett, M. (eds.) ICFEM 2004. LNCS, vol. 3308, pp. 8–12. Springer, Heidelberg (2004)Google Scholar
  2. 2.
    Barendregt, H.P.: Lambda calculi with types. In: Handbook of Logic in Computer Science, vol. II, Oxford University Press, Oxford (2001)Google Scholar
  3. 3.
    Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., et al. (eds.) CASSIS 2004. LNCS, vol. 3362, Springer, Heidelberg (2005)Google Scholar
  4. 4.
    Bouillaguet, C., Kuncak, V., Wies, T., Zee, K., Rinard, M.: On using first-order theorem provers in a data structure verification system. Technical Report MIT-CSAIL-TR-2006-072, MIT (November 2006),
  5. 5.
    de Roever, W.-P., Engelhardt, K.: Data Refinement: Model-oriented proof methods and their comparison. Cambridge University Press, Cambridge (1998)zbMATHGoogle Scholar
  6. 6.
    Hurd, J.: An LCF-style interface between HOL and first-order logic. In: Voronkov, A. (ed.) Automated Deduction - CADE-18. LNCS (LNAI), vol. 2392, Springer, Heidelberg (2002)Google Scholar
  7. 7.
    Kuncak, V.: Modular Data Structure Verification. PhD thesis, EECS Department, Massachusetts Institute of Technology (February 2007)Google Scholar
  8. 8.
    Kuncak, V., Nguyen, H.H., Rinard, M.: Deciding Boolean Algebra with Presburger Arithmetic. J. of Automated Reasoning (2006),
  9. 9.
    Leino, K.R.M., Müller, P.: A verification methodology for model fields. In: Sestoft, P. (ed.) ESOP 2006 and ETAPS 2006. LNCS, vol. 3924, Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Lev-Ami, T., Reps, T., Sagiv, M., Wilhelm, R.: Putting static analysis to work for verification: A case study. In: Int. Symp. Software Testing and Analysis (2000)Google Scholar
  11. 11.
    Manzano, M.: Extensions of First-Order Logic. Cambridge University Press, Cambridge (1996)zbMATHGoogle Scholar
  12. 12.
    Meng, J., Paulson, L.C.: Experiments on supporting interactive proof using resolution. In: Basin, D., Rusinowitch, M. (eds.) IJCAR 2004. LNCS (LNAI), vol. 3097, Springer, Heidelberg (2004)Google Scholar
  13. 13.
    Meng, J., Paulson, L.C.: Lightweight relevance filtering for machine-generated resolution problems. In: ESCoR: Empirically Successful Computerized Reasoning (2006)Google Scholar
  14. 14.
    Meng, J., Paulson, L.C.: Translating higher-order problems to first-order clauses. In: ESCoR: Empir. Successful Comp. Reasoning, pp. 70–80 (2006)Google Scholar
  15. 15.
    Nguyen, H.H., et al.: Automated verification of shape, size and bag properties via separation logic. In: Cook, B., Podelski, A. (eds.) VMCAI 2007. LNCS, vol. 4349, Springer, Heidelberg (2007)Google Scholar
  16. 16.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  17. 17.
    Reineke, J.: Shape analysis of sets. Master’s thesis, Universität des Saarlandes, Germany (June 2005)Google Scholar
  18. 18.
    Rugina, R.: Quantitative shape analysis. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, Springer, Heidelberg (2004)Google Scholar
  19. 19.
    Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM TOPLAS 24(3), 217–298 (2002)CrossRefGoogle Scholar
  20. 20.
    Schulz, S.: E–A Brainiac Theorem Prover. Journal of AI Communications 15(2–3), 111–126 (2002)zbMATHGoogle Scholar
  21. 21.
    Sutcliffe, G., Suttner, C.B.: The tptp problem library: Cnf release v1.2.1. Journal of Automated Reasoning 21(2), 177–203 (1998)zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    Weidenbach, C.: Combining superposition, sorts and splitting. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning, vol. II, chapter 27, pp. 1965–2013. Elsevier, Amsterdam (2001)Google Scholar
  23. 23.
    Wies, T., Kuncak, V., Lam, P., Podelski, A., Rinard, M.: Field constraint analysis. In: Proc. Int. Conf. Verification, Model Checking, and Abstract Interpratation (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Charles Bouillaguet
    • 1
  • Viktor Kuncak
    • 2
  • Thomas Wies
    • 3
  • Karen Zee
    • 2
  • Martin Rinard
    • 2
  1. 1.Ecole Normale Supérieure de Cachan, CachanFrance
  2. 2.MIT Computer Science and Artificial Intelligence Lab, CambridgeUSA
  3. 3.Max-Planck-Institut für Informatik, SaarbrückenGermany

Personalised recommendations