foxdec-0.1.0.0: Formally Verified x86-64 Decompilation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Algorithm.SCC

Description

Generating strongly connected components: https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm

The only modification is that this algorithm considers SCCs wrt to some frontier. A frontier is a set of nodes that is not passed, i.e., we consider a subgraph bounded by (up to not including) the frontier.

We assume the existence of a function post :: G -> Int -> IS.IntSet that returns, given the graph and the current node, a set of next nodes. We also assume the existence of a function V :: G -> IS.IntSet that returns all vertices.

I could get none of the Data.Graph functions to work properly, hence this reimplementation.

Synopsis

Documentation

scc_of :: IntGraph g => g -> Int -> IntSet -> [IntSet] Source #

graph_nontrivial_scc :: Graph -> IntSet Source #

retrieve a non-trivial SCC, if any exists

graph_find_next :: Graph -> Maybe Int Source #

find next vertex to consider: either a terminal vertex (if any) or the head of an SCC