Fair intersection of seekable iterators
Programming Languages
2025-10-31 v1
Abstract
miniKanren's key semantic advance over Prolog is to implement a complete yet efficient search strategy, fairly interleaving execution between disjuncts. This fairness is accomplished by bounding how much work is done exploring one disjunct before switching to the next. We show that the same idea -- fairness via bounded work -- underlies an elegant compositional approach to implementing worst-case optimal joins using a seekable iterator interface, suitable for shallow embedding in functional languages.
Keywords
Cite
@article{arxiv.2510.26016,
title = {Fair intersection of seekable iterators},
author = {Michael Arntzenius},
journal= {arXiv preprint arXiv:2510.26016},
year = {2025}
}
Comments
8 pages, 2 figures, published in miniKanren 2025