LOCALIZE FAULTS FROM ALIAS-FREE PROGRAMS USING VERIFICATION BASED MODEL Safeeullah Soomro 1 1 National University of Computer and Emerging Sciences (NU-FAST) ST-4, Shah Latif Town, Landhi (on National Highway), Karachi, Pakistan Email : safeeullah.soomro@nu.edu.pk Syed Asif Ali Shah 2,3 and Wajiha Shah 2,4 2 Institute of Broadband Communication Vienna University of Technology, Austria 3 Department of Electrical Engineering 4 Department of Electronics and Telecommunication Engineering Mehran University of Engineering and Technology, Jamshoro, Pakistan Email : { Asif.Shah, Wajiha.Shah }@tuwien.ac.at ABSTRACT Locating faults is one of the most time consuming tasks in today’s fast paced economy. This article makes use of an abstract dependency between program variables for locat- ing faults in alias-free programs. We present an algorithm for finding fix-point over iterative functions and show proof with graph representation which ensures that we reached fix-point computation within finite number of iterations. This model computes dependences from statements, loops, recursive method calls and etc. Finally we present novel re- sults obtained from over medium sized programs. Notably, whenever our novel model detects a structural fault, it also appears to be capable of localizing the detected misbehav- ior’s real cause. KEY WORDS Model-Based Software Debugging, Fix-point computation, Fault Localization 1 Introduction and Related Research Abstract dependences [1] are applied in software analysis in various ways (e.g. software maintenance, program un- derstanding, program slicing, refactoring, and also in soft- ware debugging). Fault localization employing abstract de- pendences has sound theoretical foundations [2] and the re- lationships to other techniques in software engineering, for example program slicing [4], have been clarified [3]. The verification-based model (VBM) for alias-free program which is used for debugging is an extension of the dependence model from Jackson’s Aspect system [1] which has been used for verification of C programs. The Aspect system analyzes the dependences between variables of a given program and compares them with the specified dependences. In case of a mismatch the program is said to violate the specification. Otherwise, the program ful- int myMult (int x,y) { 1. int result = 0; 2. int i = 0; 3. while ( i < x) { 4. result = result + x ; // Should be result = result + y 5. i=i+1; } 6. return result; } Figure 1. myMult - a faulty implementation of the integer multiplication fills the specification. Unfortunately, the Aspect system does not allow to help the source of a mismatch. The VBM extends Jackson’s idea towards not only detecting misbehavior but also localizing the malfunctioning’s real cause. The authors of [14] present a detailed formalization of this idea and also present rules for most important lan- guage artifacts. In this paper we focus on computing fix- point computation over iterative functions, present proof of fixed-point, conclusion and future work. We illustrate the basic ideas of fault localization using the faulty imple- mentation of a multiplication operation myMult from Fig- ure 1. The bug lies in statement 4 where the variable x is used in the right hand side expression of the assignment in- stead of variable y. In order to detect the fault we first have to specify the abstract dependencies for the multiplication where the result should depend on both inputs. Hence, we specify that result depends on x and y which can be written as a rule: result x, y or as binary relation {(result, x), (result, y)}. When approximating the abstract dependencies from the source code of myMult using the Aspect system, we fi-