Title
Digging for fold: synthesis-aided API discovery for Haskell
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.
Year
DOI
Venue
2020
10.1145/3428273
Proceedings of the ACM on Programming Languages
Keywords
DocType
Volume
Human-Computer Interaction,Program Synthesis,Type Inference
Journal
4
Issue
ISSN
Citations 
OOPSLA
2475-1421
0
PageRank 
References 
Authors
0.34
0
7
Name
Order
Citations
PageRank
Michael B. James100.34
Zheng Guo211.07
Ziteng Wang3175.55
Shivani Doshi400.34
Hila Peleg501.69
Ranjit Jhala62183111.68
Nadia Polikarpova716916.60