We've Got You Covered: Type-Guided Repair of Incomplete Input Generators
Patrick LaFontaine, Zhe Zhou, Ashish Mishra, Suresh Jagannathan, Benjamin Delaware
Abstract
Property-based testing (PBT) is a popular technique for automatically testing semantic properties of a program, specified as a pair of pre- and post-conditions. The efficacy of this approach depends on being able to quickly generate inputs that meet the precondition, in order to maximize the set of program behaviors that are probed. For semantically rich preconditions, purely random generation is unlikely to produce many valid inputs; when this occurs, users are forced to manually write their own specialized input generators. One common problem with handwritten generators is that they may be incomplete , i.e., they are unable to generate some values meeting the target precondition. This paper presents a novel program repair technique that patches an incomplete generator so that its range includes every valid input. Our approach uses a novel enumerative synthesis algorithm that leverages the recently developed notion of coverage types to characterize the set of missing test values as well as the coverage provided by candidate repairs. We have implemented a repair tool for OCaml generators, called Cobb, and used it to repair a suite of benchmarks drawn from the PBT literature.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext efa24950-1caf-42c0-ab2c-a873e1779535Cited by top-tier papers2
- The Search for Constrained Random GeneratorsHarrison Goldstein, Hila Peleg, Cassia Torczon, Daniel Sainati et al.PLDI 2026 · 1 citation
- Trace-Guided Synthesis of Effectful Test GeneratorsZhe Zhou, Ankush Desai, Benjamin Delaware, Suresh JagannathanPLDI 2026 · 1 citation
Builds on18
- Using Lightweight Formal Methods to Validate a Key-Value Storage Node in Amazon S3James Bornholt, Rajeev Joshi, Vytautas Astrauskas, Brendan Cully et al.SOSP 2021 · 63 citations
- BUSTLE: Bottom-Up Program Synthesis Through Learning-Guided ExplorationAugustus Odena, Kensen Shi, David Bieber, Rishabh Singh et al.ICLR 2021 · 60 citations
- Program synthesis by type-guided abstraction refinementZheng Guo, Michael James, David Justo, Jiaxiao Zhou et al.POPL 2020 · 45 citations
- Bottom-up synthesis of recursive functional programs using angelic executionAnders Miltner, Adrian Trejo Nuñez, Ana Brendel, Swarat Chaudhuri et al.POPL 2022 · 38 citations
- Just-in-time learning for bottom-up enumerative synthesisShraddha Barke, Hila Peleg, Nadia PolikarpovaOOPSLA 2020 · 33 citations
Related papers
- Covering All the Bases: Type-Based Verification of Test Input GeneratorsZhe Zhou, Ashish Mishra, Benjamin Delaware, Suresh JagannathanPLDI 2023 · 7 citations
- PROPR: Property-Based Automatic Program RepairMatthías Páll Gissurarson, Leonhard Applis, Annibale Panichella, Arie van Deursen et al.ICSE 2022 · 13 citations
- Type error feedback via analytic program repairGeorgios Sakkas, Madeline Endres, Benjamin Cosman, Westley Weimer et al.PLDI 2020 · 24 citations
- PropCov: Effective Coverage Reporting for Property-Based TestingJesse Coultas, Joseph Wiseman, Luís PinaISSTA 2026
- Mostly Automated Proof Repair for Verified LibrariesKiran Gopinathan, Mayank Keoliya, Ilya SergeyPLDI 2023 · 11 citations
