Type inference engines often give terrible error messages, and the more sophisticated the type system the worse the problem. We show that even with highly expressive type system implemented by the Glasgow Haskell Compiler (GHC)—including type classes, GADTs, and type families— it is possible to identify the most likely source of the type error, rather than the first source that the inference engine trips over. To determine which are the likely error sources, we apply a simple Bayesian model to a graph representa- tion of the typing constraints; the satisfiability or unsatis- fiability of paths within the graph provides evidence for or against possible explanations. While we build on prior work on error diagnosis for simpler type systems, inference in the richer type system of Haskell requires extending the graph with new nodes. The augmentation of the graph cre- ates challenges both for Bayesian reasoning and for ensuring termination. Using a large corpus of Haskell programs, we show that this error localization technique is practical and significantly improves accuracy over the state of the art.
Mon 15 JunDisplayed time zone: Tijuana, Baja California change
09:00 - 11:00 | Distinguished PapersResearch Papers at PLDI Main BLUE (Portland 254-255) Chair(s): Steve Blackburn Australian National University | ||
09:00 15mDay opening | Opening and Welcome Research Papers | ||
09:15 25mTalk | Automatically Improving Accuracy for Floating Point Expressions Research Papers Pavel Panchekha University of Washington, Alex Sanchez-Stern University of Washington, James R. Wilcox University of Washington, Zachary Tatlock University of Washington, Seattle Media Attached | ||
09:40 25mTalk | Diagnosing Type Errors with Class Research Papers Danfeng Zhang Cornell University, Andrew Myers , Dimitrios Vytiniotis Microsoft Research, Cambridge, Simon Peyton Jones Microsoft Research, Cambridge Media Attached | ||
10:05 25mTalk | Provably Correct Peephole Optimizations with Alive Research Papers Nuno P. Lopes Microsoft Research, David Menendez Rutgers University, Santosh Nagarakatte Rutgers University, John Regehr University of Utah Pre-print Media Attached | ||
10:30 20mTalk | One Minute Madness Research Papers |