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, and only values, satisfying that predicate. 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 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 out of standard proof-search tactics, reducing implementation burden and allowing the algorithm to benefit from further advances in Lean proof automation.
Thu 18 JunDisplayed time zone: Mountain Time (US & Canada) change
14:00 - 15:20 | Generative Testing and Program SynthesisPLDI Research Papers at Flatirons 2 Chair(s): Stefan K. Muller University of Connecticut | ||
14:00 20mTalk | [SIGPLAN OOPSLA’25] Scalable and Accurate Application-Level Crash-Consistency Testing via Representative Testing PLDI Research Papers Yile Gu University of Washington, Ian Neal University of Michigan and Veridise, Jiexiao Xu University of Washington, Shaun Christopher Lee University of Washington, Ayman Said University of Michigan, Musa Haydar University of Michigan, Jacob Van Geffen , Andrew Quinn University of California at Santa Cruz, Baris Kasikci University of Washington | ||
14:20 20mTalk | Trace-Guided Synthesis of Effectful Test Generators PLDI Research Papers Zhe Zhou Purdue University, Ankush Desai Snowflake, Benjamin Delaware Purdue University, Suresh Jagannathan Purdue University DOI | ||
14:40 20mTalk | Semantic Reification: A New Paradigm for Random Program Generation PLDI Research Papers Kavya Chopra ETH Zurich, Cong Li ETH Zurich, Thodoris Sotiropoulos ETH Zurich, Zhendong Su ETH Zurich DOI Pre-print | ||
15:00 20mTalk | The Search for Constrained Random Generators PLDI Research Papers Harrison Goldstein SUNY Buffalo, Hila Peleg Technion, Cassia Torczon University of Pennsylvania, Daniel Sainati University of Pennsylvania, Leonidas Lampropoulos University of Maryland at College Park, Benjamin C. Pierce University of Pennsylvania DOI | ||