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)~\emph{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)~\emph{predict} the appropriate template from a given error,
by training multi-class classifiers on the repair templates
used in the training set;
%
(3)~\emph{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 \textsc{Rite}: a type error reporting
tool for OCaml programs. We present an evaluation of the
\emph{accuracy} and \emph{efficiency} of \textsc{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 \emph{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.
Wed 17 JunDisplayed time zone: Pacific Time (US & Canada) change
08:00 - 09:00 | Synthesis IPLDI Research Papers at PLDI Research Papers live stream Chair(s): James Bornholt University of Texas at Austin | ||
08:00 20mTalk | Data-Driven Inference of Representation Invariants PLDI Research Papers Anders Miltner Princeton University, USA, Saswat Padhi University of California at Los Angeles, USA, Todd Millstein University of California at Los Angeles, USA, David Walker Princeton University, USA | ||
08:20 20mTalk | Type Error Feedback via Analytic Program Repair PLDI Research Papers Georgios Sakkas University of California at San Diego, USA, Madeline Endres University of Michigan, USA, Benjamin Cosman University of California at San Diego, USA, Westley Weimer University of Michigan, USA, Ranjit Jhala University of California at San Diego, USA | ||
08:40 20mTalk | Synthesizing Structured CAD Models with Equality Saturation and Inverse Transformations PLDI Research Papers Chandrakana Nandi University of Washington, USA, Max Willsey University of Washington, USA, Adam Anderson University of Washington, USA, James R. Wilcox Certora, USA, Eva Darulova MPI-SWS, Germany, Dan Grossman University of Washington, USA, Zachary Tatlock University of Washington, Seattle |