A Case for Dynamic Reverse-code Generation to Debug Non-deterministic Programs

被引:0
作者
Yi, Jooyong [1 ]
机构
[1] Natl Univ Singapore, Sch Comp, Singapore, Singapore
来源
ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE | 2013年 / 129期
关键词
D O I
10.4204/EPTCS.129.27
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
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.
引用
收藏
页码:419 / 428
页数:10
相关论文
共 16 条
[1]   DEBUGGING WITH DYNAMIC SLICING AND BACKTRACKING [J].
AGRAWAL, H ;
DEMILLO, RA ;
SPAFFORD, EH .
SOFTWARE-PRACTICE & EXPERIENCE, 1993, 23 (06) :589-616
[2]   AN EXECUTION-BACKTRACKING APPROACH TO DEBUGGING [J].
AGRAWAL, H ;
DEMILLO, RA ;
SPAFFORD, EH .
IEEE SOFTWARE, 1991, 8 (03) :21-26
[3]   Assembly instruction level reverse execution for debugging [J].
Akgul, T ;
Mooney, VJ .
ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2004, 13 (02) :149-198
[4]  
Balzer R. M, 1969, P MAY 14 16 1969 SPR, P567
[5]   Reverse execution of programs [J].
Biswas, B ;
Mall, R .
ACM SIGPLAN NOTICES, 1999, 34 (04) :61-69
[6]  
Booth S. P., 1997, P 3 INT WORKSH AUT A, P171
[7]   Efficient algorithms for bidirectional debugging [J].
Boothe, B .
ACM SIGPLAN NOTICES, 2000, 35 (05) :299-310
[8]  
Carothers CD, 1999, THIRTEENTH WORKSHOP ON PARALLEL AND DISTRIBUTED SIMULATION - PROCEEDINGS, P126, DOI 10.1145/347823.347828
[9]   Reverse execution of Java']Java bytecode [J].
Cook, JJ .
COMPUTER JOURNAL, 2002, 45 (06) :608-619
[10]  
Jong-Deok Choi, 1998, Proceedings of the SIGMETRICS Symposium on Parallel and Distributed Tools, P48, DOI 10.1145/281035.281041