Interactive Semi-automated Specification Mining for Debugging: An Experience Report

Abstract Context Specification mining techniques are typically used to extract the specification of a software in the absence of (up-to-date) specification documents. This is useful for program comprehension, testing, and anomaly detection. However, specification mining can also potentially be used for debugging, where a faulty behavior is abstracted to give developers a context about the bug and help them locating it. Objective In this project, we investigate this idea in an industrial setting. We propose a very basic semi-automated specification mining approach for debugging and apply that on real reported issues from an AutoPilot software system from our industry partner, MicroPilot Inc. The objective is to assess the feasibility and usefulness of the approach in a real-world setting. Method The approach is developed as a prototype tool, working on C code, which accept a set of relevant state fields and functions, per issue, and generates an extended finite state machine that represents the faulty behavior, abstracted with respect to the relevant context (the selected fields and functions). Results We qualitatively evaluate the approach by a set of interviews (including observational studies) with the company’s developers on their real-world reported bugs. The results show that (a) our approach is feasible, (b) it can be automated to some extent, and (c) brings advantages over only using their code-level debugging tools. We also compared this approach with traditional fully automated state-merging algorithms and reported several issues when applying those techniques on a real-world debugging context. Conclusion The main conclusion of this study is that the idea of an “interactive” specification mining rather than a fully automated mining tool is NOT impractical and indeed is useful for the debugging use case.

[1]  Lingfeng Bao,et al.  “Automated Debugging Considered Harmful” Considered Harmful: A User Study Revisiting the Usefulness of Spectra-Based Fault Localization Techniques with Professionals Using Real Bugs from Large Systems , 2016, 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[2]  John Derrick,et al.  Inferring extended finite state machine models from software executions , 2013, 2013 20th Working Conference on Reverse Engineering (WCRE).

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

[4]  Leonardo Mariani,et al.  Automatic generation of software behavioral models , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[5]  Thomas R. Gross,et al.  A framework for the evaluation of specification miners based on finite state machines , 2010, 2010 IEEE International Conference on Software Maintenance.

[6]  Markus Stumptner,et al.  Modeling Java Programs for Diagnosis , 2000, ECAI.

[7]  Markus Stumptner,et al.  Model-Based Diagnosis of Hardware Designs , 1999, Artif. Intell..

[8]  Hadi Hemmati,et al.  Analytics-based safety monitoring and verification , 2017, 2017 IEEE International Conference on Systems, Man, and Cybernetics (SMC).

[9]  Siau-Cheng Khoo,et al.  Efficient predicated bug signature mining via hierarchical instrumentation , 2014, ISSTA 2014.

[10]  Alessandro Orso,et al.  Rapid: Identifying Bug Signatures to Support Debugging Activities , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

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

[12]  Andreas Zeller,et al.  Where is the bug and how is it fixed? an experiment with practitioners , 2017, ESEC/SIGSOFT FSE.

[13]  Thomas R. Gross,et al.  Leveraging test generation and specification mining for automated bug detection without false positives , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[14]  Usman Qamar,et al.  Software Reverse Engineering to Requirement Engineering for Evolution of Legacy System , 2015, 2015 5th International Conference on IT Convergence and Security (ICITCS).

[15]  Mathew Hall,et al.  Using Behaviour Inference to Optimise Regression Test Sets , 2012, ICTSS.

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

[17]  Barak A. Pearlmutter,et al.  Results of the Abbadingo One DFA Learning Competition and a New Evidence-Driven State Merging Algorithm , 1998, ICGI.

[18]  Arie van Deursen,et al.  A Systematic Survey of Program Comprehension through Dynamic Analysis , 2008, IEEE Transactions on Software Engineering.

[19]  Neil Walkinshaw,et al.  Reverse Engineering State Machines by Interactive Grammar Inference , 2007, 14th Working Conference on Reverse Engineering (WCRE 2007).

[20]  Shahar Maoz,et al.  Using Model-Based Traces as Runtime Models , 2009, Computer.

