Mining temporal specifications from object usage

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 Computation Tree Logic (CTL) 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 189 violations of operational preconditions, uncovering 9 unique defects and 36 unique code smells---with 44% true positives in the 50 top-ranked violations.

[1]  Manuvir Das,et al.  Perracotta: mining temporal API rules from imperfect traces , 2006, ICSE.

[2]  William G. Griswold,et al.  Dynamically discovering likely program invariants to support program evolution , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[3]  Andrzej Wasylkowski Object Usage: Patterns and Anomalies , 2010 .

[4]  Andreas Zeller,et al.  Lightweight Defect Localization for Java , 2005, ECOOP.

[5]  James R. Larus,et al.  Mining specifications , 2002, POPL '02.

[6]  Pavol Cerný,et al.  Synthesis of interface specifications for Java classes , 2005, POPL '05.

[7]  Zhendong Su,et al.  Javert: fully automatic mining of general temporal properties from dynamic traces , 2008, SIGSOFT '08/FSE-16.

[8]  Tao Xie,et al.  Alattin: Mining Alternative Patterns for Detecting Neglected Conditions , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[9]  Amer Diwan,et al.  Discovering Algebraic Specifications from Java Classes , 2003, ECOOP.

[10]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[11]  George C. Necula,et al.  Mining Temporal Specifications for Error Detection , 2005, TACAS.

[12]  Nikolai Tillmann,et al.  DySy: dynamic symbolic execution for invariant inference , 2008, ICSE.

[13]  Edmund M. Clarke,et al.  Design and Synthesis of Synchronization Skeletons Using Branching Time Temporal Logic , 2008, 25 Years of Model Checking.

[14]  Jiong Yang,et al.  Discovering Neglected Conditions in Software by Mining Dependence Graphs , 2008, IEEE Transactions on Software Engineering.

[15]  Tao Xie,et al.  Mining Interface Specifications for Generating Checkable Robustness Properties , 2006, 2006 17th International Symposium on Software Reliability Engineering.

[16]  Monica S. Lam,et al.  Automatic extraction of object-oriented component interfaces , 2002, ISSTA '02.

[17]  Rastislav Bodík,et al.  Jungloid mining: helping to navigate the API jungle , 2005, PLDI '05.

[18]  William Chan Temporal-Locig Queries , 2000, CAV.

[19]  Martin Fowler. Refactoring Improving the Design of Existing Code , 1999 .

[20]  Eric Bodden,et al.  Finding programming errors earlier by evaluating runtime monitors ahead-of-time , 2008, SIGSOFT '08/FSE-16.

[21]  William Chan Temporal-logic queries , 2000 .

[22]  Sudheendra Hangal,et al.  Tracking down software bugs using automatic anomaly detection , 2002, ICSE '02.

[23]  Hoan Anh Nguyen,et al.  Graph-based mining of multiple object usage patterns , 2009, ESEC/FSE '09.

[24]  Jian Pei,et al.  MAPO: mining API usages from open source repositories , 2006, MSR '06.

[25]  Bernhard Ganter,et al.  Formal Concept Analysis: Mathematical Foundations , 1998 .

[26]  Rajeev Motwani,et al.  Dynamic itemset counting and implication rules for market basket data , 1997, SIGMOD '97.

[27]  Eran Yahav,et al.  Effective typestate verification in the presence of aliasing , 2006, TSEM.

[28]  Andreas Zeller,et al.  Generating test cases for specification mining , 2010, ISSTA '10.

[29]  Kajal T. Claypool,et al.  XSnippet: mining For sample code , 2006, OOPSLA '06.

[30]  Jian Pei,et al.  Mining API patterns as partial orders from source code: from usage scenarios to specifications , 2007, ESEC-FSE '07.

[31]  Alexander L. Wolf,et al.  Discovering models of software processes from event-based data , 1998, TSEM.

[32]  David Hovemeyer,et al.  Finding bugs is easy , 2004, SIGP.

[33]  Eran Yahav,et al.  Static Specification Mining Using Automata-Based Abstractions , 2007, IEEE Transactions on Software Engineering.

[34]  Steven P. Reiss Specifying and checking component usage , 2005, AADEBUG'05.

[35]  Richard G. Hamlet,et al.  Automatically Checking an Implementation against Its Formal Specification , 2000, IEEE Trans. Software Eng..

[36]  Marsha Chechik,et al.  Temporal Logic Query Checking: A Tool for Model Exploration , 2003, IEEE Trans. Software Eng..

[37]  Bertrand Meyer,et al.  A comparative study of programmer-written and automatically inferred contracts , 2009, ISSTA.

[38]  Andreas Zeller,et al.  Why Programs Fail: A Guide to Systematic Debugging , 2005 .

[39]  Zhendong Su,et al.  Online inference and enforcement of temporal properties , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[40]  Andreas Zeller,et al.  Detecting object usage anomalies , 2007, ESEC-FSE '07.

[41]  Jian Pei,et al.  MAPO: Mining and Recommending API Usage Patterns , 2009, ECOOP.

[42]  Bengt Jonsson,et al.  Implementing a Model Checking Algorithm by Adapting Existing Automated Tools , 1989, Automatic Verification Methods for Finite State Systems.

[43]  Dawson R. Engler,et al.  Bugs as deviant behavior: a general approach to inferring errors in systems code , 2001, SOSP.

[44]  Zhenmin Li,et al.  PR-Miner: automatically extracting implicit programming rules and detecting violations in large software code , 2005, ESEC/FSE-13.

[45]  Benjamin Livshits,et al.  DynaMine: finding common error patterns by mining software revision histories , 2005, ESEC/FSE-13.

[46]  Tao Xie,et al.  Mining exception-handling rules as sequence association rules , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[47]  Suresh Jagannathan,et al.  Static specification inference using predicate mining , 2007, PLDI '07.

[48]  K. Rustan M. Leino,et al.  Houdini, an Annotation Assistant for ESC/Java , 2001, FME.