xavierleroy / canonical-binary-tries

Coq development accompanying the paper "Efficient Extensional Binary Tries"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Canonical Binary Trees, the Coq development

This is the Coq development accompanying the paper Efficient Extensional Binary Trees by Andrew W. Appel and Xavier Leroy, 2021-2022.

Implementations of binary tries (finite maps indexed by positive numbers)

  • Canonical.v: the new, extensional implementation of binary tries, using a canonical first-order representation.
  • Original.v: the simple, non-extensional implementation of binary tries used in CompCert 3.9 and earlier.
  • Node01.v: a minor variant of the Original implementation, slightly more compact but still not extensional, used mostly for benchmarking.
  • Sigma.v: an extensional but not very efficient implementation of binary tries obtained by wrapping the Original implementation in a sigma-type.
  • GADT.v: another extensional but not very efficient implementation of binary tries that uses GADTs and dependent types.
  • Patricia.v: binary Patricia trees from section 12.3 of Functional algorithms, verified! by T. Nipkow et al. About as efficient as the Canonical implementation but not extensional.

Implementations of dictionaries (finite maps indexed by character strings)

  • CharTrie.v: a trie data structure with sparse, 256-degree nodes that branch on the next character of the string.

Benchmarking

Do make coqbench to measure the execution speed within Coq.

Do make ocamlbench to measure execution speed after extraction to OCaml.

See the paper for a description and analysis of the benchmarks.

About

Coq development accompanying the paper "Efficient Extensional Binary Tries"

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Coq 94.3%Language:Makefile 5.1%Language:OCaml 0.6%