[det]call_graph(-Graph:dict,
+Options)Compute the static call graph for the predicates selected by
Options. Graph is a dict with the keys below.
Predicates are represented by qualified predicate indicators, M:Name/Arity.
- vertices
- Sorted list of predicates in scope. For
files(Files), these
are the predicates with clauses in Files and the dynamic predicates
declared in Files, including the files they include.
- ugraph
- The graph as a
library(ugraphs) graph.
- edges
- List of edges between predicates in scope. Each edge is a dict
edge{from:PI, to:PI, clause:ClauseRef, location:Dict},
where Location is the location dict of prolog_walk_code/1
(option on_edge). If a predicate calls another one multiple
times, there is an edge for each call.
- external
- List of edges from predicates in scope to other predicates. Only filled
if the option
external(true) is given.
- Introduced in 11.1.1 (👉1b03e7f) library(prolog_call_cycles) to find recursion in the call graph