A Verified Cost Analysis of Joinable Red-Black Trees

09/20/2023
by   Runming Li, et al.
0

Ordered sequences of data, specified with a join operation to combine sequences, serve as a foundation for the implementation of parallel functional algorithms. This abstract data type can be elegantly and efficiently implemented using balanced binary trees, where a join operation is provided to combine two trees and rebalance as necessary. In this work, we present a verified implementation and cost analysis of joinable red-black trees in calf, a dependent type theory for cost analysis. We implement red-black trees and auxiliary intermediate data structures in such a way that all correctness invariants are intrinsically maintained. Then, we describe and verify precise cost bounds on the operations, making use of the red-black tree invariants. Finally, we implement standard algorithms on sequences using the simple join-based signature and bound their cost in the case that red-black trees are used as the underlying implementation. All proofs are formally mechanized using the embedding of calf in the Agda theorem prover.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/24/2019

Flat combined Red Black Trees

Flat combining is a concurrency threaded technique whereby one thread pe...
research
04/06/2018

Red-Black Trees with Constant Update Time

We show how a few modifications to the red-black trees allow for O(1) wo...
research
07/10/2018

Monotonous betting strategies in warped casinos

Suppose that the outcomes of a roulette table are not entirely random, i...
research
06/09/2021

Verification of a Merkle Patricia Tree Library Using F*

A Merkle tree is a data structure for representing a key-value store as ...
research
06/13/2021

An efficient way to manage ranges of data with Wise Red-Black Trees

This paper describes the most efficient way to manage operations on rang...
research
04/09/2020

A Pedagogically Sound yet Efficient Deletion algorithm for Red-Black Trees: The Parity-Seeking Delete Algorithm

Red-black (RB) trees are one of the most efficient variants of balanced ...
research
08/23/2023

Demystifying our Grandparent's De Bruijn Sequences with Concatenation Trees

Some of the most interesting de Bruijn sequences can be constructed in s...

Please sign up or login with your details

Forgot password? Click here to reset