The Step Tree
The heart of a Kahina-based debugger for any logic programming system is the control flow tree or step tree, which represents the computation steps as nodes and allows the user to select every node in order to retrieve the associated information, which is then displayed in the local views. Each node in the tree is color-coded to mark which port last occurred on the corresponding step. The control flow tree can display both the call tree and the search tree in parallel.
The Search Tree
The search tree is symbolized by the macro structure which determines the tree's overall layout, making the backtracking completely transparent.
The Call Tree
At the same time, the call tree can be represented by indentation levels in the linear fragments of the search tree. Both display dimensions together contain comprehensive information on the reasons why the steps occurred in which order.
Layering Mechanism
To keep the tree navigable even if it contains thousands of nodes, a layering mechanism separates the tree into meaningful units. Certain step types can be configured to be treated as corner-stone nodes, which define the context boundaries at which the tree fragments at the display layers are pruned. Navigation in the tree then works by selecting nodes at one of the layers, causing the fragments at all layers to adapt.
Calls to the following predicates are assigned to the overview tree during QType compilation processes:
compile_grammar/1 | The top-level predicate for compilation. |
tokenize_and_parse_the_external_syntax/1 | Tokenizes and parses the grammar, asserting the contents into the database. |
compile_signature | Top-level predicate for signature compilation. |
TODO: add many more here |