Skip to main content

SHErrLoc: A static holistic error locator

Publication ,  Journal Article
Zhang, D; Myers, AC; Vytiniotis, D; Peyton-Jones, S
Published in: ACM Transactions on Programming Languages and Systems
August 1, 2017

We introduce a general way to locate programmer mistakes that are detected by static analyses. The program analysis is expressed in a general constraint language that is powerful enough to model type checking, information flow analysis, dataflow analysis, and points-to analysis. Mistakes in program analysis 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 assumption that the programmer's code is mostly correct, so the simplest explanations are chosen, following Bayesian principles. For analyses that rely on programmer-stated assumptions, the diagnosis also identifies assumptions likely to have been omitted. The new error diagnosis approach has been implemented as a tool called SHErrLoc, which is applied to three very different program analyses, such as type inference for a highly expressive type system implemented by the Glasgow Haskell Compiler-including type classes, Generalized Algebraic Data Types (GADTs), and type families. The effectiveness of the approach is evaluated using previously collected programs containing errors. 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.

Duke Scholars

Altmetric Attention Stats
Dimensions Citation Stats

Published In

ACM Transactions on Programming Languages and Systems

DOI

EISSN

1558-4593

ISSN

0164-0925

Publication Date

August 1, 2017

Volume

39

Issue

4

Related Subject Headings

  • Software Engineering
  • 4612 Software engineering
  • 4606 Distributed computing and systems software
  • 0806 Information Systems
  • 0803 Computer Software
 

Citation

APA
Chicago
ICMJE
MLA
NLM
Zhang, D., Myers, A. C., Vytiniotis, D., & Peyton-Jones, S. (2017). SHErrLoc: A static holistic error locator. ACM Transactions on Programming Languages and Systems, 39(4). https://doi.org/10.1145/3121137
Zhang, D., A. C. Myers, D. Vytiniotis, and S. Peyton-Jones. “SHErrLoc: A static holistic error locator.” ACM Transactions on Programming Languages and Systems 39, no. 4 (August 1, 2017). https://doi.org/10.1145/3121137.
Zhang D, Myers AC, Vytiniotis D, Peyton-Jones S. SHErrLoc: A static holistic error locator. ACM Transactions on Programming Languages and Systems. 2017 Aug 1;39(4).
Zhang, D., et al. “SHErrLoc: A static holistic error locator.” ACM Transactions on Programming Languages and Systems, vol. 39, no. 4, Aug. 2017. Scopus, doi:10.1145/3121137.
Zhang D, Myers AC, Vytiniotis D, Peyton-Jones S. SHErrLoc: A static holistic error locator. ACM Transactions on Programming Languages and Systems. 2017 Aug 1;39(4).

Published In

ACM Transactions on Programming Languages and Systems

DOI

EISSN

1558-4593

ISSN

0164-0925

Publication Date

August 1, 2017

Volume

39

Issue

4

Related Subject Headings

  • Software Engineering
  • 4612 Software engineering
  • 4606 Distributed computing and systems software
  • 0806 Information Systems
  • 0803 Computer Software