Skip to main content

A Verified Implementation of B\(^+\)-Trees in Isabelle/HOL

  • Conference paper
  • First Online:
Theoretical Aspects of Computing – ICTAC 2022 (ICTAC 2022)

Abstract

In this paper we present the verification of an imperative implementation of the ubiquitous B\(^+\)-tree data structure in the interactive theorem prover Isabelle/HOL. The implementation supports membership test, insertion and range queries with efficient binary search for intra-node navigation. The imperative implementation is verified in two steps: an abstract set interface is refined to an executable but inefficient purely functional implementation which is further refined to the efficient imperative implementation.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Bayer, R., McCreight, E.M.: Organization and maintenance of large ordered indices. Acta Informatica 1, 173–189 (1972). https://doi.org/10.1007/BF00288683

    Article  MATH  Google Scholar 

  2. Bulwahn, L., Krauss, A., Haftmann, F., Erkök, L., Matthews, J.: Imperative functional programming with Isabelle/HOL. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 134–149. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-71067-7_14

    Chapter  Google Scholar 

  3. Comer, D.: The ubiquitous b-tree. ACM Comput. Surv. 11(2), 121–137 (1979). https://doi.org/10.1145/356770.356776

    Article  MathSciNet  MATH  Google Scholar 

  4. Ernst, G., Schellhorn, G., Reif, W.: Verification of B\(^+\) trees by integration of shape analysis and interactive theorem proving. Software & Systems Modeling 14(1), 27–44 (2013). https://doi.org/10.1007/s10270-013-0320-1

    Article  Google Scholar 

  5. Fielding, E.: The specification of abstract mappings and their implementation as b+ trees. Technical Report PRG18, OUCL (1980)

    Google Scholar 

  6. Graefe, G.: Modern b-tree techniques. Found. Trends Databases 3(4), 203–402 (2011). https://doi.org/10.1561/1900000028

    Article  Google Scholar 

  7. Lammich, P.: Generating verified LLVM from isabelle/hol. In: Harrison, J., O’Leary, J., Tolmach, A. (eds.) 10th International Conference on Interactive Theorem Proving, ITP 2019, Portland, OR, USA, 9–12 September 2019, vol. 141 of LIPIcs, pp. 22:1–22:19. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2019). https://doi.org/10.4230/LIPIcs.ITP.2019.22

  8. Lammich, P.: Refinement to Imperative HOL. J. Autom. Reason. 62(4), 481–503 (2017). https://doi.org/10.1007/s10817-017-9437-1

    Article  MathSciNet  MATH  Google Scholar 

  9. Lammich, P., Meis, R.: A separation logic framework for imperative HOL. Arch. Formal Proofs 2012 (2012). https://www.isa-afp.org/entries/Separation_Logic_Imperative_HOL.shtml

  10. Malecha, J.G., Morrisett, G., Shinnar, A., Wisnesky, R.: Toward a verified relational database management system. In: Hermenegildo, M.V., Palsberg, J. (eds.) Proceedings of the 37th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2010, Madrid, Spain, 17–23 January 2010, pp. 237–248. ACM (2010). https://doi.org/10.1145/1706299.1706329

  11. Mündler, N.: A verified imperative implementation of B-trees. Arch. Formal Proofs 2021 (2021). https://www.isa-afp.org/entries/BTree.html

  12. Nipkow, T.: Automatic functional correctness proofs for functional search trees. In: Blanchette, J.C., Merz, S. (eds.) ITP 2016. LNCS, vol. 9807, pp. 307–322. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-43144-4_19

    Chapter  Google Scholar 

  13. Nipkow, T., Klein, G.: Concrete Semantics. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10542-0

    Book  MATH  Google Scholar 

  14. Reif, W., Schellhorn, G., Stenzel, K., Balser, M.: Structured specifications and interactive proofs with kiv. In: Automated Deduction - A Basis for Applications, vol. 2 (2000). https://doi.org/10.1007/978-94-017-0435-9_1

  15. Sagiv, S., Reps, T.W., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Trans. Program. Lang. Syst. 24(3), 217–298 (2002). https://doi.org/10.1145/514188.514190

    Article  Google Scholar 

  16. Sexton, A.P., Thielecke, H.: Reasoning about B+ trees with operational semantics and separation logic. In: Bauer, A., Mislove, M.W. (eds.) Proceedings of the 24th Conference on the Mathematical Foundations of Programming Semantics, MFPS 2008, Philadelphia, PA, USA, 22–25 May 2008, vol. 218 of Electronic Notes in Theoretical Computer Science, pp. 355–369. Elsevier (2008). https://doi.org/10.1016/j.entcs.2008.10.021

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Niels Mündler .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Mündler, N., Nipkow, T. (2022). A Verified Implementation of B\(^+\)-Trees in Isabelle/HOL. In: Seidl, H., Liu, Z., Pasareanu, C.S. (eds) Theoretical Aspects of Computing – ICTAC 2022. ICTAC 2022. Lecture Notes in Computer Science, vol 13572. Springer, Cham. https://doi.org/10.1007/978-3-031-17715-6_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-17715-6_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-17714-9

  • Online ISBN: 978-3-031-17715-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics