JSlice is dynamic slicing tool for Java programs. It collects and analyzes an execution trace (for slicing) in a compressed form.

  • What is dynamic slicing?

Dynamic slicing is a technique for program debugging and understanding. Given a program P, the programmer provides a slicing criterion of the form (I, L, V), where I is a program input, L is a set of some statement instances during execution of program P with input I, and V is a set of  variables referenced by L. The purpose of slicing is to find out statements in P which have affected the values of V at L during execution, via dynamic control or data dependencies. So, if during program execution, the values of V at L were "unexpected", the corresponding slice can be inspected to explain the reason for the unexpected values. More on dynamic slicing can be found in research paper [2].

  • Why collect, and analyze an execution trace in compressed form?

Dynamic slicing is performed on an execution trace by detecting dynamic control and data dependencies. However, the size of an execution trace may be huge. Consequently, it is important to compactly represent the execution trace and perform program analysis (e.g. dynamic slicing) over the compact representation.

  • How does the compression scheme work in the tool?

The compactness of the trace representation is owning to several factors. First, bytecodes which do not correspond to memory access or control transfer are not traced. Second, the sequences of addresses used by memory access or control transfer bytecodes are stored separately. Since these sequences typically have high repetition of patterns, we exploit such repetition to save space. We modify a well-known lossless data compression algorithm called SEQUITUR [1] for this purpose. More technical details about this tool have been discussed in our paper [3].

  • Are there similar tools available?

To the best of our knowledge, there is no other dynamic slicing tool available for Java. If you are interested, you can find static slicing tools for C and Java here.



[1] C. G. Nevill-Manning and I. H. Witten. Linear-time, incremental hierarchy inference for compression. In Data Commpression Conference (DCC), pages 3–11, 1997.

[2] F. Tip. A survey of program slicing techniques. Journal of Programming Languages, 3(3):121–189, 1995.

[3] Tao Wang and Abhik Roychoudhury. Using Compressed Bytecode Traces for Slicing Java Programs, ACM/IEEE International Conference on Software Engineering (ICSE) 2004. (pdf)