package ktdeque

  1. Overview
  2. No Docs
Kaplan-Tarjan persistent real-time deque, with O(1) catenation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ktdeque-0.2.0.tar.gz
sha256=e534f4d5b1254822ea3267d7a084f32b40faefae22231d8079d76e95726b96e9
sha512=8907034ac5ae54250ae36ac51617c700e5beef0daf0afb68964e57a2b3e18e72b9d90f69867b979820e0f304e8241d2bc82f064612250008cd15de30dddcf4a6

Description

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 (deque_wc_o1_) and the section-6 catenable deque (cat_keystone_ + 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.

Dependencies (2)

  1. dune >= "3.22"
  2. ocaml >= "4.14"

Dev Dependencies (3)

  1. odoc with-doc
  2. qcheck-core with-test
  3. qcheck with-test

Used by

None

Conflicts

None