作者
Michael B James, Zheng Guo, Ziteng Wang, Shivani Doshi, Hila Peleg, Ranjit Jhala, Nadia Polikarpova
发表日期
2020/11/13
期刊
Proceedings of the ACM on Programming Languages
卷号
4
期号
OOPSLA
页码范围
1-27
出版商
ACM
简介
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 …
引用总数
学术搜索中的文章
MB James, Z Guo, Z Wang, S Doshi, H Peleg, R Jhala… - Proceedings of the ACM on Programming Languages, 2020