Call graph nodes.
Machine integer Int is sufficient, since we cannot index more than we have addresses on our machine.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
ModuleAgda-2.7.0.1Haskell2010
Call graphs and related concepts, more or less as defined in "A Predicative Analysis of Structural Recursion" by Andreas Abel and Thorsten Altenkirch.
Call graph nodes.
Machine integer Int is sufficient, since we cannot index more than we have addresses on our machine.
Calls are edges in the call graph. It can be labelled with several call matrices if there are several pathes from one function to another.
Make a call with a single matrix.
Make a call with empty cinfo.
Outgoing node.
Incoming node.
A call graph is a set of calls. Every call also has some associated meta information, which should be Monoidal so that the meta information for different calls can be combined when the calls are combined.
CallGraphtheCallGraph :: Graph Node (CMSet cinfo)Show cinfo => Show (CallGraph cinfo)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraphSemigroup (CallGraph cinfo)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraphMonoid (CallGraph cinfo)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraphPretty cinfo => Pretty (CallGraph cinfo)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraphDisplays the recursion behaviour corresponding to a call graph.
Null (CallGraph cinfo)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraphnull checks whether the call graph is completely disconnected.
Collection (Call cinfo) (CallGraph cinfo)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraphSingleton (Call cinfo) (CallGraph cinfo)Defined in Agda-2.7.0.1 · Agda.Termination.CallGraphReturns all the nodes with incoming edges. Somewhat expensive. O(e).
Converts a call graph to a list of calls with associated meta information.
Takes the union of two call graphs.
Inserts a call into a call graph.
Call graph comparison.
A graph cs' is `worse' than cs if it has a new edge (call)
or a call got worse, which means that one of its elements
that was better or equal to Le moved a step towards Un.
A call graph is complete if combining it with itself does not make it any worse. This is sound because of monotonicity: By combining a graph with itself, it can only get worse, but if it does not get worse after one such step, it gets never any worse.
complete cs completes the call graph cs. A call graph is
complete if it contains all indirect calls; if f -> g and g ->
h are present in the graph, then f -> h should also be present.