[21]  Yves Le Traon,et al.  Towards a language-independent approach for reverse-engineering of software product lines , 2014, SAC.

[22]  Jerome A. Feldman,et al.  On the Synthesis of Finite-State Machines from Samples of Their Behavior , 1972, IEEE Transactions on Computers.

[23]  Rui Abreu,et al.  A Survey on Software Fault Localization , 2016, IEEE Transactions on Software Engineering.

[24]  Tobias Isenberg,et al.  A Systematic Review on the Practice of Evaluating Visualization , 2013, IEEE Transactions on Visualization and Computer Graphics.

[25]  Siau-Cheng Khoo,et al.  Mining succinct predicated bug signatures , 2013, ESEC/FSE 2013.

[26]  Alfonso Valdes,et al.  Adaptive, Model-Based Monitoring for Cyber Attack Detection , 2000, Recent Advances in Intrusion Detection.

[27]  Priya Parmar,et al.  Software Fault Localization: A Survey , 2016 .

[28]  Neil Walkinshaw,et al.  Inferring Finite-State Models with Temporal Constraints , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[29]  Rance Cleaveland,et al.  Automatic Requirement Extraction from Test Cases , 2010, RV.

[30]  Baowen Xu,et al.  Revisit of Automatic Debugging via Human Focus-Tracking Analysis , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[31]  Danny Raz,et al.  Experience Report: Log-Based Behavioral Differencing , 2017, 2017 IEEE 28th International Symposium on Software Reliability Engineering (ISSRE).

[32]  Gordon Fraser,et al.  Behaviourally Adequate Software Testing , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[33]  Ivan Beschastnikh,et al.  General LTL Specification Mining (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[34]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[35]  Jiawei Han,et al.  Mining Software Specifications: Methodologies and Applications , 2011 .

[36]  General LTL Specification Mining , 2015 .

[37]  David Lo,et al.  Mining Scenario-Based Triggers and Effects , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[38]  Laura Johnson,et al.  How Many Interviews Are Enough? , 2006 .

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

[40]  Philip S. Yu,et al.  Mining significant graph patterns by leap search , 2008, SIGMOD Conference.

[41]  Patrick Martin,et al.  Assisting developers of Big Data Analytics Applications when deploying on Hadoop clouds , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[42]  Siau-Cheng Khoo,et al.  Mining modal scenario-based specifications from execution traces of reactive systems , 2007, ASE '07.

[43]  Pierre Dupont,et al.  THE QSM ALGORITHM AND ITS APPLICATION TO SOFTWARE BEHAVIOR MODEL INDUCTION , 2008, Appl. Artif. Intell..

[44]  Hong Cheng,et al.  Identifying bug signatures using discriminative graph mining , 2009, ISSTA.

[45]  David Lo,et al.  Scenario-based and value-based specification mining: better together , 2010, ASE '10.

[46]  Pierre Dupont,et al.  Generating annotated behavior models from end-user scenarios , 2005, IEEE Transactions on Software Engineering.

[47]  Andreas Zeller,et al.  Generating Fixes from Object Behavior Anomalies , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[48]  Ahmed E. Hassan,et al.  Automatic detection of performance deviations in the load testing of Large Scale Systems , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[49]  Yuriy Brun,et al.  Using dynamic execution traces and program invariants to enhance behavioral model inference , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[50]  Jakob Nielsen,et al.  Heuristic evaluation of user interfaces , 1990, CHI '90.

[51]  Jordi Cabot,et al.  MoDisco: A model driven reverse engineering framework , 2014, Inf. Softw. Technol..

[52]  Ivan Beschastnikh,et al.  Synergizing Specification Miners through Model Fissions and Fusions (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[53]  David Lo,et al.  Learning extended FSA from software: An empirical assessment , 2012, J. Syst. Softw..

[54]  Markus Stumptner,et al.  Model-Based Debugging - State of the Art And Future Challenges , 2007, V&D@FLoC.

[55]  David Lo,et al.  Mining Hierarchical Scenario-Based Specifications , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.