JavaSlicer: program slicing for Java programs (demo)

Click here for a short description of the technique...

JavaSlicer is a program slicer for Java source code. It is based on the System Dependence Graph with some adaptations and extensions (JSysDG, exceptions...) to improve its accuracy in common Java constructs.

Given a Java program, first, a graph representation is generated, that contains all the control and flow interrelations. Then, the graph is traversed following the classic program slicing algorithm to extract slices in linear time.

This website is a limited trial of JavaSlicer, with time and memory constraints to avoid abuse.
You can generate slices and graphs for simple programs.
If you require higher limits, you can download the source code or pre-built binaries from its git repository.

You can either write down or paste a Java program.

Usage instructions:

  1. Paste/write your Java program.
  2. Select a variable in the editor to pick it as the slicing criterion.
  3. Press the Slice button, and the result will be loaded on the corresponding editor.

Slicing criterion (select it in the editor): ,