Lune

PLDI2021Top-tier venue

RbSyn: type- and effect-guided program synthesis

Sankha Narayan Guria, Jeffrey S. Foster, David Van Horn

Abstract

In recent years, researchers have explored component-based synthesis, which aims to automatically construct programs that operate by composing calls to existing APIs. However, prior work has not considered efficient synthesis of methods with side effects, e.g., web app methods that update a database. In this paper, we introduce RbSyn, a novel type- and effect-guided synthesis tool for Ruby. An RbSyn synthesis goal is specified as the type for the target method and a series of test cases it must pass. RbSyn works by recursively generating well-typed candidate method bodies whose write effects match the read effects of the test case assertions. After finding a set of candidates that separately satisfy each test, RbSyn synthesizes a solution that branches to execute the correct candidate code under the appropriate conditions. We formalize RbSyn on a core, object-oriented language λsyn and describe how the key ideas of the model are scaled-up in our implementation for Ruby. We evaluated RbSyn on 19 benchmarks, 12 of which come from popular, open-source Ruby apps. We found that RbSyn synthesizes correct solutions for all benchmarks, with 15 benchmarks synthesizing in under 9 seconds, while the slowest benchmark takes 83 seconds. Using observed reads to guide synthesize is effective: using type-guidance alone times out on 10 of 12 app benchmarks. We also found that using less precise effect annotations leads to worse synthesis performance. In summary, we believe type- and effect-guided synthesis is an important step forward in synthesis of effectful methods from test cases.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Program Synthesis from Partial Traces cites Control-Flow Deobfuscation using Trace-Informed Compositional Program Synthesis
  • Specification-guided component-based synthesis from effectful libraries cites Digging for fold: synthesis-aided API discovery for Haskell
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Specification-guided component-based synthesis from effectful librariesAshish Mishra, Suresh JagannathanOOPSLA 2022 · 7 citations
  2. Absynthe: Abstract Interpretation-Guided SynthesisSankha Narayan Guria, Jeffrey S. Foster, David Van HornPLDI 2023 · 6 citations
  3. Control-Flow Deobfuscation using Trace-Informed Compositional Program SynthesisBenjamin Mariano, Ziteng Wang, Shankara Pailoor, Christian S. Collberg et al.OOPSLA 2024 · 5 citations
  4. Automated Translation of Functional Big Data Queries to SQLGuoqiang Zhang, Benjamin Mariano, Xipeng Shen, Isil DilligOOPSLA 2023 · 5 citations
  5. Program Synthesis from Partial TracesMargarida Ferreira, Victor Nicolet, Joey Dodds, Daniel KroeningPLDI 2025 · 2 citations

Builds on2

  1. Effects as capabilities: effect handlers and lightweight effect polymorphismJonathan Immanuel Brachthäuser, Philipp Schuster, Klaus OstermannOOPSLA 2020 · 62 citations
  2. Digging for fold: synthesis-aided API discovery for HaskellMichael B. James, Zheng Guo, Ziteng Wang, Shivani Doshi et al.OOPSLA 2020 · 19 citations

Related papers

  1. Type-directed program synthesis for RESTful APIsZheng Guo, David Cao, Davin Tjong, Jean Yang et al.PLDI 2022 · 15 citations
  2. Leveraging Rust Types for Program SynthesisJonás Fiala, Shachar Itzhaky, Peter Müller, Nadia Polikarpova et al.PLDI 2023 · 17 citations
  3. Combining the top-down propagation and bottom-up enumeration for inductive program synthesisWoosuk LeePOPL 2021 · 34 citations
  4. Just-in-time learning for bottom-up enumerative synthesisShraddha Barke, Hila Peleg, Nadia PolikarpovaOOPSLA 2020 · 33 citations
  5. Trace-Guided Synthesis of Effectful Test GeneratorsZhe Zhou, Ankush Desai, Benjamin Delaware, Suresh JagannathanPLDI 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines