Note that KB Explorer:

  • is specifically for internal use only
  • should not be used by customers without express permission from CAST
  • is not officially supported and therefore CAST will not fix any issues that are found, nor make any feature updates or improvements

Introduction

KB Explorer is an internal tool that can be used to explore the content of any CAST analysis schema (*_local) stored on a local or remote CAST Storage Service/PostgreSQL instance:

  • Objects within the schema can be accessed as projects, modules, transactions, or metrics via the Object Tree, and directly through a dedicated search dialog box.
  • Links are also accessible through dedicated search dialog boxes.

Objects/links within the schema can be organized in a Graphical View:

  • properties are displayed in a specific table
  • the associated code is displayed in a dedicated code viewer

Click to enlarge

Current release

Current version is 0.9.8 (CAST Imaging Core 8.3.56). See KB Explorer - Release Notes.

First run

  • Find the CAST-KBExplorer.exe and double click it (since AIP 8.3.54, it is located inside the tools/KBExplorer subfolder of the AIP installation folder).
  • A new file called KBExplorer.preferences will be created in the same folder (or, if the folder is not RW, in %APPDATA%/CAST/CAST under Windows, and %HOME%/CAST/CAST/ under Linux):

  • The tool will then load (you may need to resize the main window to fit your display):

  • You should start by connecting to your target CAST Storage Service/PostgreSQL instance using the Connection dialog box, then put some objects onto the Graphical View.
  • You can also open the Preferences dialog box (from the menu bar: Edit/Edit Preferences...) and change some global preferences.

Connection dialog box

The Connection dialog box allows you to configure a connection to the required schema. You can access it using the F7 hotkey, or by selecting the following icon:

You can create a new connection, by inputting the URL and user credentials, then either input the schema name, or select it from the drop down list (to fill in the list, click Look Up Schemas). You can also select a previous connection from the list:

URL

This is the JDBC url for the CAST Storage Service/PostgreSQL instance where the target schema (*_local) is stored. The syntax is as follows:

jdbc:postgresql://<ip_address_or_hostname>:<port>/postgres
Change /postgres if the target schema is not stored in the default postgres database.
User / PasswordEnter the credentials that have permission to access the target schema. For the vast majority of CAST Storage Service / PostgreSQL instances, this will be operator/CastAIP
Schema

Enter the name of the target schema you want to access, for example myschema_local.

Look Up Schemas

Click this button to view a list of all schemas on the target CAST Storage Service / PostgreSQL instance, and then select the one you want:

Note that all schemas will be listed, but KB Explorer is only able to connect and explore schemas with the suffix _local.

Search dialog boxes

The Search dialog boxes allow you to retrieve objects from the connected Knowledge Base or the Graphical View, using various search criteria. You can access it using CTRL+F key combination (for the Knowledge Base), CTRL+SHIFT+F key combination (for the Graphical View), or by selecting the following icons:

Search Knowledge Base

Click to enlarge

Search Graph View

Click to enlarge

For both dialog boxes

Left hand panel

Configure the search string and other options in this panel:

Search KBEnter the string you want to search for.
Search Type

Select the type of items to be searched:

  • All - search is performed on all objects/transactions/metrics
  • Objects (default) - search is performed on objects (including modules and projects)
  • Modules - search is performed on modules/technical subsets only
  • Projects - search is performed on projects only
  • Transactions - search is performed on transactions only
  • Metrics - search is performed on metric only
Match field

Choose where the string will be searched:

  • ID - the object's ID (this is determined when the item is saved in the schema during an analysis)
  • Name (default) - the item's short name
  • Full Name - the item's full name (typically this includes the full path or the full SQL component name)
  • Description - the item's description (for metrics)

Click Go! to perform the search. Results are displayed in the right hand panel.

Previous searches are stored and can be accessed using the drop down:

Match mode

Choose the mode used to perform the search:

  • Contains (default) - will match the string on a part of the target field
  • Starts With - will match the string on the start of the target field
  • Ends With -  will match the string on the end of the target field
  • Exact Match - must match the string exactly
Case sensitiveSelect this option if you want to match the case of the search string. For instance, if you enter "SyS" and check the option, all instances of "SYS" will be ignored.
Object TypeUse this option to filter the objects according to a specific type.

Right hand panel

Search results are displayed in this panel:

