Searching for type-error messages

@inproceedings{Lerner2007SearchingFT,
  title={Searching for type-error messages},
  author={Benjamin S. Lerner and M. Flower and D. Grossman and C. Chambers},
  booktitle={PLDI '07},
  year={2007}
}
Advanced type systems often need some form of type inference to reduce the burden of explicit typing, but type inference often leads to poor error messages for ill-typed programs. This work pursues a new approach to constructing compilers and presenting type-error messages in which the type-checker itself does not produce the messages. Instead, it is an oracle for a search procedure that finds similar programs that do type-check. Our two-fold goal is to improve error messages while simplifying… Expand
Improving Error Messages in Type System
TLDR
This work proposes a type inference algorithm for a polymorphic type system which provides improved error messages and argues that this algorithm is more efficient than those in the literature when there are more than two conflicting types in the given expression. Expand
Type debugging with counter-factual type error messages using an existing type checker
TLDR
A new solution is proposed that provides counter-factual type error messages; these messages state what types specific subexpressions in a program should have (in contrast to the types they actually have) to remove a type error. Expand
A practical framework for type inference error explanation
TLDR
This work shows how to produce correcting set-based error reports by leveraging existing type inference implementations, easing the burden of adoption and, as type inference algorithms tend to be efficient in practice, producing error reports of comparable quality to similar error reporting tools orders of magnitude faster. Expand
General Type Error Diagnostics Using MaxSMT
Automatic type inference is a popular feature of functional programming languages. Unfortunately, if the compiler cannot infer a correct typing of a program, the produced error message does notExpand
Learning user friendly type-error messages
TLDR
L Learnskell is a type error debugger that uses machine learning to help diagnose and deliver high quality error messages, for programs that contain nonstructural errors, and it is found that it scales to large programs. Expand
Decrypting Local Type Inference
TLDR
This thesis designs an algorithm that backtracks through the nodes of type derivation trees in order to discover the typing decisions that introduce the types for the first time during the type inference process, and is the first to address the problem of type errors for programming languages that use local type inference. Expand
Constraint-Free Type Error Slicing
TLDR
This work shows how to produce useful type error slices with an unmodified type checker and implements this technique on top of the Glasgow Haskell Compiler and reports on the experiences. Expand
Enumerating Counter-Factual Type Error Messages with an Existing Type Checker
TLDR
A method is presented that uses a standard type checker to enumerate locations that potentially cause the type error, each with an actual and a counter-factual type for the given location. Expand
Practical SMT-based type error localization
TLDR
A new algorithm is presented that efficiently finds an optimal error source in a given ill-typed program by using an improved SMT encoding to cope with the high complexity of polymorphic typing by iteratively expanding the typing constraints from which principal types are derived. Expand
Efficient Counter-factual Type Error Debugging
  • Sheng Chen, Baijun Wu
  • Computer Science
  • 2019 International Symposium on Theoretical Aspects of Software Engineering (TASE)
  • 2019
Type inference is an important part of functional programming languages and has been increasingly adopted to imperative programming. However, providing effective error messages in response to typeExpand
...
1
2
3
4
5
...

References

SHOWING 1-10 OF 27 REFERENCES
Typeview: A Tool for Understanding Type Errors
TLDR
An interactive tool is implemented that allows programmers to browse through the source code of their program and query the types of each expression to help finding the origin of type errors without detailed knowledge of type inference on the user side. Expand
Seminal: searching for ML type-error messages
We present a new way to generate type-error messages in a polymorphic, implicitly, and strongly typed language (specifically Caml). Our method separates error-message generation from type-checking byExpand
Explaining type errors in polymorphic languages
TLDR
This paper describes an approach that maintains the deductive steps of type inference and the reasons for type instantiations that could be used in an interactive system to guide the programmer to the source of a type error or to explain why the compiler assigned a particular type to an expression. Expand
Debugging Type Errors (Full version)
TLDR
It is argued that an extended type definition, which assigns types to open expressions as well as closed expressions, can serve as the basis for a programming environment that helps programmers debug type errors. Expand
Explaining Type Inference
TLDR
A modification of the unification algorithm used in Hindley-Milner type inference is presented, which allows the specific reasoning which led to a program variable having a particular type to be recorded for type explanation. Expand
On the unification of substitutions in type inference
TLDR
A new operation is introduced which allows greater control over the use of substitutions so that this bias can be removed in type inference algorithms so that clearer error messages may then be produced. Expand
On the Unification of Substitutions in Type Interfaces
TLDR
A new operation is introduced which allows greater control over the use of substitutions so that this bias can be removed in type inference algorithms. Expand
Top quality type error Messages
TLDR
This thesis is entirely devoted to improve the type error messages for a functional programming language, and proposes a set of type inference directives to personalize the type inference process even further. Expand
Repairing type errors in functional programs
TLDR
This thesis examines the problem of producing more helpful error messages for ill-typed programs written in programming languages with a Hindley-Milner typing discipline, and investigates type inference algorithms which infer types in different orders and the ability of these to produce more meaningful error messages. Expand
Finding the source of type errors
  • M. Wand
  • Computer Science
  • POPL '86
  • 1986
TLDR
An algorithm is described which appears to be quite helpful in isolating and explaining the source of type errors by keeping track of the reasons the type-checker makes deductions about the types of variables. Expand
...
1
2
3
...