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[nondet]left_recursion(-LeftRecursion:dict, +Options)
[nondet]left_recursion(+SCCs, -LeftRecursion:dict, +Options)
Enumerate the left recursion in the call graph. For each set of predicates that are mutually recursive through calls in left position (see module header), LeftRecursion is a dict with the keys below. The first form computes the SCCs using call_graph_sccs/2 from Options.
members
Sorted list of predicate indicators involved.
cycle
List of edges (see call_graph_sccs/2) that form a shortest cycle through the first member.
edges
All left edges between the members.