Font Size: a A A

Design And Implementation Of Boolean Program Repair Reverse Conversion Tool

Posted on:2013-08-24Degree:MasterType:Thesis
Country:ChinaCandidate:L ZhangFull Text:PDF
GTID:2248330362463725Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware. The debugging process includes two phases of fault location and code repair. A num-ber of methods in code repair make it easy to find the reason of errors or defects in recent years. There are mainly two ways of code repair methods which are formal specification-based and test cases based. It is difficult to reasoning the complex data structure and control relation in C program with control flow struc-ture. Boolean program is command language with control flow structure the same as C program. All variables of it are Boolean type. The feature of Boolean pro-gram makes it a worthwhile method in code repair as intermediate language. The existing work has yet to achieve the aim of fully automated repair the Boolean program.This dissertation do a further research base on previous work about repair of Boolean program. In this paper, we use control flow structure to simulate pro-gram running then construct the error paths which reach the error states to get a Boolean repair. We add more than one test case while constructing the error paths to make sure all the paths could be found so that accuracy of the repair is higher.This paper propose a method which could convert Boolean program’s repair to C program’s repair automatically. After obtaining the Boolean program’s repair formula, firstly the formula will be converted to C program’s expression accord-ing the map relations between C variables and Boolean variables. Secondly we determine whether the expression is satisfied. It is the right repair of C program if it is satisfied. The satisfiability judgment can reduce to the SMT (Satisfiability Modulo Theories) problem. The third we simplify the C program’s expression which is a disjunction formula then get the simplest C program statement.This dissertation design and implement a Boolean program reverse conver-sion tool based on the method propose in this paper. Input a C program with a known error into the tool, the program will be converted to a Boolean program and be repaired. Then the Boolean program’s repair will be reverse convert to C program’s expression. The tool will output a repaired C program at last. We use TCAS test suit to verify the accuracy and validity of the tool. The experiment results show that our tool can find the right repair results which are close to the semantics of the original program after reverse conversion and simplification.
Keywords/Search Tags:Code Repair, Boolean Program, Reverse Conversion, SMT, FormulaSimplification
PDF Full Text Request
Related items