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 |
_version_ | 1819175263978651648 |
---|---|
author | Jooyong Yi |
author_facet | Jooyong Yi |
author_sort | Jooyong Yi |
collection | DOAJ |
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. |
first_indexed | 2024-12-22T20:52:06Z |
format | Article |
id | doaj.art-012f3f66842545178aa155945cf835dd |
institution | Directory Open Access Journal |
issn | 2075-2180 |
language | English |
last_indexed | 2024-12-22T20:52:06Z |
publishDate | 2013-09-01 |
publisher | Open Publishing Association |
record_format | Article |
series | Electronic Proceedings in Theoretical Computer Science |
spelling | doaj.art-012f3f66842545178aa155945cf835dd2022-12-21T18:13:04ZengOpen 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 |
spellingShingle | Jooyong Yi A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs Electronic Proceedings in Theoretical Computer Science |
title | 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_short | 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 |
url | http://arxiv.org/pdf/1309.5152v1 |
work_keys_str_mv | AT jooyongyi acasefordynamicreversecodegenerationtodebugnondeterministicprograms AT jooyongyi casefordynamicreversecodegenerationtodebugnondeterministicprograms |