Digging for Fold: Synthesis-Aided API Discovery for Haskell
summary
A synthesis-backed search called Hoogle Plus indexes popular Haskell libraries and synthesizes compositions that match either a provided type or inferred types from input/output tests using a lattice-based generalization algorithm; it filters out useless results via property-based testing with SmallCheck and generates distinguishing examples and docs for each candidate. A 30-person study shows it boosts snippet completion by 51% increase and reduces median solve time (completed tasks) by about 15 seconds overall, larger on some tasks.
AI-written summary · about
chapters (28)
- 0:00Intro
- 0:12Programmers don't want to repeat code themselves
- 0:23API Discovery Problem
- 0:36Haskell makes this harder
- 0:59Haskell has Hoogle
- 1:36Running Example
- 3:36Outline
- 4:11Specifying dedup Type Query
- 4:37Challenge: How to infer likely type specifications
- 4:58Searching for a type
- 5:26Search or a type
- 5:41Search for a type
- 5:58Filtering types
- 7:04Ranking Types
- 7:14Types from Tests
- 7:45Filtering Programs Type Query
- 8:35Filtering Programs - Smallcheck
- 8:50Filtering Programs - Hoogle+
- 9:12Filtered Search
- 9:37Without aid
- 9:59Hoogle+'s UI
- 11:01User Study
- 11:3830 Participants
- 12:02Task Flow
- 12:44What is a task?
- 13:57How did users give their specification?
- 14:44Specification among novices
- 15:16Conclusion
related talks
20mTowards Generic Type Checking Implementations in Haskell via Second-Order Abstract Syntax
55mModern Software Development with Haskell
42mSuggesting Valid Substitutions For Typed Holes
20mInteractive Haskell Type Inference Exploration (Extended Abstract)
17mTowards Generic Higher-Order Unification Implementations in Haskell
29mType Inference Techniques: Implementation and Formalization, Better Together
24mTop-Down Synthesis for Library Learning
38mRefactoring Recursion
