A.41 library(prolog_call_cycles): Find recursion in the static call graph
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(prolog_call_cycles): Find recursion in the static call graph
          • call_graph/2
          • call_graph_sccs/2
          • call_graph_sccs/3
          • left_transparent/1
          • left_recursion/2
          • left_recursion/3
    • Packages
Availability::- use_module(library(prolog_call_cycles)).(can be autoloaded)
Source[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.