Abstract | ||
---|---|---|
We introduce Analytic Program Repair, a data-driven strategy for providing feedback for type-errors via repairs for the erroneous program. Our strategy is based on insight that similar errors have similar repairs. Thus, we show how to use a training dataset of pairs of ill-typed programs and their fixed versions to: (1) learn a collection of candidate repair templates by abstracting and partitioning the edits made in the training set into a representative set of templates; (2) predict the appropriate template from a given error, by training multi-class classifiers on the repair templates used in the training set; (3) synthesize a concrete repair from the template by enumerating and ranking correct (e.g. well-typed) terms matching the predicted template. We have implemented our approach in Rite: a type error reporting tool for OCaml programs. We present an evaluation of the accuracy and efficiency of Rite on a corpus of 4,500 ill-typed Ocaml programs drawn from two instances of an introductory programming course, and a user-study of the quality of the generated error messages that shows the locations and final repair quality to be better than the state-of-the-art tool in a statistically-significant manner.
|
Year | DOI | Venue |
---|---|---|
2020 | 10.1145/3385412.3386005 | PLDI '20: 41st ACM SIGPLAN International Conference on Programming Language Design and Implementation
London
UK
June, 2020 |
Keywords | DocType | ISBN |
Type Error Feedback, Program Synthesis, Program, Repair, Machine Learning | Conference | 978-1-4503-7613-6 |
Citations | PageRank | References |
1 | 0.35 | 0 |
Authors | ||
5 |
Name | Order | Citations | PageRank |
---|---|---|---|
Georgios Sakkas | 1 | 3 | 0.70 |
Madeline Endres | 2 | 3 | 3.07 |
Benjamin Cosman | 3 | 11 | 1.86 |
Westley Weimer | 4 | 3510 | 162.27 |
Ranjit Jhala | 5 | 2183 | 111.68 |