An interactive debugging tool for c++ based on dynamic slicing and dicing

  • Authors:
  • Mansur H. Samadzadeh;Winai Wichaipanitch

  • Affiliations:
  • -;-

  • Venue:
  • An interactive debugging tool for c++ based on dynamic slicing and dicing
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Scope and method of study. Since the article “Program Slicing” by Mark Weiser was initially published in 1981 [Weiser 81], program slicing has gained wide recognition in both academic and practical arenas. Several debugging tools have been developed that utilize program slicing. For example, Focus (designed and implemented by Lyle in 1984) was designed to be used with Fortran programs, and C-Sdicer (designed and implemented by Nanja and Samadzadeh in 1990) and C-Debug (designed and implemented by Wichaipanitch and Samadzadeh in 1992) were designed to be applicable to C language programs based on dynamic slicing. Program slicing [Weiser 81, 82, and 84] is one of the debugging methods used to localize errors in a program. The idea of program slicing is to focus on the statements that have something to do with a certain variable of interest (criterion variable), with the unrelated statements being omitted. Using slicing, one obtains a new program of generally smaller size that still maintains all aspects of the original program's behavior with respect to the criterion variable. Dynamic slicing differs from static slicing in that it is defined on the basis of a computation or an execution rather than on all possible computations. Furthermore, it allows one to treat the elements and fields in dynamic records as individual variables [Korel and Laski 90]. As a result, the slice size computed based on the dynamic slicing technique is generally smaller. Moreover, dynamic slicing allows one to keep track of the run-time type binding (involving the type of each object) that is unknown at compile time but is determined when the program is executed. Dynamic slicing technique was used in this study. Dicing technique [Lyle 84] [Nanja 90] [Nanja and Samadzadeh 90] can then be used to compare two or more slices resulting from the program slicing technique in order to identify the set of statements that are likely to contain an error. The formal model of static/dynamic slicing/dicing is presented. There is a need for debugging tools that are capable of making some deductions regarding the presence and location of errors in programs. Findings and conclusions. The main objective of this work was to develop an interactive debugging tool for C++ programs. The tool that was developed is called C++Debug and it uses program slicing and dicing techniques. The design started by including simple statements first and then expanded to pointers, structures, functions, and classes. In order for C++Debug to be more powerful, dynamic slicing rather than static slicing was chosen. The work includes new algorithms that handle Class, Function, and Pointer in C++.