Table of Contents
Fetching ...

Triemaps that match

Simon Peyton Jones, Sebastian Graf

Abstract

The trie data structure is a good choice for finite maps whose keys are data structures (trees) rather than atomic values. But what if we want the keys to be patterns, each of which matches many lookup keys? Efficient matching of this kind is well studied in the theorem prover community, but much less so in the context of statically typed functional programming. Doing so yields an interesting new viewpoint -- and a practically useful design pattern, with good runtime performance.

Triemaps that match

Abstract

The trie data structure is a good choice for finite maps whose keys are data structures (trees) rather than atomic values. But what if we want the keys to be patterns, each of which matches many lookup keys? Efficient matching of this kind is well studied in the theorem prover community, but much less so in the context of statically typed functional programming. Doing so yields an interesting new viewpoint -- and a practically useful design pattern, with good runtime performance.
Paper Structure (35 sections, 2 equations, 3 figures, 3 tables)

This paper contains 35 sections, 2 equations, 3 figures, 3 tables.

Figures (3)

  • Figure 1: API for various library functions used in this work
  • Figure 2: De Bruijn leveling
  • Figure 3: Benchmarks comparing our trie map (TM) to ordered maps (OM) and hash maps (HM)