Digging for fold: synthesis-aided API discovery for Haskell
Michael B. James, Zheng Guo, Ziteng Wang, Shivani Doshi, Hila Peleg, Ranjit Jhala, Nadia Polikarpova
Abstract
We present Hoogle+, a web-based API discovery tool for Haskell. A Hoogle+ user can specify a programming task using either a type, a set of input-output tests, or both. Given a specification, the tool returns a list of matching programs composed from functions in popular Haskell libraries, and annotated with automatically-generated examples of their behavior. These features of Hoogle+ are powered by three novel techniques. First, to enable efficient type-directed synthesis from tests only, we develop an algorithm that infers likely type specifications from tests . Second, to return high-quality programs even with ambiguous specifications, we develop a technique that automatically eliminates meaningless and repetitive synthesis results . Finally, we show how to extend this elimination technique to automatically generate informative inputs that can be used to demonstrate program behavior to the user. To evaluate the effectiveness of Hoogle+ compared with traditional API search techniques, we perform a user study with 30 participants of varying Haskell proficiency. The study shows that programmers equipped with Hoogle+ generally solve tasks faster and were able to solve 50% more tasks overall.
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.
12 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Grounded Copilot: How Programmers Interact with Code-Generating Models cites LooPy: interactive program synthesis with control structures
- Grounded Copilot: How Programmers Interact with Code-Generating Models cites Wrex: A Unified Programming-by-Example Interaction for Synthesizing Readable Code for Data Scientists
- LooPy: interactive program synthesis with control structures cites Wrex: A Unified Programming-by-Example Interaction for Synthesizing Readable Code for Data Scientists
- Validating AI-Generated Code with Live Programming cites Grounded Copilot: How Programmers Interact with Code-Generating Models
- Validating AI-Generated Code with Live Programming cites Wrex: A Unified Programming-by-Example Interaction for Synthesizing Readable Code for Data Scientists
- Two Birds with One Stone: Boosting Code Generation and Code Search via a Generative Adversarial Network cites Grounded Copilot: How Programmers Interact with Code-Generating Models
Cited by top-tier papers12
- Grounded Copilot: How Programmers Interact with Code-Generating ModelsShraddha Barke, Michael B. James, Nadia PolikarpovaOOPSLA 2023 · 408 citations
- Validating AI-Generated Code with Live ProgrammingKasra Ferdowsi, Ruanqianqian (Lisa) Huang, Michael B. James, Nadia Polikarpova et al.CHI 2024 · 27 citations
- Two Birds with One Stone: Boosting Code Generation and Code Search via a Generative Adversarial NetworkShangwen Wang, Bo Lin, Zhensu Sun, Ming Wen et al.OOPSLA 2023 · 21 citations
- LooPy: interactive program synthesis with control structuresKasra Ferdowsifard, Shraddha Barke, Hila Peleg, Sorin Lerner et al.OOPSLA 2021 · 18 citations
- Type-directed program synthesis for RESTful APIsZheng Guo, David Cao, Davin Tjong, Jean Yang et al.PLDI 2022 · 15 citations
Builds on1
Related papers
- Program synthesis by type-guided abstraction refinementZheng Guo, Michael James, David Justo, Jiaxiao Zhou et al.POPL 2020 · 45 citations
- Supporting Web-Based API Searches in the IDE Using SignaturesNick C. Bradley, Thomas Fritz, Reid HolmesICSE 2024
- Specification-guided component-based synthesis from effectful librariesAshish Mishra, Suresh JagannathanOOPSLA 2022 · 7 citations
- Type-directed synthesis of visualizations from natural language queriesQiaochu Chen, Shankara Pailoor, Celeste Barnaby, Abby Criswell et al.OOPSLA 2022 · 15 citations
- PROPR: Property-Based Automatic Program RepairMatthías Páll Gissurarson, Leonhard Applis, Annibale Panichella, Arie van Deursen et al.ICSE 2022 · 13 citations
