kirancodes.me
To Proof Maintenance & Beyond!

Python predictive analysis for bug detection

Zhaogui Xu, Peng Liu, Xiangyu Zhang, Baowen Xu

Abstract

Python is a popular dynamic language that allows quick software development. However, Python program analysis engines are largely lacking. In this paper, we present a Python predictive analysis. It first collects the trace of an execution, and then encodes the trace and unexecuted branches to symbolic constraints. Symbolic variables are introduced to denote input values, their dynamic types, and attribute sets, to reason about their variations. Solving the constraints identifies bugs and their triggering inputs. Our evaluation shows that the technique is highly effective in analyzing real-world complex programs with a lot of dynamic features and external library calls, due to its sophisticated encoding design based on traces. It identifies 46 bugs from 11 real-world projects, with 16 new bugs. All reported bugs are true positives.

BibTeX
@inproceedings{Xu-al:FSE16,
  author    = {Zhaogui Xu and
               Peng Liu and
               Xiangyu Zhang and
               Baowen Xu},
  title     = {Python predictive analysis for bug detection},
  booktitle = {FSE},
  pages     = {121--132},
  publisher = {{ACM}},
  year      = {2016},
}

Related papers