English

A Word Sampler for Well-Typed Functions

Programming Languages 2025-12-02 v1 Formal Languages and Automata Theory

Abstract

We describe an exact sampler for a simply-typed, first-order functional programming language. Given an acyclic finite automaton, α\alpha_{\varnothing}, it samples a random function uniformly without replacement from well-typed functions in L(α)\mathcal{L}(\alpha_{\varnothing}). This is achieved via a fixed-parameter tractable reduction from a syntax-directed type system to a context-free grammar, preserving type soundness and completeness w.r.t. L(α)\mathcal{L}(\alpha_{\varnothing}), while retaining the robust metatheory of formal languages.

Keywords

Cite

@article{arxiv.2512.01036,
  title  = {A Word Sampler for Well-Typed Functions},
  author = {Breandan Considine},
  journal= {arXiv preprint arXiv:2512.01036},
  year   = {2025}
}

Comments

2 pages

R2 v1 2026-07-01T08:02:35.835Z