Mining temporal specifications from object usage

作者:Andrzej Wasylkowski, Andreas Zeller

摘要

A caller must satisfy the callee’s precondition—that is, reach a state in which the callee may be called. Preconditions describe the state that needs to be reached, but not how to reach it. We combine static analysis with model checking to mine Fair Computation Tree Logic (CTL F ) formulas that describe the operations a parameter goes through: “In parseProperties(String xml), the parameter xml normally stems from getProperties().” Such operational preconditions can be learned from program code, and the code can be checked for their violations. Applied to AspectJ, our Tikanga prototype found 169 violations of operational preconditions, uncovering 7 unique defects and 27 unique code smells—with 52% true positives in the 25% top-ranked violations.

论文关键词:Automatic defect detection, Mining specifications, Temporal logic, Computation Tree Logic, Program analysis

论文评审过程:

论文官网地址:https://doi.org/10.1007/s10515-011-0084-1