Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/l-as/idris-rbtree

Type-safe verified Red-Black Trees in Idris 2
https://github.com/l-as/idris-rbtree

Last synced: about 5 hours ago
JSON representation

Type-safe verified Red-Black Trees in Idris 2

Awesome Lists containing this project

README

        

Type-safe verified red-black trees in Idris.

Check `TypedContainers/RBTree.idr` for the basic API.
Your key type needs to implement `LawfulOrd` (see `TypedContainers/LawfulOrd.idr`).

NB: Space complexities and time complexities *should* be the same as standard Red-Black trees,
however, it has not been proven.

Features:
- Value type can depend on key

The algorithm is taken from *Purely functional data structures* by Chris Okasaki.
The proofs were mostly left as an exercise to the reader.
The only difference is that the root of the tree isn't always made red,
since this isn't always required.

TODO:
- Benchmark