Clear resultsClears the results from the panel.
Add to view [Knowledge Base only]Adds the selected item or items (i.e. in the list of results) to the Graphical View. Multiple items can be selected using CTRL/SHIFT + mouse.
Add all to view [Knowledge Base only]Adds all the items in the results panel to the Graphical View
Update in view [Graphical View only]Applies selection and tracking options to the selected item or items (i.e. in the list of results) to the Graphical View. Multiple items can be selected using CTRL/SHIFT + mouse.
Update all in view [Graphical View only]Applies selection and tracking options to all the items in the results panel to the Graphical View
Remove from viewRemoves the selected items from the Graphical View. Multiple items can be selected using CTRL/SHIFT + mouse.
Remove all from viewRemoves all the items in the results panel from the Graphical View.

NB: double clicking on an item in Search Knowledge Base dialog box will add it to/remove it from the Graphical View.

Bottom panel

Action modes are displayed in this panel:

Selection

The selection mode to use for the added objects:

  • No selection
  • Add to selection
  • Replace selection
Tracking

The highlighting mode to use for the added objects:

  • No highlighting
  • Add to highlighted nodes
  • Replace highlighted nodes

Preferences dialog box

Some global preferences can be set in this screen:

Product root pathThe path to the installation location of AIP Core. This insures that the object type icons are correctly displayed in the Object Tree and in the Graphical View. For icons provided by extensions, the CastGlobalSettings.ini file is used to determine how KB Explorer should access the extension storage folder. 
Views folder pathThe path to the folder used to store the views.
Node default radiusThe value of the radius for nodes being added to the Graphical View.
Node default styleThe style of the nodes being added to the Graphical View.
Node default highlight styleThe highlighting style of the nodes being added to the Graphical View.
Edge default styleThe style of the edges being added to the Graphical View.
Parent edge default styleThe style of the parent edges being added to the Graphical View. Those edges are used to represent Belongs To links.
Metric edge default styleThe style of the metric edges being added to the Graphical View. Thoses edges are used to represent Is Violating, Has Measure, and In Range pseudo links.
Escalated edge default styleThe style of the escalated edges being added to the Graphical View. Those edges are used to represent escalated pseudo links.
Transitive edge default styleThe style of the transitive edges being added to the Graphical View. Those edges are used to represent transitive pseudo links.
Connected edge default styleThe style of the connected edges being added to the Graphical View. Those edges are used to represent connected pseudo links (not yet available).
Comment default styleThe style of the comments being added to the Graphical View
Select expand link display strategy

The strategy to be used when adding links to the Graphical View:

  • Circle: the links are displayed circularly around the caller node
  • Up: the links are displayed above the caller node
  • Down: the links are displayed below the caller ndoe
  • Left: the links are displayed on the left of the caller node
  • Right: the links are displayed on the right of the caller node
Select copy/paste format

The format of the data copied/pasted from the Information Tabs tables:

  • CSV like
  • JIRA wiki
  • HTML table
Include column headers in copy/pasteWhen checked, the table headers are included in the data copied/pasted from the Information Tabs tables.
Auto format columnsWhen checked, the columns from the Information Tabs tables will be automatically formatted.
Syntax highlightingWhen checked, the code viewer will use syntax highlighting.
Rotate texts on edgesWhen checked, the texts displayed on edges are rotated.
Debug modeWhen checked, technical pieces of information are displayed in the Object Tree and in the Graphical View.
Default languages per file extensionThe read-only table of the predefined file extensions associated to languages; languages are used for syntax coloring in the code viewer
Languages per file extensionThe table of the user defined file extensions associated to languages

Rotating texts on edge may affect performances when the graphical view contains thousands of objects.

Object Tree

The Object Tree is used to hierarchically navigate the items in the target schema, starting from a project, from a module, from a transaction, from a metric (rule/measure/distribution), or from a AMT language:

Nodes already present in the Graphical View are displayed in bold italics.

Except for AMT metamodel, right clicking a node will give you access to a contextual menu, that allows you to add/remove the node to the Graphical View (you can also drag and drop the node onto the  Graphical View):

Contextual Menu

