ktdequeversion Documentation on ocaml.org
Kaplan-Tarjan persistent real-time deque, with O(1) catenation
A purely-functional, persistent double-ended queue with worst-case O(1) push, pop, inject and eject, plus worst-case O(1) catenation. The implementation is extracted from a Rocq (Coq 9.1) formalization whose keystone theorems are closed with zero admits: totality, sequence preservation, the regularity invariant, and a constant per-operation cost bound, for both the section-4 deque (dequewc_o1) and the section-6 catenable deque (catkeystone + cat_wc_o1). The package exposes an idiomatic interface -- open Ktdeque and use the Deque module (push/inject/pop/eject) or Cadeque (the same, plus concat) -- over the extracted code (the raw extraction is available as the internal sub-library ktdeque.extracted). On the benchmark suite the extracted artifact is faster than Viennot et al.'s hand-written OCaml cadeque on every workload at n=1M.
| Tags | data-structures deque persistent rocq kaplan-tarjan |
|---|---|
| Author | Yann Régis-Gianas |
| License | MIT |
| Published | |
| Homepage | https://github.com/yurug/kaplan2 |
| Issue Tracker | https://github.com/yurug/kaplan2/issues |
| Maintainer | yann.regis-gianas@nomadic-labs.com |
| Dependencies |
|
| Source [http] | https://github.com/yurug/kaplan2/releases/download/0.2.0/ktdeque-0.2.0.tar.gz sha256=e534f4d5b1254822ea3267d7a084f32b40faefae22231d8079d76e95726b96e9 sha512=8907034ac5ae54250ae36ac51617c700e5beef0daf0afb68964e57a2b3e18e72b9d90f69867b979820e0f304e8241d2bc82f064612250008cd15de30dddcf4a6 |
| Edit | https://github.com/ocaml/opam-repository/tree/master/packages/ktdeque/ktdeque.0.2.0/opam |


