paper

A Word Sampler for Well-Typed Functions

arXiv:2512.01036

Abstract

We describe an exact sampler for a simply-typed, first-order functional programming language. Given an acyclic finite automaton, , it samples a random function uniformly without replacement from well-typed functions in . 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. , while retaining the robust metatheory of formal languages.

2 pages

A Word Sampler for Well-Typed Functions · wovepaper