pith. machine review for the scientific record. sign in

arxiv: 2511.12253 · v2 · submitted 2025-11-15 · 💻 cs.PL

Recognition: unknown

The Search for Constrained Random Generators

Benjamin C. Pierce, Cassia Torczon, Daniel Sainati, Harrison Goldstein, Hila Peleg, Leonidas Lampropoulos

Authors on Pith no claims yet
classification 💻 cs.PL
keywords valuessynthesisgeneratorsproblemalgorithmconstrainedimplementationlean
0
0 comments X
read the original abstract

Among the biggest challenges in property-based testing (PBT) is the constrained random generation problem: given a predicate on program values, randomly sample from the set of all values satisfying that predicate, and only those values. Efficient solutions to this problem are critical, since the executable specifications used by PBT often have preconditions that input values must satisfy in order to be valid test cases, and satisfying values are often sparsely distributed. We propose a novel approach to this problem using ideas from deductive program synthesis. We present a set of synthesis rules, based on a denotational semantics of generators, that give rise to an automatic procedure for synthesizing correct generators. Our system handles recursive predicates by rewriting them as catamorphisms and then matching with appropriate anamorphisms; this is theoretically simpler than other approaches to synthesis for recursive functions, yet still extremely expressive. Our implementation, Palamedes, is an extensible library for the Lean theorem prover. The synthesis algorithm itself is built on standard proof-search tactics, reducing implementation burden and allowing the algorithm to benefit from further advances in Lean proof automation.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Certified Program Synthesis with a Multi-Modal Verifier

    cs.SE 2026-04 unverdicted novelty 7.0

    LeetProof achieves higher rates of fully certified program synthesis from natural language by using a multi-modal verifier in Lean to validate specifications via randomized testing and delegate proofs to AI tools, out...