Triemaps that match
Programming Languages
2024-11-12 v3
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.
Keywords
Cite
@article{arxiv.2302.08775,
title = {Triemaps that match},
author = {Simon Peyton Jones and Sebastian Graf},
journal= {arXiv preprint arXiv:2302.08775},
year = {2024}
}
Comments
Rejected from ICFP 2022; lack of novelty, too heavy on code that is "tiresome boilerplate". Accepted for a Festschrift in honour of Alan Mycroft