The following commands are available in the contextual menu accessed when right clicking selected nodes:

  • Add to Graph View - to add the selected objects to the Graphical View.
  • Replace Graph View Selection - to select the selected objects in the Graphical View.
  • Add to Graph View Selection - to add the selected objects to the selection in the Graphical View.
  • Locate in Graph View - to locate the selected objects in the Graphical View.
  • Highlight in Graph View - to add the selected objects to the highlighted items in the Graphical View.
  • Remove from Graph View - to remove the selected objects to the Graphical View.
  • Add Objects with Children - to add the selected objects along with their children to the Graphical View.
  • Add Objects with Callers - to add the selected objects along with their callers to the Graphical View.
  • Add Objects with Callees - to add the selected objects along with their callees to the Graphical View.
  • Add Objects with Parents - to add the selected objects along with their parents to the Graphical View.
  • Add Objects with Violations - to add the selected objects along with their violations to the Graphical View.
  • Add Objects with Measures - to add the selected objects along with their measures to the Graphical View.
  • Add Objects with Distribution Ranges - to add the selected objects along with their distribution ranges to the Graphical View.
  • Add Objects with all Links - to add the selected objects along with all their linked objects to the Graphical View.

Hotkeys/Accelerators

  • <CTRL+P> - selects the Projects tab
  • <CTRL+M> - selects the Modules tab
  • <CTRL+T> - selects the Transactions tab
  • <CTRL+E> - selects the Metrics tab

Information Tabs

When some nodes are selected in the Object Tree, or some nodes/links/transactions/metrics are selected in the Graphical View, the associated pieces of information about the item are displayed in the Information Tabs located below the Graphical View:

Hotkeys/Accelerators

  • <F9> - selects the Identity  tab
  • <F12> -selects the Properties tab
  • <F11> - selects the Code tab
  • <F10> - selects the Links tab
  • <F3> - selects the Violations tab
  • <F4> - selects the Measures tab
  • <F5> - selects the Distributions tab

Identity

The Identity tab displays all pieces of information that could be used to identify the selected items:

It can also display similar pieces of information for the selected links:

It can also display similar pieces of information for the selected metrics:

Contextual Menu

The following commands are available in the contextual menu accessed when right clicking a row:

  • Add to Graph View - to add the selected objects to the Graphical View.
  • Replace Graph View Selection - to select the selected objects in the Graphical View.
  • Add to Graph View Selection - to add the selected objects to the selection in the Graphical View.
  • Locate in Graph View - to locate the selected objects in the Graphical View.
  • Highlight in Graph View - to add the selected objects to the highlighted items in the Graphical View.
  • Remove from Graph View - to remove the selected objects to the Graphical View.

Properties

The Properties tab displays all properties associated to the selected items:

It can also display similar pieces of information for the selected links:

Code

The Code tab displays the source code associated with the selected objects:

It can also display the code bookmarks of the selected links:

Hotkeys/Accelerators

  • F2 - navigate to the next bookmark
  • Alt F2 - navigate to the previous bookmark

The Links tab list the links associated to the selected items:

It can also list links for the selected links:

Contextual Menu

The following commands are available in the contextual menu accessed when right clicking a row:

  • Add to Graph View - to add the selected objects to the Graphical View.
  • Replace Graph View Selection - to select the selected objects in the Graphical View.
  • Add to Graph View Selection - to add the selected objects to the selection in the Graphical View.
  • Locate in Graph View - to locate the selected objects in the Graphical View.
  • Highlight in Graph View - to add the selected objects to the highlighted items in the Graphical View.
  • Remove from Graph View - to remove the selected objects to the Graphical View.

Violations

The Violations tab list the violations (of rules) associated to the selected objects (either in the Object Tree, or in the Graphical View):

It is also possible to select a metric in the Object Tree and view all objects that violate that rule:

Contextual Menu

The following commands are available in the contextual menu accessed when right clicking a row:

  • Add to Graph View - to add the selected objects to the Graphical View.
  • Replace Graph View Selection - to select the selected objects in the Graphical View.
  • Add to Graph View Selection - to add the selected objects to the selection in the Graphical View.
  • Locate in Graph View - to locate the selected objects in the Graphical View.
  • Highlight in Graph View - to add the selected objects to the highlighted items in the Graphical View.
  • Remove from Graph View - to remove the selected objects to the Graphical View.
  • Add Violations Details - to add the complementary objects to the Graphical View (deactivated if the Complementary Object ID cell is empty).

Measures

The Measures tab list the measures (of metrics) associated to the selected objects (either in the Object Tree, or in the Graphical View):

Contextual Menu

