Bennet: Randomized Specification Testing for Heap-Manipulating Programs
Zain K. Aamer, Benjamin C. Pierce
摘要
Property-based testing (PBT), widely used in functional languages and interactive theorem provers, works by randomly generating many inputs to a system under test. While PBT has also seen some use in low-level languages like C, users in this setting must craft all their own generators by hand, rather than letting the tool synthesize most generators automatically from types or logical specifications. For low-level code with complex memory ownership patterns, writing such generators can waste significant amounts of time.
CN, a specification and verification framework for C, features a streamlined presentation of separation logic that is specially tuned to present only "easy" logical problems to an underlying constraint solver. Prior work on the Fulminate testing framework has shown that CN's streamlined specifications can also be checked effectively at run time, providing an oracle for testing whether a memory state satisfies a pre-or postcondition.
We show that the restricted syntax of CN is also a good basis for deriving generators for random inputs satisfying separation-logic preconditions. We formalize the semantics for a DSL describing these generators, as well as optimizations that reorder when values are generated and propagate arithmetic constraints. Using this DSL, we implement a property-based testing tool, Bennet, that generates and runs random tests for C functions annotated with CN specifications. We evaluate Bennet on a corpus of programs with CN specifications and show that it can efficiently generate bug-revealing inputs for heap-manipulating programs with complex preconditions.
CCS Concepts: • Software and its engineering → General programming languages; Software testing and debugging.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper19
- Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 被引用 1,026 次
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei 等CCS 2018 · 被引用 753 次
- REDQUEEN: Fuzzing with Input-to-State CorrespondenceCornelius Aschermann, Sergej Schumilo, Tim Blazytko, Robert Gawlik 等NDSS 2019 · 被引用 413 次
- GRIMOIRE: Synthesizing Structure while FuzzingTim Blazytko, Cornelius Aschermann, Moritz Schlögel, Ali Abbasi 等USENIX Security 2019 · 被引用 123 次
- Boosting fuzzer efficiency: an information theoretic perspectiveMarcel Böhme, Valentin J. M. Manès, Sang Kil ChaFSE 2020 · 被引用 115 次
相关 Paper
- Random Testing via Runtime Abstract InterpretationZain K Aamer, Benjamin C. PierceOOPSLA 2026 · 被引用 1 次
- Fulminate: Testing CN Separation-Logic Specifications in CRini Banerjee, Kayvan Memarian, Dhruv C. Makwana, Christopher Pulte 等POPL 2025 · 被引用 6 次
- The Search for Constrained Random GeneratorsHarrison Goldstein, Hila Peleg, Cassia Torczon, Daniel Sainati 等PLDI 2026 · 被引用 1 次
- Programming and execution models for parallel bounded exhaustive testingNader Al Awar, Kush Jain, Christopher J. Rossbach, Milos GligoricOOPSLA 2021 · 被引用 4 次
- We've Got You Covered: Type-Guided Repair of Incomplete Input GeneratorsPatrick LaFontaine, Zhe Zhou, Ashish Mishra, Suresh Jagannathan 等OOPSLA 2025 · 被引用 1 次
