Lune

OOPSLA2025顶会

Tuning Random Generators: Property-Based Testing as Probabilistic Programming

Ryan Tjoa, Poorva Garg, Harrison Goldstein, Todd D. Millstein, Benjamin C. Pierce, Guy Van den Broeck

摘要

Property-based testing validates software against an executable specification by evaluating it on randomly generated inputs. The standard way that PBT users generate test inputs is via generators that describe how to sample test inputs through random choices. To achieve a good distribution over test inputs, users must tune their generators, i.e., decide on the weights of these individual random choices. Unfortunately, it is very difficult to understand how to choose individual generator weights in order to achieve a desired distribution, so today this process is tedious and limits the distributions that can be practically achieved.

In this paper, we develop techniques for the automatic and offline tuning of generators. Given a generator with undetermined symbolic weights and an objective function, our approach automatically learns values for these weights that optimize for the objective. We describe useful objective functions that allow users to ( 1) target desired distributions and (2) improve the diversity and validity of their test cases. We have implemented our approach in a novel discrete probabilistic programming system, Loaded Dice, that supports differentiation and parameter learning, and use it as a language for generators. We empirically demonstrate that our approach is effective at optimizing generator distributions according to the specified objective functions. We also perform a thorough evaluation on PBT benchmarks, demonstrating that, when automatically tuned for diversity and validity, the generators exhibit a 3.1-7.4× speedup in bug finding.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • GradInf: Gradient Estimation as Probabilistic Inference 引用了 Automatic Differentiation of Programs with Discrete Randomness
  • GradInf: Gradient Estimation as Probabilistic Inference 引用了 Scaling exact inference for discrete probabilistic programs
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper2

  1. GradInf: Gradient Estimation as Probabilistic InferenceGaurav Arya, Mathieu Huot, Moritz Schauer, Alexander K. Lew 等PLDI 2026
  2. Testing Theorems, Fully AutomaticallySegev Elazar Mittelman, Harrison Goldstein, Leonidas LampropoulosOOPSLA 2026

它引用的 Paper11

  1. Scaling exact inference for discrete probabilistic programsSteven Holtzen, Guy Van den Broeck, Todd D. MillsteinOOPSLA 2020 · 85 次引用
  2. Automatic Differentiation of Programs with Discrete RandomnessGaurav Arya, Moritz Schauer, Frank Schäfer, Christopher RackauckasNeurIPS 2022 · 56 次引用
  3. Input invariantsDominic Steinhöfel, Andreas ZellerFSE 2022 · 47 次引用
  4. Scallop: A Language for Neurosymbolic ProgrammingZiyang Li, Jiani Huang, Mayur NaikPLDI 2023 · 38 次引用
  5. Quickly generating diverse valid test inputs with reinforcement learningSameer Reddy, Caroline Lemieux, Rohan Padhye, Koushik SenICSE 2020 · 30 次引用

相关 Paper

  1. Fail Faster: Staging and Fast Randomness for High-Performance PBTCynthia Richey, Joseph W. Cutler, Harrison Goldstein, Benjamin C. PierceOOPSLA 2026 · 1 次引用
  2. The Search for Constrained Random GeneratorsHarrison Goldstein, Hila Peleg, Cassia Torczon, Daniel Sainati 等PLDI 2026 · 1 次引用
  3. Does a Program Yield the Right Distribution? - Verifying Probabilistic Programs via Generating FunctionsMingshuai Chen, Joost-Pieter Katoen, Lutz Klinkenberg, Tobias WinklerCAV 2022 · 14 次引用
  4. Programming and execution models for parallel bounded exhaustive testingNader Al Awar, Kush Jain, Christopher J. Rossbach, Milos GligoricOOPSLA 2021 · 4 次引用
  5. Bennet: Randomized Specification Testing for Heap-Manipulating ProgramsZain K. Aamer, Benjamin C. PierceOOPSLA 2025 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