Factbase Inspector (FBI)

Each instance of the Factbase Inspector contains the following components:

  1. the information about the factbase from which PEFs are shown,
  2. a tree representation of PEFs with a root PEF,
  3. a toolbar offering possible actions and
  4. a text field for opening an ID in either this or a new FBI instance.

Opening an FBI

You can open a new Factbase Inspector from the

From the Java Editor

Select the part of the source code to inspect in the Factbase Inspector and choose Open in Factbase Inspector from the context menu.
The code selection does not need to be exact. The opened Factbase Inspector will show the PEF node which fully contains the selected code and which does not have a child PEF node fully containing the selected code.

From the Prolog Console

If the currently selected Prolog process in the Prolog Console corresponds to a JTransformer factbase, it is possible to open a Factbase Inspector from there. Select an ID in the console (typically a natural number) and select Open In Factbase Inspector from the context menu. The most likely case for opening a Factbase Inspector this way is the execution of a query on the console returning one or multiple IDs which should be inspected.

From the Package Explorer

Select a compilation unit in the Package Explorer and select Open in Factbase Inspector from the context menu.

PEF Presentation

The FBI shows PEFs in a tree representation. The root PEF of a FBI instance is determined when opening the instance.
For each PEF the FBI shows its term and an icon left to the term indicating its state.

The possible states are explained in the FBI help (see screenshot below). The most important information here is the distinction between PEFs which correspond to elements in source code (green) and PEFs which do not correspond to elements in source code (red).

FIXME image

For each PEF node the FBI also lists

  • all child nodes,
  • associated relations and
  • referenced nodes (only on demand).

These elements are shown as children in the tree presentation. They are either immediate children of the PEF in the tree or they are separated into groups. Possible groups are the arguments of the PEF containing references to child nodes, relations and unreferenced.

FBI with groups FBI without groups


Context Menu

For each PEF shown in the tree the context menu offers several possible actions.

  • Show Enclosing: A sub menu allowing to navigate the PEF model “upwards”, to an enclosing element of the selected node.
  • Show Referenced: Show the elements referenced by the selected PEF.
  • Show Source Code: Selects the source code corresponding to the selected node in an editor.
  • Show Reverse Engineered Code: Shows the code for the selected node which is reverse engineered from the PEF representation.
  • Copy Node to Clipboard: Opens the dialog for creating source templates with the selected node as root.
  • Copy NodeTerm to Clipboard: Copies the term of the selected PEF to the clipboard.
  • Open Factbase Inspector: Opens a dialog for opening a new Factbase Inspector.


  1. History navigation: This allow to browse back and forward through the history of the FBI. FBI saves all selections and expansions and allows to return to old states of the view.
  2. Show Referenced: Same as from the context menu.
  3. Show Source Code: Same as from the context menu.
  4. Open Factbase Inspector: Opens a dialog for opening a new Factbase Inspector.
  5. Options: Opens the options dialog.
  6. Help: Shows the FBI help dialog explaining the the different PEF states.
  7. Refresh: Refreshes the FBI. Normally this is done automatically if there are changes done to the source code or the factbase. But in some cases its necessary to do this refresh manually to be able to continue working with this FBI instance.


The options allow to customize the FBI behavior and appearance.

  • Show references: Some nodes have cross-references to other nodes. If “Current window” is chosen the cross-references will be displayed as children of the current node. Default is “New window”, which means that a new Factbase Inspector with the cross-referenced node will be opened when explicitly selecting “Show referenced” from the context menu of the referencing node (or by using the corresponding toolbar action).
  • Show arguments: Determines how node text should be displayed. The preview box displays the effect of the current choice.
  • Show Node-Groups: If this option is disabled, nodes will not be arranged in groups anymore.
  • Tooltip settings: Determines the appearance of tooltips for PEFs. The preview box displays the effect of the current choice.
  • Show source localtion settings: If this option is enabled, the information about the source location will be added to the PEF. The preview box displays the effect of the current choice.
  • Auto-Refresh settings: Auto-refresh automatically updates the Factbase Inspector view if there are changes in the factbase. But if facts are created with a built-in Prolog predicate (e.g. “assertz”), circumventing JTransformer, the Factbase Inspector will not be updated for these changes. In such cases the predicate “create_derived_facts” should be called so that the Factbase Inspector will be notified about the changes.
    If checked, auto-refresh will automatically call “create_derived_facts” ever so often, ensuring consistency of the display. However, this could have some performance issues in larger projects.
Last modified: 2016/04/17 17:52