Dependence Chasing
Prev |  | Next

## Dependence Chasing

### Dependence Tracking View

Kaveri allows the user to view and follow the program dependence information for a Java statement. To perform this action, the Dependence Tracking View needs to be activated. The view can be enabled from Window -> Show Views -> Kaveri -> Dependence Tracking View. The view has a Track Java Statements toolbar button similar to the Slice View that is used to toggle the active state of the view. The toolbar button changes its color to green to indicate the active state.

Once the view has been activated, selecting a Java statement in the editor will display the selected statement in the left pane of the view. The dependence information for that statement is presented in the right pane. The information displayed is as follows: for any tree node displaying Java statements, child nodes display the equivalent Jimple statements. If the Java source for one of the Jimple statements in the right pane is not available, only the Jimple node is displayed. To follow a dependence link, perform a double click on the corresponding node in the right pane. This displays the selected node in the editor and the left, and right panes are updated to show the dependence information corresponding to the selected node. When a double click is performed on a node in the right pane, the plugin records this information in the Dependence History View, so that the user has a visual record of the dependence information that was followed. The history information can be navigated so that the user can return to a previous point in dependence tracking history and follow a different dependence path.

The Dependence Tracking View has a set of filters that can be used to control the dependence information that is displayed in the right pane. For example, disabling the Dependee -> Control removes the control dependee information from the right pane. This allows the user to concentrate on the more relevant dependence information. The filters can be activated from the pull down menu in the toolbar.

Please note that the view currently does not allow navigation to points for which no Java source is available. These nodes are identified by the fact that the node displays the Jimple content and there is no parent node with a Java source text. Also, in Kaveri 0.4 Beta 1, the dependence tracking view is only operational when a slice has already been performed on a project. This requirement will be removed in the final release of Kaveri 0.4.

Figure 7. Dependence Tracking View

The dependence tracking view now supports named filters. The filters are accessible from the view drop down menu. To add a filter, press the Add filter button. After that the filter's name and the elements to be filtered can be changed. Press the Ok button to apply the changes. The current filter is displayed in the view status bar, when the view is highlighted.

### Dependence History View

The Dependence History View records the dependence path followed by the user using the Dependence Tracking View. This view records the information in the form of a stack with the first row displaying the current program point under observation. The dependence history can be navigated with the help of the navigation buttons present in the toolbar. The navigation is similar to the way a web browser's back and forward navigation buttons operate. To navigate to a specific point in the history, either the navigation buttons can be used or the user can select the point and click the Goto Source menu item from the context menu.

Each entry in the Dependence History View displays the Java statement that was tracked, the file in which the statement is present and the relation with the item below it. The relation can either be the dependence relation connecting the two statements that was followed from the Dependence Tracking View or "Starting Program Point" to indicate that the statements were not followed as a link from the Dependence Tracking View.

Figure 8. Dependence History View

Prev | Up | Next
Running Kaveri | Home | Parametric Regular Path Queries