Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3372885.3373834acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Proof pearl: Braun trees

Published: 22 January 2020 Publication History

Abstract

Braun trees are functional data structures for implementing extensible arrays and priority queues (and sorting functions based on the latter) efficiently. Some well-known functions on Braun trees have not yet been verified, including especially Okasaki’s linear time conversion from lists to Braun trees. We supply the missing proofs and verify all of these algorithms in Isabelle, including non-obvious time complexity claims. In particular we provide the first linear-time conversion from Braun trees to lists. We also state and verify a new characterization of Braun trees as the trees t whose index set is the interval {1, …, size of t}.

References

[1]
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms. MIT Press, 3rd edition, 2009.
[2]
Rene De La Briandais. File searching using variable length keys. In Papers Presented at the the March 3-5, 1959, Western Joint Computer Conference, IRE-AIEE-ACM ’59 (Western), pages 295–298, New York, NY, USA, 1959. ACM.
[3]
Manuel Eberl. Proving divide and conquer complexities in Isabelle/HOL. Journal of Automated Reasoning, 58(4):483–508, 2017.
[4]
Jean-Christophe Filliâtre. Purely applicative heaps implemented with Braun trees. Gallery of Verified Programs, 2015. http://toccata.lri.fr/ gallery/braun_trees.en.html, Formal proof development.
[5]
Edward Fredkin. Trie memory. Communications of the ACM, 3(9):490– 499, 1960.
[6]
Walter Guttmann, Helmuth Partsch, Wolfram Schulte, and Ton Vullinghs. Tool support for the interactive derivation of formally correct functional programs. Journal of Universal Computer Science, 9(2):173–188, Feb 2003.
[7]
Rob R. Hoogerwoord. A logarithmic implementation of flexible arrays. In R. Bird, C. Morgan, and J. Woodcock, editors, Mathematics of Program Construction, Second International Conference, volume 669 of LNCS, pages 191–207. Springer, 1992.
[8]
Cliff B. Jones. Systematic Software Development using VDM. Prentice Hall International, 2nd edition, 1990.
[9]
Tobias Nipkow. Priority queues based on Braun trees. Archive of Formal Proofs, 2014. http://devel.isa-afp.org/entries/Priority_Queue_Braun. html (development) and http://isa-afp.org/entries/Priority_Queue_ Braun.html (latest release), Formal proof development.
[10]
Tobias Nipkow. Verified root-balanced trees. In Bor-Yuh Evan Chang, editor, Asian Symposium on Programming Languages and Systems, APLAS 2017, volume 10695 of LNCS, pages 255–272. Springer, 2017.
[11]
Tobias Nipkow and Hauke Brinkop. Amortized complexity verified. J. Automated Reasoning, 62:367–391, 2019.
[12]
Tobias Nipkow and Gerwin Klein. Concrete Semantics with Isabelle/HOL. Springer, 2014. 298 pp. http://concrete-semantics.org .
[13]
Tobias Nipkow, Lawrence Paulson, and Markus Wenzel. Isabelle/HOL — A Proof Assistant for Higher-Order Logic, volume 2283 of LNCS. Springer, 2002. 218 pp.
[14]
Chris Okasaki. Three algorithms on Braun trees. J. Functional Programming, 7(6):661–666, 1997.
[15]
Lawrence C. Paulson. ML for the Working Programmer. Cambridge University Press, 2nd edition, 1996.
[16]
Martin Rem and Wim Braun. A logarithmic implementation of flexible arrays. Memorandum MR83/4. Eindhoven University of Techology, 1983.
[17]
Konrad Slind and Michael Norrish. A brief overview of HOL4. In International Conference on Theorem Proving in Higher Order Logics, pages 28–32. Springer, 2008.

Cited By

View all
  • (2020)Verified Textbook AlgorithmsAutomated Technology for Verification and Analysis10.1007/978-3-030-59152-6_2(25-53)Online publication date: 12-Oct-2020

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CPP 2020: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs
January 2020
381 pages
ISBN:9781450370974
DOI:10.1145/3372885
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 January 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Braun tree
  2. Isabelle
  3. verification

Qualifiers

  • Research-article

Funding Sources

Conference

POPL '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 18 of 26 submissions, 69%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)11
  • Downloads (Last 6 weeks)0
Reflects downloads up to 26 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2020)Verified Textbook AlgorithmsAutomated Technology for Verification and Analysis10.1007/978-3-030-59152-6_2(25-53)Online publication date: 12-Oct-2020

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media