Program Sketching by Automatically Generating Mocks from Tests
Nate F. F. Bragg, Jeffrey S. Foster, Cody Roux, Armando Solar-Lezama
摘要
Abstract Sketch is a popular program synthesis tool that solves for unknowns in a sketch or partial program. However, while Sketch is powerful, it does not directly support modular synthesis of dependencies, potentially limiting scalability. In this paper, we introduce Sketcham, a new technique that modularizes a regular sketch by automatically generating mocks—functions that approximate the behavior of complete implementations—from the sketch’s test suite. For example, if the function f originally calls g, Sketcham creates a mock g m from g’s tests and augments the sketch with a version of f that calls g m . This change allows the unknowns in f and g to be solved separately, enabling modular synthesis with no extra work from the Sketch user. We evaluated Sketcham on ten benchmarks, performing enough runs to show at a 95% confidence level that Sketcham improves median synthesis performance on six of our ten benchmarks by a factor of up to 5 × compared to plain Sketch, including one benchmark that times out on Sketch, while exhibiting similar performance on the remaining four. Our results show that Sketcham can achieve modular synthesis by automatically generating mocks from tests.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper3
- Reconciling enumerative and deductive program synthesisKangjing Huang, Xiaokang Qiu, Peiyuan Shen, Yanjun WangPLDI 2020 · 被引用 46 次
- Synthesizing JIT Compilers for In-Kernel DSLsJacob Van Geffen, Luke Nelson, Isil Dillig, Xi Wang 等CAV 2020 · 被引用 27 次
- Synthesizing replacement classesMalavika Samak, Deokhwan Kim, Martin C. RinardPOPL 2020 · 被引用 14 次
相关 Paper
- Augmented example-based synthesis using relational perturbation propertiesShengwei An, Rishabh Singh, Sasa Misailovic, Roopsha SamantaPOPL 2020 · 被引用 7 次
- MockSniffer: Characterizing and Recommending Mocking Decisions for Unit TestsHengcheng Zhu, Lili Wei, Ming Wen, Yepang Liu 等ASE 2020 · 被引用 17 次
- Counterexample-Guided Inference of Modular SpecificationsWilliam T. Hallahan, Ranjit Jhala, Ruzica PiskacOOPSLA 2025 · 被引用 1 次
- VeriSketch: Synthesizing Secure Hardware Designs with Timing-Sensitive Information Flow PropertiesArmaiti Ardeshiricham, Yoshiki Takashima, Sicun Gao, Ryan KastnerCCS 2019 · 被引用 19 次
- Automating Pruning in Top-Down Enumeration for Program Synthesis Problems with Monotonic SemanticsKeith J. C. Johnson, Rahul Krishnan, Thomas W. Reps, Loris D'AntoniOOPSLA 2024 · 被引用 2 次