The following commands are available in the contextual menu accessed when right clicking a row:

  • Add to Graph View - to add the selected objects to the Graphical View.
  • Replace Graph View Selection - to select the selected objects in the Graphical View.
  • Add to Graph View Selection - to add the selected objects to the selection in the Graphical View.
  • Locate in Graph View - to locate the selected objects in the Graphical View.
  • Highlight in Graph View - to add the selected objects to the highlighted items in the Graphical View.
  • Remove from Graph View - to remove the selected objects to the Graphical View.

Distributions

The Distributions tab list the distributions ranges (of metrics) associated to the selected objects (either in the Object Tree, or in the Graphical View):

Contextual Menu

The following commands are available in the contextual menu accessed when right clicking a row:

  • Add to Graph View - to add the selected objects to the Graphical View.
  • Replace Graph View Selection - to select the selected objects in the Graphical View.
  • Add to Graph View Selection - to add the selected objects to the selection in the Graphical View.
  • Locate in Graph View - to locate the selected objects in the Graphical View.
  • Highlight in Graph View - to add the selected objects to the highlighted items in the Graphical View.
  • Remove from Graph View - to remove the selected objects to the Graphical View.

Graphical View

The Graphical View displays objects/transactions/metrics and links selected (or dragged/dropped) from the Object Tree, or from the search dialog boxes: each node/item corresponds to one object in the target schema, and each link to one link in the target schema (either physical - i.e., stored in the Acc table, or logical - i.e., stored in another table: KeyPar, ObjPro, ...). It is also possible to associate comments to a node or an edge:

Commands toolbar

The toolbar contains commands that apply to the whole graph:

  • Auto Layout Objects Graph - to reposition nodes in the Graphical View for a better display.
  • Fit Graph to Screen -to display some nodes, by shifting/rescaling the graph.
  • Select graph layout mode - to specify the scope for the two commands above:
    • Layout based on all nodes when checked, the scope for the two commands above is based on all the nodes present in the Graphical View
    • Layout based on nodes selected in tree when checked, the scope for the two commands above is restricted to selected nodes in the current tree, after having added them to the Graphical View, if needed
    • Layout based on nodes selected current table when checked, the scope for the two commands above is restricted to selected nodes in the current tab, after having added them to the Graphical View, if needed
    • Layout based on nodes selected in graph view - when checked, the scope for the two commands above is restricted to selected nodes in the Graphical View
  • Create a New View - to clear the current Graphical View
  • Restore View from XML File to load a Graphical View from a previously saved .kbviewxml file
  • Save View to XML File - to save the Graphical View to a .kbviewxml file
  • Change graph origin X to change/display the horizontal graph origin
  • Change graph origin Y to change/display the vertical graph origin
  • Change graph scale to change/display the graph scale
  • Select adjustment unit to activate the auto adjustment of nodes
  • Search Graph View to search nodes in the Graphical View
  • Print Graph to print the Graphical View

Hotkeys/Accelerators

  • <SHIFT+🠈> - move the Graphical View one digit left
  • <SHIFT+🠊> - move the Graphical View one digit right
  • <SHIFT+🠉> - move the Graphical View one digit up
  • <SHIFT+🠋> - move the Graphical View one digit down
  • <CTRL+🠈> - move the Graphical View ten digits left
  • <CTRL+🠊> - move the Graphical View ten digits right
  • <CTRL+🠉> - move the Graphical View ten digits up
  • <CTRL+🠋> - move the Graphical View ten digits down
  • <CTRL+F> - search for an object
  • <CTRL+O> - open a graph from a .kbviewxml file
  • <CTRL+S> - save the current graph as a .kbviewxml file
  • <SHIFT+Delete> - remove the selected nodes/edges from the Graphical View
  • <+> - inflate the selected nodes/edges
  • <-> - deflate the selected nodes/edges
  • <space> - toggle selection on the node/edge holding the focus
  • <C> - opens the color selection dialog box on the node/edge holding the focus
  • <Q> - toggle the grid on/off
  • <CTRL+SHIT + F> - search nodes in the Graphical View
  • <CTRL+P> - print the Graphical View

Right clicking on a node, an edge, a comment, or the background will display a contextual menu.

Node contextual menu

