Skip to main content

Toward general diagnosis of static errors

Publication ,  Conference
Zhang, D; Myers, AC
Published in: Conference Record of the Annual ACM Symposium on Principles of Programming Languages
February 11, 2014

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 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 for two very different program analyses: type inference in OCaml and information flow checking in Jif. 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, the general technique identifies the location of programmer errors significantly more accurately. © 2014 ACM.

Duke Scholars

Altmetric Attention Stats
Dimensions Citation Stats

Published In

Conference Record of the Annual ACM Symposium on Principles of Programming Languages

DOI

ISSN

0730-8566

Publication Date

February 11, 2014

Start / End Page

569 / 581
 

Citation

APA
Chicago
ICMJE
MLA
NLM
Zhang, D., & Myers, A. C. (2014). Toward general diagnosis of static errors. In Conference Record of the Annual ACM Symposium on Principles of Programming Languages (pp. 569–581). https://doi.org/10.1145/2535838.2535870
Zhang, D., and A. C. Myers. “Toward general diagnosis of static errors.” In Conference Record of the Annual ACM Symposium on Principles of Programming Languages, 569–81, 2014. https://doi.org/10.1145/2535838.2535870.
Zhang D, Myers AC. Toward general diagnosis of static errors. In: Conference Record of the Annual ACM Symposium on Principles of Programming Languages. 2014. p. 569–81.
Zhang, D., and A. C. Myers. “Toward general diagnosis of static errors.” Conference Record of the Annual ACM Symposium on Principles of Programming Languages, 2014, pp. 569–81. Scopus, doi:10.1145/2535838.2535870.
Zhang D, Myers AC. Toward general diagnosis of static errors. Conference Record of the Annual ACM Symposium on Principles of Programming Languages. 2014. p. 569–581.

Published In

Conference Record of the Annual ACM Symposium on Principles of Programming Languages

DOI

ISSN

0730-8566

Publication Date

February 11, 2014

Start / End Page

569 / 581