Testing mined specifications

Specifications are necessary for nearly every software engineering task, but they are often missing or incomplete. "Specification mining" is a line of research promising to solve this problem through automated tools that infer specifications directly from existing programs. The standard practice is one of inductive learning: mining tools make observations about software and inductively generalize them into specifications. Inductive reasoning is unsound, however, and existing tools commonly grapple with the problem of inferring "false" specifications, which must be manually checked. In this work, we introduce a new technique for automatically validating mined specifications that lessens this manual burden. Our technique is not based on heuristics; it rather uses a general, semantic definition of a "true" specification. We perform systematic, targeted program transformations to test a mined specification's necessity for overall correctness. If a "violating" program is correct, the specification is false. We have implemented our technique in a prototype tool that validates temporal properties of Java programs, and we demonstrate it to be effective through a large-scale case study on the DaCapo benchmarks.

[1]  Grigore Rosu,et al.  Mop: an efficient and generic runtime verification framework , 2007, OOPSLA.

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

[3]  Zhendong Su,et al.  Symbolic mining of temporal specifications , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[4]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

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

[6]  Sriram K. Rajamani,et al.  Automatically validating temporal safety properties of interfaces , 2001, SPIN '01.

[7]  Martin C. Rinard,et al.  Commutativity analysis: a new analysis technique for parallelizing compilers , 1997, TOPL.

[8]  Koushik Sen,et al.  DETERMIN: inferring likely deterministic specifications of multithreaded programs , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[9]  Jiong Yang,et al.  Finding what's not there: a new approach to revealing neglected conditions in software , 2007, ISSTA '07.

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

[11]  Yuanyuan Zhou,et al.  Have things changed now?: an empirical study of bug characteristics in modern open source software , 2006, ASID '06.

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

[13]  Eran Yahav,et al.  Static Specification Mining Using Automata-Based Abstractions , 2008, IEEE Trans. Software Eng..

[14]  Gregg Rothermel,et al.  Experimental program analysis: a new program analysis paradigm , 2006, ISSTA '06.

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

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

[17]  Richard G. Hamlet,et al.  Testing Programs with the Aid of a Compiler , 1977, IEEE Transactions on Software Engineering.

[18]  Alberto Savoia,et al.  Differential testing: a new approach to change detection , 2007, ESEC-FSE '07.

[19]  Amer Diwan,et al.  Discovering and debugging algebraic specifications for java classes , 2004 .

[20]  James R. Larus,et al.  Debugging temporal specifications with concept analysis , 2003, PLDI '03.

[21]  Andreas Zeller,et al.  Mining object behavior with ADABU , 2006, WODA '06.

[22]  Steven P. Reiss,et al.  Elided conditionals , 2004, PASTE '04.

[23]  David Notkin,et al.  Mutually Enhancing Test Generation and Specification Inference , 2003, FATES.

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

[25]  Claire Le Goues,et al.  Specification Mining with Few False Positives , 2009, TACAS.

[26]  Andreas Zeller,et al.  Generating parameterized unit tests , 2011, ISSTA '11.

[27]  Robert E. Strom,et al.  Typestate: A programming language concept for enhancing software reliability , 1986, IEEE Transactions on Software Engineering.

[28]  Grigore Rosu,et al.  Mining parametric specifications , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

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

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

[31]  Siau-Cheng Khoo,et al.  Extracting Significant Specifications from Mining through Mutation Testing , 2011, ICFEM.

[32]  William E. Howden,et al.  Weak Mutation Testing and Completeness of Test Sets , 1982, IEEE Transactions on Software Engineering.

[33]  Thomas A. Henzinger,et al.  Permissive interfaces , 2005, ESEC/FSE-13.

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

[35]  Nathan Clark,et al.  Commutativity analysis for software parallelization: letting program transformations see the big picture , 2009, ASPLOS.

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

[37]  William G. Griswold,et al.  Quickly detecting relevant program invariants , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

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

[39]  Dawson R. Engler,et al.  From uncertainty to belief: inferring the specification within , 2006, OSDI '06.