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 imple...
Main Author: | |
---|---|
Format: | Article |
Language: | English |
Published: |
Open Publishing Association
2013-09-01
|
Series: | Electronic Proceedings in Theoretical Computer Science |
Online Access: | http://arxiv.org/pdf/1309.5152v1 |
id |
doaj-012f3f66842545178aa155945cf835dd |
---|---|
record_format |
Article |
spelling |
doaj-012f3f66842545178aa155945cf835dd2020-11-25T00:57:25ZengOpen Publishing AssociationElectronic Proceedings in Theoretical Computer Science2075-21802013-09-01129Festschrift for Dave Schmidt41942810.4204/EPTCS.129.27A Case for Dynamic Reverse-code Generation to Debug Non-deterministic ProgramsJooyong YiBacktracking (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. http://arxiv.org/pdf/1309.5152v1 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Jooyong Yi |
spellingShingle |
Jooyong Yi A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs Electronic Proceedings in Theoretical Computer Science |
author_facet |
Jooyong Yi |
author_sort |
Jooyong Yi |
title |
A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs |
title_short |
A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs |
title_full |
A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs |
title_fullStr |
A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs |
title_full_unstemmed |
A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs |
title_sort |
case for dynamic reverse-code generation to debug non-deterministic programs |
publisher |
Open Publishing Association |
series |
Electronic Proceedings in Theoretical Computer Science |
issn |
2075-2180 |
publishDate |
2013-09-01 |
description |
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. |
url |
http://arxiv.org/pdf/1309.5152v1 |
work_keys_str_mv |
AT jooyongyi acasefordynamicreversecodegenerationtodebugnondeterministicprograms AT jooyongyi casefordynamicreversecodegenerationtodebugnondeterministicprograms |
_version_ |
1725224310642049024 |