Automated program repair using genetic programming and model checking

Automated program repair is still a highly challenging problem mainly due to the reliance of the current techniques on test cases to validate candidate patches. This leads to the increasing unreliability of the final patches since test cases are partial specifications of the software. In the present paper, an automated program repair method is proposed by integrating genetic programming (GP) and model checking (MC). Due to its capabilities to verify the finite state systems, MC is employed as an appropriate criterion for evolving programs to calculate the fitness in GP. The application of MC for the fitness evaluation, which is novel in the context of program repair, addresses an important gap in the current heuristic approaches to the program repair. Being focused on fault detection based on the desired aspects, it enables the programmers to detect faults according to the definition of properties. Creating a general method, this characteristic can be effectively customized for different domains of application and the corresponding faults. Apart from various types of faults, the proposed method is capable of handling concurrency bugs which are not the case in many general repair methods. To evaluate the proposed method, it was implemented as a tool, named JBF, to repair Java programs. To meet the objectives of the study, some experiments were conducted in which certain programs with known bugs were automatically repaired by the JBF tool. The obtained results are encouraging and remarkably promising.

[1]  Doron A. Peled,et al.  Genetic Programming and Model Checking: Synthesizing New Mutual Exclusion Algorithms , 2008, ATVA.

[2]  John Penix Large-scale test automation in the cloud (invited industrial talk) , 2012, ICSE '12.

[3]  Wen-Yang Lin,et al.  A Genetic Selection Algorithm for OLAP Data Cubes , 2003, Knowledge and Information Systems.

[4]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[5]  Farn Wang,et al.  Program Repair Suggestions from Graphical State-Transition Specifications , 2008, FORTE.

[6]  Louise A. Dennis,et al.  Program Slicing and Middle-Out Reasoning for Error Location and Repair , 2006 .

[7]  Michel Raynal,et al.  Algorithms for mutual exclusion , 1986 .

[8]  Christel Baier,et al.  Principles of model checking , 2008 .

[9]  M. Keijzer,et al.  Genetic programming as a model induction engine , 2000 .

[10]  Claire Le Goues,et al.  A genetic programming approach to automated software repair , 2009, GECCO.

[11]  Claire Le Goues,et al.  A systematic study of automated program repair: Fixing 55 out of 105 bugs for $8 each , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[12]  Claire Le Goues,et al.  Representations and operators for improving evolutionary software repair , 2012, GECCO '12.

[13]  Ding Yuan,et al.  How do fixes become bugs? , 2011, ESEC/FSE '11.

[14]  John R. Koza,et al.  Genetic programming - on the programming of computers by means of natural selection , 1993, Complex adaptive systems.

[15]  James C. Corbett,et al.  A Formal Study of Slicing for Multi-threaded Programs with JVM Concurrency Primitives , 1999, SAS.

[16]  Shan Lu,et al.  Automated atomicity-violation fixing , 2011, PLDI '11.

[17]  Andrea Arcuri,et al.  On the automation of fixing software bugs , 2008, ICSE Companion '08.

[18]  Doron A. Peled,et al.  Code Mutation in Verification and Automatic Code Correction , 2010, TACAS.

[19]  Riccardo Poli,et al.  Elitism reduces bloat in genetic programming , 2008, GECCO '08.

[20]  Yuhua Qi,et al.  Efficient Automated Program Repair through Fault-Recorded Testing Prioritization , 2013, 2013 IEEE International Conference on Software Maintenance.

[21]  Mark Harman Automated patching techniques , 2010, Commun. ACM.

[22]  Yuriy Brun,et al.  Is the cure worse than the disease? overfitting in automated program repair , 2015, ESEC/SIGSOFT FSE.

[23]  Anna Philippou,et al.  Tools and Algorithms for the Construction and Analysis of Systems , 2018, Lecture Notes in Computer Science.

[24]  Peter J. Fleming,et al.  Evolution of mathematical models of chaotic systems based on multiobjective genetic programming , 2005, Knowledge and Information Systems.

[25]  Masahiro Fujita,et al.  Program Slicing of Hardware Description Languages , 1999, CHARME.

[26]  Xin Yao,et al.  A novel co-evolutionary approach to automatic software bug fixing , 2008, 2008 IEEE Congress on Evolutionary Computation (IEEE World Congress on Computational Intelligence).

[27]  A. Prasad Sistla,et al.  Symmetry and model checking , 1993, Formal Methods Syst. Des..

[28]  Charles Zhang,et al.  Axis: Automatically fixing atomicity violations through solving control constraints , 2012, 2012 34th International Conference on Software Engineering (ICSE).

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

[30]  Dennis Jeffrey,et al.  Dynamic State Alteration Techniques for Automatically Locating Software Errors , 2009 .

[31]  Claire Le Goues,et al.  GenProg: A Generic Method for Automatic Software Repair , 2012, IEEE Transactions on Software Engineering.

