Covering All the Bases: Type-Based Verification of Test Input Generators
Zhe Zhou, Ashish Mishra, Benjamin Delaware, Suresh Jagannathan
Abstract
Test input generators are an important part of property-based testing (PBT) frameworks. Because PBT is intended to test deep semantic and structural properties of a program, the outputs produced by these generators can be complex data structures, constrained to satisfy properties the developer believes is most relevant to testing the function of interest. An important feature expected of these generators is that they be capable of producing all acceptable elements that satisfy the function's input type and generator-provided constraints. However, it is not readily apparent how we might validate whether a particular generator's output satisfies this coverage requirement. Typically, developers must rely on manual inspection and post-mortem analysis of test runs to determine if the generator is providing sufficient coverage; these approaches are error-prone and difficult to scale as generators become more complex. To address this important concern, we present a new refinement type-based verification procedure for validating the coverage provided by input test generators, based on a novel interpretation of types that embeds "must-style" underapproximate reasoning principles as a fundamental part of the type system. The types associated with expressions now capture the set of values guaranteed to be produced by the expression, rather than the typical formulation that uses types to represent the set of values an expression may produce. Beyond formalizing the notion of coverage types in the context of a rich core language with higher-order procedures and inductive datatypes, we also present a detailed evaluation study to justify the utility of our ideas.
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 4d9d0e25-d7c3-4419-bb4b-77f5a84289eaCited by top-tier papers6
- Refinement Type RefutationsRobin Webbers, Klaus von Gleissenthall, Ranjit JhalaOOPSLA 2024 · 3 citations
- A Complementary Approach to Incorrectness TypingCelia Mengyue Li, Sophie Pull, Steven RamsayPOPL 2026 · 2 citations
- Trace-Guided Synthesis of Effectful Test GeneratorsZhe Zhou, Ankush Desai, Benjamin Delaware, Suresh JagannathanPLDI 2026 · 1 citation
- We've Got You Covered: Type-Guided Repair of Incomplete Input GeneratorsPatrick LaFontaine, Zhe Zhou, Ashish Mishra, Suresh Jagannathan et al.OOPSLA 2025 · 1 citation
- Flexible and Expressive Typed Path Patterns for GQLWenjia Ye, Matías Toro, Tomás Díaz, Bruno C. d. S. Oliveira et al.OOPSLA 2025 · 1 citation
Builds on5
- Incorrectness logicPeter W. O'HearnPOPL 2020 · 122 citations
- Local Reasoning About the Presence of Bugs: Incorrectness Separation LogicAzalea Raad, Josh Berdine, Hoang-Hai Dang, Derek Dreyer et al.CAV 2020 · 70 citations
- Finding real bugs in big programs with incorrectness logicQuang Loc Le, Azalea Raad, Jules Villard, Josh Berdine et al.OOPSLA 2022 · 52 citations
- Data-driven abductive inference of library specificationsZhe Zhou, Robert Dickerson, Benjamin Delaware, Suresh JagannathanOOPSLA 2021 · 15 citations
- Specification-guided component-based synthesis from effectful librariesAshish Mishra, Suresh JagannathanOOPSLA 2022 · 7 citations
Related papers
- PropCov: Effective Coverage Reporting for Property-Based TestingJesse Coultas, Joseph Wiseman, Luís PinaISSTA 2026
- Quickly generating diverse valid test inputs with reinforcement learningSameer Reddy, Caroline Lemieux, Rohan Padhye, Koushik SenICSE 2020 · 30 citations
- Failing with Purpose: Dangling Coverage-Guided Negative Test Generation from a Mechanized P4 Type SystemJaehyun Lee, Seokhun Jeong, Sukyoung RyuFSE 2026
- The Search for Constrained Random GeneratorsHarrison Goldstein, Hila Peleg, Cassia Torczon, Daniel Sainati et al.PLDI 2026 · 1 citation
- Random Testing via Runtime Abstract InterpretationZain K Aamer, Benjamin C. PierceOOPSLA 2026 · 1 citation
