Finding Minimum Type Error Sources

Zvonimir Pavlinovic, Tim King, Thomas Wies

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Automatic type inference is a popular feature of functional programming languages. If a program cannot be typed, the compiler reports the first location with a type conflict as the source of the error. However, this is often not the true error source. We present a general algorithm that helps to produce more meaningful type error reports. The algorithm finds all minimum error sources, where the definition of minimum is given by a compiler-specific ranking criterion (e.g. minimizing the program changes needed to fix the error). The approach works by reducing the search for minimum error sources to an optimization problem that we formulate in terms of weighted maximum satisfiability modulo theories (MaxSMT). This formulation allows us to build on SMT solvers to support rich type systems and, at the same time, abstract from the concrete ranking criterion. We have implemented an instance of our algorithm targeted at OCaml programs. Our evaluation shows that our approach significantly improves upon the quality of type error reports produced by state of the art compilers. This work appeared at OOPSLA 2014 where it won a Best Paper Award.

Original languageEnglish (US)
Title of host publicationSoftware Engineering and Management 2015
Subtitle of host publicationMultikonferenz der GI-Fachbereiche Softwaretechnik (SWT) und Wirtschaftsinformatik (WI), FA WI-MAW
EditorsUwe Assmann, Birgit Demuth, Thorsten Spitta, Georg Puschel, Ronny Kaiser
PublisherGesellschaft fur Informatik (GI)
Pages43-44
Number of pages2
ISBN (Electronic)9783885796336
StatePublished - 2015
EventSoftware Engineering and Management 2015: Multikonferenz der GI-Fachbereiche Softwaretechnik (SWT) und Wirtschaftsinformatik (WI), FA WI-MAW - Software Engineering and Management 2015: Multiconference of the GI Special Interest Groups Software Engineering (SWT) and Information Systems (WI), FA WI-MAW - Dresden, Germany
Duration: Mar 17 2015Mar 20 2015

Publication series

NameLecture Notes in Informatics (LNI), Proceedings - Series of the Gesellschaft fur Informatik (GI)
VolumeP-239
ISSN (Print)1617-5468

Conference

ConferenceSoftware Engineering and Management 2015: Multikonferenz der GI-Fachbereiche Softwaretechnik (SWT) und Wirtschaftsinformatik (WI), FA WI-MAW - Software Engineering and Management 2015: Multiconference of the GI Special Interest Groups Software Engineering (SWT) and Information Systems (WI), FA WI-MAW
Country/TerritoryGermany
CityDresden
Period3/17/153/20/15

ASJC Scopus subject areas

  • Computer Science Applications

Fingerprint

Dive into the research topics of 'Finding Minimum Type Error Sources'. Together they form a unique fingerprint.

Cite this