Toward general diagnosis of static errors

@article{Zhang2014TowardGD,
  title={Toward general diagnosis of static errors},
  author={Danfeng Zhang and Andrew C. Myers},
  journal={Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages},
  year={2014}
}
  • Danfeng Zhang, A. Myers
  • Published 8 January 2014
  • Computer Science
  • Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
We introduce a general way to locate programmer mistakes that are detected by static analyses such as type checking. The program analysis is expressed in a constraint language in which mistakes result in unsatisfiable constraints. Given an unsatisfiable system of constraints, both satisfiable and unsatisfiable constraints are analyzed, to identify the program expressions most likely to be the cause of unsatisfiability. The likelihood of different error explanations is evaluated under the… 

SHErrLoc: A Static Holistic Error Locator

The results show that when compared to existing compilers and other tools, SHErrLoc consistently identifies the location of programmer errors significantly more accurately, without any language-specific heuristics.

Leveraging Program Analysis for Type Inference

This thesis focuses on Liquid types, an advanced family of algorithms that combine classical typing disciplines and known static analyses to prove various safety properties of functional programs, and uses abstract interpretation to constructively design type inference algorithms.

Practical SMT-based type error localization

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.

General Type Error Diagnostics Using MaxSMT

The goal of this work is to provide high quality type error diagnostics that can help speed up the software development process.

Diagnosing type errors with class

It is shown that even with the highly expressive type system implemented by the Glasgow Haskell Compiler--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.

Efficient Counter-factual Type Error Debugging

  • Sheng ChenBaijun 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 type

Finding minimum type error sources

The approach works by reducing the search for minimum error sources to an optimization problem that is formulated in terms of weighted maximum satisfiability modulo theories (MaxSMT), which allows it to build on SMT solvers to support rich type systems and at the same time abstract from the concrete criterion that is used for ranking the error sources.

A practical framework for type inference error explanation

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.

Diagnosing Haskell Type Errors

It is shown that even with highly expressive type system implemented by the Glasgow Haskell Compiler—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.

Finding and Fixing Bugs in Liquid Haskell

This work presents algorithms for resolving verification failures by both finding bugs in implementations and also completing annotations in the refinement type framework, and presents a fault localization algorithm for finding likely bug locations when verification failure stems from a bug in the implementation.

References

SHOWING 1-10 OF 40 REFERENCES

Toward General Diagnosis of Static Errors: Technical Report

A general way to locate programmer mistakes that are detected by static analyses such as type checking, and shows that when compared to existing compilers and other tools, it identifies the location of programmer errors significantly more accurately.

Top quality type error Messages

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.

Repairing type errors in functional programs

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.

Counter-factual typing for debugging type errors

This work presents an approach to the problem of type debugging that is based on generating and filtering a comprehensive set of type-change suggestions and finds that it outperforms other approaches and provides a viable alternative.

Automated error diagnosis using abductive inference

The insight is that identifying missing facts is an instance of the abductive inference problem in logic, and a new algorithm is presented for computing the smallest and most general abductions in this setting.

From uncertainty to belief: inferring the specification within

A novel framework based on factor graphs for automatically inferring specifications directly from programs that can incorporate many disparate sources of evidence, allowing us to squeeze significantly more information from the authors' observations than previously published techniques.

Merlin: specification inference for explicit information flow problems

Merlin is proposed, a new approach for automatically inferring explicit information flow specifications from program code, which greatly reduce manual labor, and enhance the quality of results, while using tools that check for security violations caused by explicitly information flow.

From symptom to cause: localizing errors in counterexample traces

An algorithm is presented that exploits the existence of correct traces in order to localize the error cause in an error trace, report a single error trace per error cause, and generate multiple error traces having independent causes.

Finding the source of type errors

  • M. Wand
  • Computer Science
    POPL '86
  • 1986
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.

On the unification of substitutions in type inference

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.