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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Bayer, R., McCreight, E.M.: Organization and maintenance of large ordered indices. Acta Informatica 1, 173–189 (1972). https://doi.org/10.1007/BF00288683
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
Comer, D.: The ubiquitous b-tree. ACM Comput. Surv. 11(2), 121–137 (1979). https://doi.org/10.1145/356770.356776
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
Fielding, E.: The specification of abstract mappings and their implementation as b+ trees. Technical Report PRG18, OUCL (1980)
Graefe, G.: Modern b-tree techniques. Found. Trends Databases 3(4), 203–402 (2011). https://doi.org/10.1561/1900000028
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
Lammich, P.: Refinement to Imperative HOL. J. Autom. Reason. 62(4), 481–503 (2017). https://doi.org/10.1007/s10817-017-9437-1
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
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
Mündler, N.: A verified imperative implementation of B-trees. Arch. Formal Proofs 2021 (2021). https://www.isa-afp.org/entries/BTree.html
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
Nipkow, T., Klein, G.: Concrete Semantics. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10542-0
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
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
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
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)