A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs
نویسنده
چکیده
Backtracking (i.e., reverse execution) helps the user of a debugger to naturally think backwards along the execution path of a program, and thinking backwards makes it easy to locate the origin of a bug. So far backtracking has been implemented mostly by state saving or by checkpointing. These implementations, however, inherently do not scale. Meanwhile, a more recent backtracking method based on reverse-code generation seems promising because executing reverse code can restore the previous states of a program without state saving. In the literature, there can be found two methods that generate reverse code: (a) static reverse-code generation that pre-generates reverse code through static analysis before starting a debugging session, and (b) dynamic reverse-code generation that generates reverse code by applying dynamic analysis on the fly during a debugging session. In particular, we espoused the latter one in our previous work to accommodate non-determinism of a program caused by e.g., multi-threading. To demonstrate the usefulness of our dynamic reverse-code generation, this article presents a case study of various backtracking methods including ours. We compare the memory usage of various backtracking methods in a simple but nontrivial example, a bounded-buffer program. In the case of non-deterministic programs such as this bounded-buffer program, our dynamic reverse-code generation outperforms the existing backtracking methods in terms of memory efficiency.
منابع مشابه
Program Validation by Symbolic and Reverse Execution
Program validation is one of the most crucial tasks during program development since programs should conform to programmers’ requirements.2 To this end, one is often required to formulate requirements into formal specifications and analyze a given program against these specifications until no error is detected; if an error is detected, its cause must be located and fixed. In this dissertation, ...
متن کاملDynamic Event Generation for Runtime Checking using the JDI 1
Approaches to runtime checking have to track the execution of a software system and therefore have to deal with generating and processing execution events. Often these techniques are applied at the code level – either by inserting new source code prior to the compilation or by modifying the target code, e.g. Java byte code, before running the program. The jassda [4,3] framework and tool enable ...
متن کاملDynamic Event Generation for Runtime Checking using the JDI
Approaches to runtime checking have to track the execution of a software system and therefore have to deal with generating and processing execution events. Often these techniques are applied at the code level – either by inserting new source code prior to the compilation or by modifying the target code, e.g. Java byte code, before running the program. The jassda [4,3] framework and tool enable ...
متن کاملDebugging operating systems with time-traveling virtual machines
Operating systems are among the most difficult of software systems to debug with traditional cyclic debugging. They are non-deterministic; they run for long periods of time; their state and code is large and complex; and their state is easily perturbed by the act of debugging. This paper describes a time-traveling virtual machine that overcomes many of the difficulties associated with debugging...
متن کاملThe Deterministic Generation of Extreme Surface Water Waves Based on Soliton on Finite Background in Laboratory
This paper aims to describe a deterministic generation of extreme waves in a typical towing tank. Such a generation involves an input signal to be provided at the wave maker in such a way that at a certain position in the wave tank, say at a position of a tested object, a large amplitude wave emerges. For the purpose, we consider a model called a spatial-NLS describing the spatial propagation o...
متن کامل