English

Polymorphic Bottom-Up Weighted Relational Programming

Programming Languages 2026-05-18 v1

Abstract

This work presents a new approach for implementing polymorphism for bottom-up relational languages, without monomorphization. We begin by introducing semiringKanren, a bottom-up weighted relational programming language. We extend this base language to support polymorphism. We describe a new method to compile polymorphic semiringKanren programs into non-polymorphic ones, based on equality patterns and large-enough instances of polymorphic relations. We prove the correctness of this method. Finally, we consider existing work and suggest directions for future research.

Cite

@article{arxiv.2605.15406,
  title  = {Polymorphic Bottom-Up Weighted Relational Programming},
  author = {Dmitri Volkov},
  journal= {arXiv preprint arXiv:2605.15406},
  year   = {2026}
}

Comments

54 pages, for associated repo see https://github.com/sporkl/semiringkanren