[32]  Stephen McCamant,et al.  Inference and enforcement of data structure consistency specifications , 2006, ISSTA '06.

[33]  Mark Lillibridge,et al.  Extended static checking for Java , 2002, PLDI '02.

[34]  John Penix,et al.  Verification of time partitioning in the DEOS scheduler kernel , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[35]  Claire Le Goues,et al.  Current challenges in automatic software repair , 2013, Software Quality Journal.

[36]  John R. Koza,et al.  Hierarchical Genetic Algorithms Operating on Populations of Computer Programs , 1989, IJCAI.

[37]  Westley Weimer,et al.  Automated repair of binary and assembly programs for cooperating embedded devices , 2013, ASPLOS '13.

[38]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[39]  Gerard J. Holzmann,et al.  v-Promela: a visual, object-oriented language for SPIN , 1999, Proceedings 2nd IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC'99) (Cat. No.99-61702).

[40]  Colin G. Johnson,et al.  Genetic Programming with Fitness Based on Model Checking , 2007, EuroGP.

[41]  Somesh Jha,et al.  Exploiting symmetry in temporal logic model checking , 1993, Formal Methods Syst. Des..

[42]  Fred Kröger,et al.  Temporal Logic of Programs , 1987, EATCS Monographs on Theoretical Computer Science.

[43]  Markus Stumptner,et al.  Model-Based Program Debugging and Repair , 1996, IEA/AIE.

[44]  Jaechang Nam,et al.  Automatic patch generation learned from human-written patches , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[45]  Pattarasinee Bhattarakosol,et al.  Automatic detection and correction of programming faults for software applications , 2005, J. Syst. Softw..

[46]  Claire Le Goues Automatic Program Repair Using Genetic Programming , 2013 .

[47]  A. Jefferson Offutt,et al.  Introduction to Software Testing , 2008 .

[48]  Westley Weimer,et al.  Advances in Automated Program Repair and a Call to Arms , 2013, SSBSE.

[49]  Lynette I. Millett,et al.  Slicing Promela and its Applications to Model Checking, Simulation, and Protocol Understanding , 2002 .

[50]  Michael D. Ernst,et al.  Automatically patching errors in deployed software , 2009, SOSP '09.

[51]  Michael R. Lowry,et al.  Experimental Evaluation of Verification and Validation Tools on Martian Rover Software , 2013, Formal Methods Syst. Des..

[52]  David L. Dill,et al.  Better verification through symmetry , 1996, Formal Methods Syst. Des..

[53]  H. Rice Classes of recursively enumerable sets and their decision problems , 1953 .

[54]  Westley Weimer,et al.  Patches as better bug reports , 2006, GPCE '06.

[55]  Claire Le Goues,et al.  Using Execution Paths to Evolve Software Patches , 2009, 2009 International Conference on Software Testing, Verification, and Validation Workshops.

[56]  Name M. Lastname Automatically Finding Patches Using Genetic Programming , 2013 .

[57]  John G. P. Barnes,et al.  High Integrity Software - The SPARK Approach to Safety and Security , 2003 .

[58]  Daniel R. Tauritz,et al.  Multi-objective coevolutionary automated software correction , 2012, GECCO '12.

[59]  Michèle Sebag,et al.  Grammar-guided genetic programming and dimensional consistency: application to non-parametric identification in mechanics , 2001, Appl. Soft Comput..

[60]  David J. Montana,et al.  Strongly Typed Genetic Programming , 1995, Evolutionary Computation.

[61]  Andreas Zeller,et al.  Automated Fixing of Programs with Contracts , 2014 .

[62]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[63]  Yuriy Brun,et al.  The ManyBugs and IntroClass Benchmarks for Automated Repair of C Programs , 2015, IEEE Transactions on Software Engineering.

[64]  G. Myers,et al.  The Art of Software Testing: Myers/Art , 2012 .

[65]  Roderick Bloem,et al.  Finding and fixing faults , 2005, J. Comput. Syst. Sci..

[66]  John R. Koza,et al.  Genetic Programming IV: Routine Human-Competitive Machine Intelligence , 2003 .

[67]  Louise A. Dennis,et al.  Proof-Directed Debugging and Repair , 2006 .

[68]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[69]  Klaus Havelund,et al.  Model Checking Programs , 2004, Automated Software Engineering.

[70]  Mark J. Willis,et al.  Using a tree structured genetic algorithm to perform symbolic regression , 1995 .

[71]  Edmund M. Clarke,et al.  Model Checking , 1999, Handbook of Automated Reasoning.

[72]  Peter J. Angeline,et al.  Type Inheritance in Strongly Typed Genetic Programming , 1996 .

[73]  Doron A. Peled,et al.  Model Checking-Based Genetic Programming with an Application to Mutual Exclusion , 2008, TACAS.

[74]  Andrea Arcuri,et al.  Evolutionary repair of faulty software , 2011, Appl. Soft Comput..