Advertisement

Verification of B +  Trees: An Experiment Combining Shape Analysis and Interactive Theorem Proving

  • Gidon Ernst
  • Gerhard Schellhorn
  • Wolfgang Reif
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7041)

Abstract

Interactive proofs of correctness of pointer-manipulating programs tend to be difficult. We propose an approach that integrates shape analysis and interactive theorem proving, namely TVLA and KIV. The approach uses shape analysis to automatically discharge proof obligations for various data structure properties, such as “acyclicity”. We verify the main operations of B +  trees by decomposition of the problem into three layers. At the top level is an interactive proof of the main recursive procedures. The actual modifications of the data structure are verified with shape analysis. To this purpose we define a mapping of typed algebraic heaps to TVLA. TVLA itself relies on various constraints and lemmas, that were proven in KIV as a foundation for an overall correct analysis.

Keywords

Shape Analysis Predicate Symbol Split Node Interactive Proof Tree Shape 
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.
    Bayer, R., McCreight, E.: Organization and maintenance of large ordered indices. Acta Informatica 1, 173–189 (1972)CrossRefzbMATHGoogle Scholar
  2. 2.
    Bogudlov, I., Lev-Ami, T., Reps, T., Sagiv, M.: Revamping TVLA: Making Parametric Shape Analysis Competitive. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 221–225. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  3. 3.
    Ernst, G.: KIV and TVLA proofs for B + -Trees (2011), http://www.informatik.uni-augsburg.de/swt/projects/btree.html
  4. 4.
    Fielding, E.: The specification of abstract mappings and their implementation as B+ trees. Technical report, Oxford University, PRG-18 (1980)Google Scholar
  5. 5.
    Gopan, D., Reps, T., Sagiv, M.: A framework for numeric analysis of array operations. In: Proc. 32nd ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages, POPL, pp. 338–350. ACM, New York (2005)Google Scholar
  6. 6.
    Gulwani, S., Lev-Ami, T., Sagiv, M.: A combination framework for tracking partition sizes. In: Proc. of the 36th ACM SIGPLAN-SIGACT Symp Principles of programming languages, POPL, pp. 239–251. ACM, New York (2009)Google Scholar
  7. 7.
    Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. MIT Press, Cambridge (2000)zbMATHGoogle Scholar
  8. 8.
    Herter, J.: Towards shape analysis of B-trees. Master’s thesis, Universität Saarbrücken (2008)Google Scholar
  9. 9.
    Loginov, A., Reps, T., Sagiv, M.: Automated verification of the deutsch-schorr-waite tree-traversal algorithm. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 261–279. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Malecha, G., Morrisett, G., Shinnar, A., Wisnesky, R.: Toward a verified relational database management system. In: Proc. of the 37th ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages, POPL, pp. 237–248. ACM, New York (2010)Google Scholar
  11. 11.
    Reif, W., Schellhorn, G., Stenzel, K., Balser, M.: Structured specifications and interactive proofs with KIV. In: Bibel, W., Schmitt, P. (eds.) Automated Deduction—A Basis for Applications, pp. 13–39. Kluwer, Dordrecht (1998)CrossRefGoogle Scholar
  12. 12.
    Reineke, J.: Shape analysis of sets. In: Workshop “Trustworthy Software”. IBFI (2006)Google Scholar
  13. 13.
    Rinetzky, N., Sagiv, M., Yahav, E.: Interprocedural Shape Analysis for Cutpoint-Free Programs. In: Hankin, C., Siveroni, I. (eds.) SAS 2005. LNCS, vol. 3672, pp. 284–302. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  14. 14.
    Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Trans. Program. Lang. Syst. 24, 217–298 (2002)CrossRefGoogle Scholar
  15. 15.
    Sexton, A., Thielecke, H.: Reasoning about B+ trees with operational semantics and separation logic. Electron. Notes Theor. Comput. Sci. 218, 355–369 (2008)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Gidon Ernst
    • 1
  • Gerhard Schellhorn
    • 1
  • Wolfgang Reif
    • 1
  1. 1.University of AugsburgGermany

Personalised recommendations