Frama-C:
Plug-ins:
Libraries:

Frama-C API - Make

Functor providing topological iterators over a graph.

Parameters

module G : G

Signature

val fold : (State.t -> 'a -> 'a) -> G.t -> 'a -> 'a

fold action g seed allows iterating over the graph g in topological order. action node accu is called repeatedly, where node is the node being visited, and accu is the result of the action's previous invocation, if any, and seed otherwise. If g contains cycles, the order is unspecified inside the cycles and every node in the cycles will be presented exactly once.

val iter : (State.t -> unit) -> G.t -> unit

iter action calls action node repeatedly. Nodes are (again) presented to action in topological order. The order is the same as for fold.