All predicatesShow sourcestack.pl

Source justification_tree(:Stack, -JustificationTree, +Options)
Process Stack as produced by solve/4 into a justification tree. Options include:

<none yet>

The tree format is defined as follows.

The root node has the atom query and has two children: the actual query and the atom o_nmr_check which represents the global constraints.

Source stack_tree(+Stack, -Tree) is det[private]
Translate the solver Stack into a tree. The solver stack is represented as a flat list of proved goals where [] indicates this branch is complete. Here are some examples

[p, []] p-[] [p, q, [], []] p-[q-[]] [p, q, [], r, [], []] p-[q-[],r-[]]

We maintain a stack of difference lists in the 4th argument. On encountering a [] we pop this stack.

Source filter_tree(+Children, +Module, -FilteredChildren, +Options)[private]
Clean the tree from less interesting details. By default removes auxiliary nodes created as part of the compilation and the NMR proof if this is empty. Additional filtering is based on Options:
pos(true)
Remove all not(_) nodes from the tree.
long(true)
Keep the full tree, including forall() and intermediate nodes.
Source filter_pos(+Node, +Options) is semidet[private]
Filter negated nodes when --pos is active. We should not filter the global constraint nodes.
Source print_justification_tree(:Tree) is det
Source print_justification_tree(:Tree, +Options) is det
Print the justification tree as returned by justification_tree/3 or scasp_justification/2. The tree is printed to the current output stream. Options:
format(+Format)
One of unicode (default) or ascii.
depth(+Integer)
Initial indentation (0)
indent(+Integer)
Indent increment per level (3).
full_stop(+Bool)
End the tree with a full stop and newline. If false, it ends with the last atom.
Source plain_output(+FilterChildren, +Options)[private]
Source term(+Node, +Options) is det[private]
Print a, possibly annotated, stack atom.
Source unqualify_justitication_tree(:TreeIn, +Module, -TreeOut) is det
Unqualify the nodes in TreeIn, turning the nodes qualified to module Module into plain nodes.

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source print_justification_tree(:Tree) is det
Source print_justification_tree(:Tree, +Options) is det
Print the justification tree as returned by justification_tree/3 or scasp_justification/2. The tree is printed to the current output stream. Options:
format(+Format)
One of unicode (default) or ascii.
depth(+Integer)
Initial indentation (0)
indent(+Integer)
Indent increment per level (3).
full_stop(+Bool)
End the tree with a full stop and newline. If false, it ends with the last atom.