Running Kaveri
Prev |  | Next

## Running Kaveri

### Steps

Step 1

  Right click the Java file or Java project in the navigator or package explorer window in Eclipse and choose either Indus -> Slice Java file or Indus -> Slice project from the context menu. The difference is that in the former only the specified file is sliced while in the latter all the files present in the Java project are sliced.

Step 2

  In the slice configuration dialog that appears, pick the slice configuration and the criteria for slicing. The Additive slice display check box indicates that the new slice should be added onto the display of the previous slice. This displays the slice as the union of the previous and the new slice.

  Figure 5. Running the slicer

Step 3
  Pick the scope that needs to be considered during the slice. The Scope tab in the slice configuration dialog enables the user to choose the scopes to be considered from the set of scope specifications created previously.
Step 4
  Pick the context for the slice, if required. The Contexts tab in the slice configuration dialog allows the user to specify the context for the slice. Please refer to Appendix - Contexts for details about picking contexts.
Step 5
  Manage the set of additional root methods. The Root Methods tab in the slice configuration dialog allows the user to delete any user-defined root methods before performing the slice. Please refer to Appendix - Root Methods for details about adding custom root methods.
Step 6
  Change the classpath used for slicing, if required. The Slice Class Path tab in the slice configuration dialog allows the user to change the classpath used by soot. The user can change the classpath to instrument alternative libraries in order to increase the speed of slicing.
Step 7

  Press the Run button to start the slicing. A progress dialog indicates the progress of the slicing. After the slice is completed, open the Java file if it is not currently open. If the Kaveri decorator is enabled (Refer to Figure 10 ) the slice is automatically highlighted. Else press the Slice Toggle button (Refer to Figure 9) to highlight the slice in the editor. There are two types of highlighting that are displayed. Java statements for which all the corresponding Jimple statements have the slice tag are highlighted in once color while those in which only a part of the Jimple statements have the slice tag are highlighted in a different color. To change the color for the slice highlighting go to Window -> Preferences -> Workbench -> Editors -> Annotations from the Eclipse menu and change the color for the ' IndusSliceAnnotation for the complete slice element highlight annotation and IndusPartialSliceAnnotation for the partial slice element highlight annotation. You may have to reopen the file in the editor and toggle the slice highlight for the change in color to be updated.

  Figure 6. Viewing the slice

  Please note that in this version of Kaveri, the soot environment is not reset for performance reasons. This means that when a slice has been performed on a project, the contents of the project should not be changed until Eclipse is closed. Doing so, may lead to incorrect slice displays. For example, if among two consecutive statements 'a' and 'b', only 'a' has the slice highlight and the statements are interchanged; then, on performing the same slice operation, 'b' will be tagged with the slice highlight meant for 'a'. Thus, it is necessary that the project contents remain unchanged after using the slice on a project. If any changes are made, please press the reset toolbar button and then perform a new slice on the changed code.

Prev | Up | Next
Setup | Home | Dependence Chasing