Program Repair Using the Order Relation of Fault Localization

Author
ZuoLiJia
Advisor
WanHai
School
Sun Yat-sen University
Major
Software Engineering
Classification
TP311.52 Software Development
Degree
Master's thesis
Year
2012
Downloads
22
Citations
0

Request the full text

Abstract

Software debugging is the process of fixing program bugs, is an important step ofsoftware development. This process is a difficult task. Locating an error from sourcecode is a challenging work without any automated assistance. When an error islocated, it may still take considerable time for a developer to make an appropriate fix.In recent years, the development of a variety of approaches to automate programdebugging can be seen. Most of these focus on fault localization, narrowing the searchscope for bugs to help developers identify faulty statements more quickly. However,many program repairs are made manually.This dissertation presents an approach for program repair based on the orderrelation of fault localization. Its key insight is to transform the faulty program toseveral nondeterministic programs, using the list of faulty statements with their orderrelation. That is, a faulty statement that has deterministic behavior is replaced withone that has nondeterministic behavior. These nondeterministic programs can betransformed to a few of Boolean satisfiability (SAT) problems. Repair model can befound by using the specification to prune the nondeterminism. This dissertation givesa weight to every clause of every SAT problem, according to the order relation of faultlocalization. Also, the mapping between the number of the statement that may befaulty and the boolean variables in every SAT problem is built. Thus, it reduces theseproblems to a Weighted Maximum Satisfiability (Weighted MAX-SAT) problem. Sothe process of finding a model that satisfies the specification constraints is ordered.The main work of this dissertation include: encode Java code and itsspecifications as a relational programming language (FIR: Forge Intermediate Representation), transform a deterministic FIR to a nondeterministic FIR, transform anondeterministic FIR to relational logic formulas, transform relational logic formulasto a SAT problem. Thus the mapping between the number of the statement and theboolean variables in every SAT problem is built. Several SAT problems are reduced toone Weighted MAX-SAT problem by using the mapping and the order relation ofstatements that may be faulty. Finally, a Weighted MAX-SAT solver is used to solvethe Weighted MAX-SAT problem then the repair model for the faulty program can befound.One of the shortcomings of the technique is that the accuracy of the repairedstatements is very closely tied to the correctness and completeness of the specificationconstraints and the maximum value of scope used in the validation phase. So itremains to be explored that how to bridge the gap between specification-based andtestcase-based repair. Initial experiments show the effectiveness of this approach inproducing repair model of Java programs that have clear specifications and thatmanipulate data structures.

Table of contents

Summary 3-5 Abstract 5-9 Chapter 1 Introduction 9-15 1.1 Background and Significance 9-10 1.2 related work 10-12 1.3 This work 12-13 1.4 thesis structure 13-14 1.5 Summary 14-15 Chapter 2 SAT -based problem fixes 15-29 2.1 basic framework 15-19 2.2 FIR coding 19-22 2.3 FIR into relational logic formulas 22-27 2.4 relations logical formulas converted to SAT problems 27-28 2.5 Summary 28-29 Chapter 3 fixes based fault localization sequence relationship 29-39 3.1 core framework 29-30 3.2 error localization sequence define the relationship FIR coding sequence 30-32 3.3 relations with 32-34 3.4 formal description 34-36 3.5 build with the maximum value of the right to meet the problems 36-38 3.6 Summary 38-39 Chapter 4, based on an incorrect orientation program designed to repair relations program to achieve 39 -50 4.1 system implementation process 39-43 4.2 FIR to realize the relationship between logical formulas 43-45 4.3 relations logical formula to meet the problem reduction 45-47 4.4 weighted Maximum reduction to meet the problem 47-49 4.5 Summary 49-50 Chapter 5 fixes test experimental 50-58 5.1 Introduction experimental procedure to repair 50-56 5.2 analysis of experimental results 56-57 5.3 Summary 57-58 Chapter 6 Conclusions and further work 58-60 6.1 summarizes 58 6.2 further work 58-60 References 60-63 Appendix 63-68 Thanks 68