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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fec4ad96-702c-4d38-808a-da6d08f98997Cited 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
- Example-guided synthesis of relational queriesAalok Thakkar, Aaditya Naik, Nathaniel Sands, Rajeev Alur et al.PLDI 2021 · 12 citations
- Specification-guided component-based synthesis from effectful librariesAshish Mishra, Suresh JagannathanOOPSLA 2022 · 7 citations
- Synthesizing SpecificationsKanghee Park, Loris D'Antoni, Thomas W. RepsOOPSLA 2023 · 9 citations
