Efficient Debugging with Slicing and Backtracking (original) (raw)

Debugging with Dynamic Slicing and Backtracking

Software - Practice and Experience, 1993

Programmers spend considerable time debugging code. Symbolic debuggers provide some help but the task remains complex and difficult. Other than breakpoints and tracing, these tools provide little high-level help. Programmers must perform many tasks manually that the tools could perform automatically, such as finding which statements in the program affect the value of an output variable for a given test case, and what was the value of a given variable when the control last reached a given program location. If debugging tools provided explicit support for these tasks, the debugging process could be automated to a significant extent.In this paper we present a debugging model, based on dynamic program slicing and execution backtracking techniques, that easily lends itself to automation. This model is based on experience with using these techniques to debug software. We also present a prototype debugging tool, SPYDER, that explicitly supports the proposed model, and with which we are performing further debugging research.

An Execution Backtracking Approach to Program Debugging

An execution backtracking facility in interactive source debuggers allows users to mirror their thought processes while debugging-working backwards from the location where an error is manifested and determining the conditions under which the error occurred. Such a facility also allows a user to change program characteristics and reexecute from arbitrary points within the program under examination-a "what-if" capability. This paper describes an experimental debugger that provides such a backtracking function. We describe why the facility is useful, and why other current techniques are inadequate. We show how execution backtracking can be efficiently implemented by saving only the latest values of variables modified by a statement, and allowing backtracking only over complete program statements. We also describe how this approach relates to our work on dynamic program slicing.

Combining algorithmic debugging and program slicing

Proceedings of the 8th ACM SIGPLAN symposium on Principles and practice of declarative programming - PPDP '06, 2006

Currently, program slicing and algorithmic debugging are two of the most relevant debugging techniques for declarative languages. They help programmers to find bugs in a semiautomatic manner. On the one hand, program slicing is a technique to extract those program fragments that (potentially) affect the values computed at some point of interest. On the other hand, algorithmic debugging is able to locate a bug by automatically generating a series of questions and processing the programmer's answers. In this work, we show for functional languages how the combination of both techniques produces a more powerful debugging schema that reduces the number of questions that programmers must answer to locate a bug.

An execution-backtracking approach to debugging

1991

Abstract Spyder, a system for selective checkpointing of computational sequences, is presented. It lets users backtrack from checkpoints without the need to reexecute the program to reach recent prior states. In contrast to more comprehensive (and storage-intensive) checkpointing schemes, backtracking in this approach is constrained to limit storage requirements. The resulting debugger offers a structured view of dynamic events, similar to lexical scope rules' effect on static visibility.

Dynamic slicing object-oriented programs for debugging

Proceedings. Second IEEE International Workshop on Source Code Analysis and Manipulation

Dynamic program slicing is an effective technique for narrowing the errors to the relevant parts of a program when debugging. Given a slicing criterion, the dynamic slice contains only those statements that actually affect the variables in the slicing criterion. This paper proposes a method to dynamically slice object-oriented (OO) programs based on dependence analysis. It uses the object program dependence graph and other static information to reduce the information to be traced during program execution. It deals with OO features such as inheritance, polymorphism and dynamic bindings. Based on this model, we present methods to slice methods, objects and classes. We also modify the slicing criterion to fit for debugging.

Enhancing debugging technology

1994

This dissertation presents a new debugging assistant called a Debugging Critic. As an alternative to an automated debugging oracle, the debugging critic evaluates hypotheses about fault locations. If it cannot confirm that the code at the hypothesized location contains a fault, it formulates an alternative hypothesis about the location of a faulty statement or the location of omitted statements. The debugging critic derives knowledge of possible locations of a fault that manifested itself under a given test case from failure symptoms. It derives information about failure symptoms from programmers' replies to its questions. Therefore, it can operate without a line-by-line specification and a knowledge base of faults. A prototype of our debugging critic has been implemented as an extension of an existing debugger, Spyder. An experiment with Spyder shows that programmers debug two to four times faster on the average with the debugging critic than without it. Ninety-two percent of t...

Enhancing Trace Debugging with Algorithmic and Omniscient Debugging

2013

During many years, Print Debugging has been the most used method for debugging. Nowadays, however, industrial languages come with a trace debugger that allows programmers to trace computations step by step. Almost all modern programming environments include debugging utilities that allows us to place breakpoints and to inspect the state of a computation in any given point. Nevertheless, this debugging method has been criticized for being completely manual and time-consuming. Other debugging techniques have appeared to solve some of the problems of Trace Debugging, but they suffer from other problems such as scalability. In this work we present a new hybrid debugging technique. It is based on a combination of Trace Debugging, Algorithmic Debugging and Omniscient Debugging to produce a synergy that exploits the best properties and strong points of each technique. We describe the architecture of our hybrid debugger and our implementation that has been integrated into Eclipse as a plugin.

Programmers Should Still Use Slices When Debugging

2016

What is the best technique for fault localization? In a study of 37 real bugs (and 37 injected faults) in more than a dozen open source C programs, we compare the effectiveness of statistical debugging against dynamic slicing—the first study ever to compare the techniques. On average, dynamic slicing is more effective than statistical debugging, requiring programmers to examine only 14% (42 lines) of the code before finding the defect, less than half the effort required by statistical debugging (30% or 157 lines). Best results are obtained by a hybrid approach: If programmers first examine the top five most suspicious locations from statistical debugging, and then switch to dynamic slices, they will need to examine only 11% (35 lines) of the code.

Automated Debugging : Still a Dream ?

International Journal of Scientific Research in Engineering and Management (IJSREM), 2023

Software debugging is the process of finding and fixing incorrect statements in programs. The process of debugging takes a lot of time and is challenging. Therefore, the field of automated debugging, which is focused on automating the discovery and correction of a failure's underlying cause, has made huge progress in the past. By applying automated approaches to identify and correct any erroneous statements in a program, the cost of producing software may be significantly decreased while also improving the quality of the final product. The purpose of this paper is to shed light on the application of automated debugging in the current market scenario. Techniques like Delta Debugging, Path-based Weakest Preconditions, Fault Localization, and Program Slicing have been demonstrated to be quite effective in dealing with the identification and resolution of inconsistencies. This paper also aims to examine the question, "Is Automated Debugging still a dream? ".

Automated Breakpoint Generation for Debugging

ABSTRACT During debugging processes, breakpoints are frequently used to inspect and understand the run-time program behavior. Although modern development environments provide convenient breakpoint utilities, it mostly requires considerable human effort to create useful breakpoints. Before setting a breakpoint or typing a breakpoint condition, developers usually have to make some judgements and hypotheses based on their observations and experiences.