kirancodes.me
To Proof Maintenance & Beyond!

Bayesian specification learning for finding API usage errors

Vijayaraghavan Murali, Swarat Chaudhuri, Chris Jermaine

Abstract

We present a Bayesian framework for learning probabilistic specifications from large, unstructured code corpora, and then using these specifications to statically detect anomalous, hence likely buggy, program behavior. Our key insight is to build a statistical model that correlates all specifications hidden inside a corpus with the syntax and observed behavior of programs that implement these specifications. During the analysis of a particular program, this model is conditioned into a posterior distribution that prioritizes specifications that are relevant to the program. The problem of finding anomalies is now framed quantitatively, as a problem of computing a distance between a "reference distribution" over program behaviors that our model expects from the program, and the distribution over behaviors that the program actually produces.

BibTeX
@inproceedings{Murali-al:FSE17,
  author    = {Vijayaraghavan Murali and
               Swarat Chaudhuri and
               Chris Jermaine},
  title     = {Bayesian specification learning for finding {API} usage errors},
  booktitle = {{ESEC/SIGSOFT} {FSE}},
  pages     = {151--162},
  publisher = {{ACM}},
  year      = {2017},
}

Related papers