Abstract
Dynamic slicing is a well-known technique for program analysis, debugging and understanding. Given a program P and input I, it finds all program statements which directly/indirectly affect the values of some variables' occurrences when P is executed with I. In this article, we develop a dynamic slicing method for Java programs. Our technique proceeds by backwards traversal of the bytecode trace produced by an input I in a given program P. Since such traces can be huge, we use results from data compression to compactly represent bytecode traces. The major space savings in our method come from the optimized representation of (a) data addresses used as operands by memory reference bytecodes, and (b) instruction addresses used as operands by control transfer bytecodes. We show how dynamic slicing algorithms can directly traverse our compact bytecode traces without resorting to costly decompression. We also extend our dynamic slicing algorithm to perform “relevant slicing”. The resultant slices can be used to explain omission errors that is, why some events did not happen during program execution. Detailed experimental results on space/time overheads of tracing and slicing are reported in the article. The slices computed at the bytecode level are translated back by our tool to the source code level with the help of information available in Java class files. Our JSlice dynamic slicing tool has been integrated with the Eclipse platform and is available for usage in research and development.
- Agrawal, H. 1991. Towards automatic debugging of computer programs. Ph.D. dissertation, Purdue University. Google Scholar
Digital Library
- Agrawal, H. and Horgan, J. 1990. Dynamic program slicing. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM, New York, 246--256. Google Scholar
Digital Library
- Agrawal, H., Horgan, J., Krauser, E., and London, S. 1993. Incremental regression testing. In Proceedings of the International Conference on Software Maintenance (ICSM) (Washington, DC). IEEE Computer Society Press, Los Alamitos, CA, 348--357. Google Scholar
Digital Library
- Akgul, T., Mooney, V., and Pande, S. 2004. A fast assembly level reverse execution method via dynamic slicing. In Proceedings of the International Conference on Software Engineering (ICSE) (Edinburgh, Scotland). IEEE Computer Society Press, Los Alamitos, CA, 522--531. Google Scholar
Digital Library
- Andersen, L. O. 1994. Program analysis and specialization for the C progranzming language. Ph.D. dissertation, University of Copenhagen.Google Scholar
- Berk, E. J. and Ananian, C. S. 2003. A lexical analyzer generator for Java. website: http://www.cs.princeton.edu/~appel/modern/java/JLex/.Google Scholar
- Dhamdhere, D., Gururaja, K., and Ganu, P. 2003. A compact execution history for dynamic slicing. Inf. Proc. Lett. 85, 145--152. Google Scholar
Digital Library
- Ferrante, J., Ottenstein, K., and Warren, J. 1987. The program dependence graph and its use in optimization. ACM Trans. Prog. Lang. Syst. 9, 3, 319--349. Google Scholar
Digital Library
- Goel, A., Roychoudhury, A., and Mitra, T. 2003. Compactly representing parallel program executions. In Proceedings of the ACM Symposium on Principles and Practice of Parallel Programming (PPoPP). San Diego, CA, USA, 191--202. Google Scholar
Digital Library
- Gyimóthy, T., Beszédes, A., and Forgács, I. 1999. An efficient relevant slicing method for debugging. In Proceedings of the 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering (Toulouse, France). ACM, New York, 303--321. Google Scholar
Digital Library
- Horwitz, S., Reps, T., and Binkley, D. 1990. Interprocedural slicing using dependence graphs. ACM Trans. Prog. Lang. Syst. (TOPLAS) 12, 1, 26--60. Google Scholar
Digital Library
- JGF. The Java Grande Forum Benchmark Suite. website: http://www.epcc.ed.ac.uk/javagrande/seq/contents.html.Google Scholar
- Joy, B., Steele, G., Gosling, J., and Bracha, G. 2000. Java(TM) Language Specification (2nd Edition). Prentice Hall, Englewood Cliffs, NJ.Google Scholar
- Kaffe. The Kaffe virtual machine. website: http://www.kaffe.org.Google Scholar
- Korel, B. and Laski, J. W. 1988. Dynamic program slicing. Inf. Proc. Lett. 29, 3, 155--163. Google Scholar
Digital Library
- Korel, B. and Rilling, J. 1997. Application of dynamic slicing in program debugging. In Proceedings of the International Workshop on Automatic Debugging (Linkoping, Sweden). Springer-Verlag, New York.Google Scholar
- Lamport, L. 1997. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM 21, 558--565. Google Scholar
Digital Library
- Larsen, L. and Harrold, M. 1996. Slicing object-oriented software. In Proceedings of the ACM/IEEE International Conference on Software Engineering (ICSE) (Berlin, Germany). IEEE Computer Society Press, Los Alamitos, CA, 495--505. Google Scholar
Digital Library
- Larus, J. 1990. Abstract execution: A technique for efficiently tracing programs. Software - Practice and Experience (SPE) 20, 1241--1258. Google Scholar
Digital Library
- Larus, J. R. 1999. Whole program paths. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM, Atlanta, Georgia, USA, 259--269. Google Scholar
Digital Library
- Levrouw, L. J., Audenaert, K. M. R., and Campenhout, J. M. 1994. A new trace and replay system for shared memory programs based on lamport clocks. In Proceedings of the 2nd Euromicro Workshop on Parallel and Distributed Processing. IEEE Computer Society, ELIS, Universiteit Gent, Belgium, 471--478.Google Scholar
- Lhoták, O. 2002. Spark: A flexible points-to analysis framework for Java. M.S. dissertation, McGill University.Google Scholar
- Lindholm, T. and Yellin, F. 1999. The Java(TM) Virtual Machine Specification (2nd Edition). Prentice Hall, Englewood Cliffs, NJ. Google Scholar
Digital Library
- Lucia, A. D. 2001. Program slicing: Methods and applications. In Proceedings of the IEEE International Workshop on Source Code Analysis and Manipulation (Florence, Italy). IEEE Computer Society Press, Los Alamitos, CA, 142--149.Google Scholar
Cross Ref
- Majumdar, R. and Jhala, R. 2005. Path slicing. In Proceedings of the International Conference on Programming Language Design and Implementation (PLDI) (Chicago, IL). ACM, New York. Google Scholar
Digital Library
- Nevill-Manning, C. G. and Witten, I. H. 1997. Linear-time, incremental hierarchy inference for compression. In Proceedings of the Data Commpression Conference (DCC) (Snowbird, Utah). IEEE Computer Society Press, Los Alamitos, CA, 3--11. Google Scholar
Digital Library
- Ohata, F., Hirose, K., Fujii, M., and Inoue, K. 2001. A slicing method for object-oriented programs using lightweight dynamic information. In Proceedings of the Asia-Pacific Software Engineering Conference (Macau, China). IEEE Computer Society Press, Los Alamitos, CA. Google Scholar
Digital Library
- Pleszkun, A. R. 1994. Techniques for compressing programm address traces. In Proceedings of the IEEE/ACM International Symposium on Microarchitecture (MICRO) (San Jose, CA). ACM, New York, 32--39. Google Scholar
Digital Library
- Reiss, S. P. and Renieris, M. 2001. Encoding program executions. In Proceedings of the ACM/IEEE International Conference on Software Engineering (ICSE) (Toronto, Ont., Canada). IEEE Computer Society Press, Los Alamitos, CA, 221--230. Google Scholar
Digital Library
- Ronsse, M. and Bosschere, K. D. 1999. Recplay: A fully integrated practical record/replay system. ACM Trans. Comput. Syst. (TOCS) 17, 133--152. Google Scholar
Digital Library
- Sazeides, Y. 2003. Instruction isomorphism in program execution. J. Instruction-Level Paral. 5.Google Scholar
- Sinha, S. and Harrold, M. J. 2000. Analysis and testing of programs with exceptionhandling constructs. IEEE Trans. Softw. Eng. 26, 9, 849--871. Google Scholar
Digital Library
- SPECjvm98. 1998. Spec JVM98 benchmarks. website: http://www.specbench.org/osg/jvm98/.Google Scholar
- Steensgaard, B. 1996. Points-to analysis in almost linear time. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (St. Petersburg Beach, FL). ACM, New York, 32--41. Google Scholar
Digital Library
- Tip, F. 1995. A survey of program slicing techniques. J. Prog. Lang. 3, 3, 121--189.Google Scholar
- Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., and Sundaresan, V. 1999. Soot - A Java bytecode optimization framework. In Proceedings of the Conference of the Centre for Advanced Studies on Collaborative Research (CASCON) (Mississauga, Ontario, Canada). IBM Press. 13. Google Scholar
Digital Library
- Wang, T. and Roychoudhury, A. 2007. Dynamic slicing on Java bytecode traces. Tech. Rep. TRB3/07, National University of Singapore. March. http://www.comp.nus.edu.sg/~abhik/pdf/JSlice-TR.pdf.Google Scholar
- Weiser, M. 1984. Program slicing. IEEE Trans. Softw. Engineering 10, 4, 352--357.Google Scholar
Digital Library
- Xu, B., Chen, Z., and Yang, H. 2002. Dynamic slicing object-oriented programs for debugging. In Proceedings of the IEEE International Workshop on Source Code Analysis and Manipulation (Montreal, Canada). IEEE Computer Society Press, Los Alamitos, CA. Google Scholar
Digital Library
- Zhang, Y. and Gupta, R. 2001. Timestamped whole program path representation and its applications. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (Snowbird, UT). ACM, New York, 180--190. Google Scholar
Digital Library
- Zhang, X. and Gupta, R. 2004. Whole execution traces. In Proceedings of the IEEE/ACM International Symposium on Microarchitecture (MICRO) (Portland, OR). IEEE Computer Society Press, Los Alamitos, CA, 105--116. Google Scholar
Digital Library
- Zhang, X., Gupta, R., and Zhang, Y. 2005. Cost and precision tradeoffs of dynamic data slicing algorithms. ACM Trans. Prog. Lang. Syst. (TOPLAS) 27, 631--661. Google Scholar
Digital Library
- Zhao, J. 2000. Dependence analysis of Java bytecode. In IEEE Annual International Computer Software and Applications Conference (Taipei, Taiwan). IEEE Computer Society Press, Los Alamitos, CA, 486--491. Google Scholar
Digital Library
- Zilles, C. B. and Sohi, G. 2000. Understanding the backward slices of performance degrading instructions. In Proceedings of the International Symposium on Computer Architecture (ISCA) (Vancouver, BC, Canada). IEEE Computer Society Press, Los Alamitos, CA, 172--181. Google Scholar
Digital Library
Index Terms
Dynamic slicing on Java bytecode traces
Recommendations
A brief survey of program slicing
Program slicing is a technique to extract program parts with respect to some special computation. Since Weiser first proposed the notion of slicing in 1979, hundreds of papers have been presented in this area. Tens of variants of slicing have been ...
Slicing concurrent Java programs using Indus and Kaveri
Program slicing is a program analysis and transformation technique that has been successfully used in a wide range of applications including program comprehension, debugging, maintenance, testing, and verification. However, there are only few fully ...
A tracing technique using dynamic bytecode instrumentation of Java applications and libraries at basic block level
ICOOOLPS '11: Proceedings of the 6th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and SystemsImplementing a profiler to trace a program execution is non-trivial. One way to do this on running Java programs is through bytecode instrumentation. Nowadays, tools exist that ease the instrumentation process itself, but as far as we know, none offers ...






Comments