Predicate DependenciesΒΆ

The Predicate Dependencies plugin displays dependency replationships in the KB. As shown in Fig. 78, there are 4 possible scopes for displaying this graph. Dependencies can be from the current file only, or from the current file plus imports with or without the core, or from the entire KB or import closure.

**Predicate Dependencies** source pull-down menu

Fig. 78 Predicate Dependencies source pull-down menu

In addition, dependencies can also be restricted to defined only, or both defined and asserted, as seen in Fig. 79.

**Predicate Dependencies** defined and defined+asserted menu

Fig. 79 Predicate Dependencies defined and defined+asserted menu

In the Sunflower project navigation tree, double click family.flr to load it. Then click Predicate Dependencies to launch the plugin. A predicate dependency graph for family.flr is shown in default modes All from entire KB and Defined only. The predicate dependencies displayed are based on the entire set of rules defined in the KB for family.flr. This is seen in Fig. 80.

**Predicate Dependencies** graph for family.flr in default modes **All from entire KB** and **Defined only**

Fig. 80 Predicate Dependencies graph for family.flr in default modes All from entire KB and Defined only

Switch from Defined only to Both defined and asserted. Additional predicate dependencies such as those involving child are now added to the graph. These additional dependencies are from direct assertions made in family.flr.

**Predicate Dependencies** graph for family.flr showing **Both defined and asserted** dependencies

Fig. 81 Predicate Dependencies graph for family.flr showing Both defined and asserted dependencies

Similar to the KB Graph plugin described in Section KB Graph, Predicate Dependencies also has View Dependencies from Selected Node and View Dependencies to Selected Node checkboxes to filter dependency relationships from/to a selected node, and a Reset button to restore the full dependency graph.

Look for the node grandparent in the graph. Click to highlight it. The node turns yellow indicating that it is selected. Other nodes which have predicate relationships with it are also highlighted, as seen in Fig. 82.

**Predicate Dependencies** graph with **grandparent** selected

Fig. 82 Predicate Dependencies graph with grandparent selected

Uncheck the View Dependencies to Selected Node checkbox. The graph shows only dependencies from the grandparent node, as in Fig. 83. Similarly, Reset to restore the full graph, then uncheck View Dependencies from Selected Node. The graph shows only dependencies from other nodes to grandparent, as in Fig. 84.

Predicate dependencies from **grandparent**

Fig. 83 Predicate dependencies from grandparent

Predicate dependencies to **grandparent**

Fig. 84 Predicate dependencies to grandparent

As also in the case of the KB Graph plugin, a Quick Search utility is available at the bottom of the Predicate Dependencies window to quickly highlight nodes of interest. Typing CTRL + Space in the Quick Search input bar pops up a list of possible search choices. The little blue i icon to the left of the Quick Search input bar shows a helpful reminder message when hovered over with a mouse.

Lastly, the Export option, as shown in Fig. 85, allows the graph to be saved to a user-specified location as a .png file.

The **Export** option in **Predicate Dependencies**

Fig. 85 The Export option in Predicate Dependencies