
call_graph.pl -- Build the call graph used for NMR check construction and indexing.
Given the input program, build a call graph and assert the components.
- author
- - Kyle Marple
- version
- - 20170127
- license
- - BSD-3
a(?Head:int, ?Goal:int, ?Negation:int, ?ID:int) is det- Arc in the call graph from Head to Goal. Both head and goal will
always be positive with Negation indicating whether or not Goal was
originally negated. ID is the arc ID used to get associated rule IDs
from ar/2.
- Arguments:
-
Head | - Rule head. |
Goal | - Absolute value of rule goal. |
Negation | - 1 or 0 indicating if Goal was originally negated. |
ID | - Arc ID. See ar/2. |
ar(?ArcID:int, ?RuleIDs:list) is det- Associate an arc ID with a list of rule IDs. Each rule contains the
associated arc in the call graph; this avoids duplicate arcs.
- Arguments:
-
ArcID | - An integer ID indicating an arc. See a/4. |
RuleIDs | - A list of rule IDs with matching arcs in the call graph. |
build_call_graph(+Rules:list, -Nodes:list)- Build and assert the call graph. Return a list of nodes. Don't
includes rules with heads present in the list of exclude.
- Arguments:
-
Rules | - Rules to use in building call graph. |
Nodes | - Nodes in call graph. |
destroy_call_graph- Retract the assertions for the call graph.