The following commands are available in the contextual menu accessed when right clicking a node:

  • Remove Node(s):to remove the selected nodes from the view
  • Find Children: to retrieve the children of the selected nodes
  • Find Callers: to retrieve the callers of the selected nodes
  • Find Callees: to retrieve the callees of the selected nodes
  • Find Parents: to retrieve the parents of the selected nodes
  • Find Violations: to retrieve the violations of the selected nodes
  • Find Measures: to retrieve the measures of the selected nodes
  • Find Distribution Ranges: to retrieve the distribution ranges of the selected nodes
  • Find Links Between Selected Objects: to retrieve the links between the selected nodes
  • Escalate Links Between Selected Objects: to compute the escalated links between the selected nodes
  • Find Transitive Links Between Selected Objects: to compute the transitive links between the selected nodes
  • Locate Selected Objects in Current Tree: to locate the selected nodes inside the current tree
  • Next Selected Objects in Current Tree: to jump to the next location of the selected nodes inside the current tree
  • Previous Selected Objects in Current Tree: to jump to the previous location of the selected nodes inside the current tree
  • Change Color: to change the color of the selected nodes
  • Change Background Color: to change the background color of the selected nodes
  • Add Comment: to add a comment to the selected node (does not support the multi-selection):

  • Zoom in: to increase the size of the selected nodes
  • Zoom out: to decrease the size of the selected nodes
  • Horizontal Alignment: to align objects horizontally
  • Vertical Alignment: to align objects vertically
  • Horizontal Distribution: to evenly distribute objects horizontally
  • Vertical Distribution: to evenly distribute objects vertically

All the objects retrieved using one of the Find ... commands are displayed in dialog box similar to the Search dialog box, allowing the user to add a part of the results onto the Graphical View:

Action modes are displayed in the bottom line:

Use directional display strategy (Down/Left/Right/Up)

For children/callers/callees/parents, use a specific placement strategy of the added nodes.
Not available for violations/measures/distribution ranges

Keep main object selected

The main object selection is kept

Selection

The selection mode to use for the added objects:

  • No selection
  • Add to selection
  • Replace selection
Tracking

The highlighting mode to use for the added objects:

  • No highlighting
  • Add to highlighted nodes
  • Replace highlighted nodes


Linked objects already present in the Graphical View are displayed in bold italics.

The links retrieved by the Find Links Between Selected Objects command are displayed in a dedicated dialog box, allowing the user to add a part of the results onto the Graphical View:

Edge/link contextual menu

The following commands are available in the contextual menu accessed when right clicking an edge or link:

  • Remove Edge(s) - to remove the selected edges from the view
  • Expand caller Side- to expand the selected escalated/transitive links on caller side
  • Expand callee Side - to expand the selected escalated/transitive links on callee side
  • Expand both caller/callee Sides - to expand the selected escalated/transitive links on both caller and callee sides
  • Expand all Links - to fully expand the selected escalated/transitive/violation/distribution range links
  • Change Colorto change the color of the selected edges
  • Add Comment: to add a comment to the selected link (does not support the multi-selection)
  • Zoom into increase the width of the selected edges
  • Zoom out to decrease the width of the selected edges

Comment contextual menu

The following commands are available in the contextual menu accessed when right clicking a comment in the view:

  • Remove Comment(s) - to remove the selected comments from the view
  • Change Text - to change the text of the comment
  • Change Font to change the font of the comment: family (Arial, Calibri, Tahoma, ...), size (4 to 72), bold, italic
  • Increase Font Size - to increase the font size (up to 72)
  • Decrease Font Size - to decrease the font size (down to 4)
  • Toggle Font Italic - to toggle the italic style of the font
  • Toggle Font Bold - to toggle the bold style of the font
  • Change Colorto change the color of the selected comments
  • Change Background Colorto change the background color of the selected comments
  • Zoom into increase the width of the selected comments
  • Zoom out to decrease the width of the selected comments

Background contextual menu

Following commands are available from the background contextual menu:

  • Show grid: to show/hide the view grid
  • Search Graph View: to search nodes in the Graphical View
  • Move left: to move the view to the left from one pixel
  • Move right: to move the view to the right from one pixel
  • Move up: to move the view up from one pixel
  • Move down: to move the view down from one pixel
  • Run left: to move the grid to the view from ten pixels
  • Run right: to move the view to the right from ten pixels
  • Run up: to move the view up from ten pixels
  • Run down: to move the view down from ten pixels

Saving/Restoring views into/from XML files

The views can be saved and restored using the Save View to XML File/Restore View from XML File commands.

Save the Graph View to Workspace

Restore a Graph View from Workspace


A view can be restored on a schema different from the one it has been created on, provided that some of the corresponding schema objects are present in the target schema. This allows you to compare the results between two versions of the same schema.