Setup

Setting up Kaveri

Preferences

Indus Preferences

Before using Kaveri the user needs to define a set of configurations to use with the slicer. To do so open Window -> Preferences -> Indus Preferences from the Eclipse menu. A set of default configurations are provided. ( Refer to Figure 1 ). From the Configuration tab you can manage the set of slicer configurations. Be sure to press the Apply button after any changes to preserve the settings .

Figure 1. Slicer Configuration Preferences

Slicer Configuration Preferences

Note that installing Kaveri version 0.4 will delete the previous slice configurations. The reason being that Indus version 0.5 uses a different configuration scheme than Indus 0.3.

Scope Preferences

The Scope tab shows the set of current scope entities that have been already defined. The set of displayed scope entities are available to all the projects during slicing. The scope tab allows the user to create a new class scope specification and delete existing scope specifications.

Figure 2. Scope Preference

Scope Preference

Slice Button Configuration Preferences

The Slice Button Configurations tab allows the user to change the slice configurations used internally by the Backward and Forward slice action buttons. This enables the user to associate a more useful slice configuration with the slice buttons (for example, a "backward slice without deadlock" configuration to the Backward slice action button). The set configuration is then used to drive the slicer, when the corresponding button is pressed.

Figure 3. Slice Button Configuration

Slice Button Configuration

Exception Ignore List

The exception ignore list has been removed because it was felt that it didn't provide any significant benefits to the user and might cause confusion with regards to the slice.

Setting up the criteria

Slice View

A Java project can be associated with a set of slicing criteria pertaining to the Java files included in the project. Kaveri currently allows you to add Java statements as criteria for slicing. To add a Java statement as a criteria, enable the Slice View by going to Window -> Show View -> Other -> Kaveri -> Slice View. Once the Slice View has been enabled, the view is activated by pressing the Track Java Statements toolbar button. Upon pressing the button, the button changes its color to green to indicate that the view is active. Pressing it again will toggle the view to the disabled mode. When the view is active, navigate to a Java statement from the Java editor. The view's contents automatically change to reflect the Jimple statements that correspond to the chosen Java statement. The view also indicates if the statements are associated with the slice, if a slice has already been performed.

Jimple statements that have been already chosen as criteria as displayed with a blue or red foreground color in the view. A Jimple statement with a blue foreground color indicates that the statement was added as a criteria with value of expression turned on. A Jimple statement with a red foreground color indicates that the statement was added as a criteria with Control reaching the statement turned on.

Toolbar Buttons:

Track Java Statements
Toggles the active state of the view. The Jimple statements for Java statements chosen in the editor are only displayed when the view is switched on
Add as criteria (Pre-Execution)
Adds the selected Jimple statement to the set of criteria associated with the project. The criteria is added with the control reaching the statement property turned on.
Add as criteria (Post-Execution)
Adds the selected Jimple statement to the set of criteria associated with the project. The criteria is added with the value of the expression property turned on.
Remove Criteria
Removes the selected Jimple statement from the set of criterias associated with the project.
Add as Java criteria (Pre-Execution)
Adds all the Jimple statements shown in the view as criteria with control reaching the statements property turned on. This is a shortcut to manually adding all the statements as criteria.
Add as Java criteria (Post-Execution)
Adds all the Jimple statements shown in the view as criteria with value of the expression property turned on. This is a shortcut to manually adding all the statements as criteria.
Remove all Criteria
Removes all the Jimple statement in the view from the set of criterias associated with the project.

Figure 4. Slice View

Slice View