Debian Codegraph @

lib/mlrisc-lib/MLRISC/ir-archive/fast-path.sig

raw
1 (*
2 * This module implements Tarjan's fast path computation algorithm.
3 *
4 * -- Allen
5 *)
6
7 signature TARJAN_FAST_PATH =
8 sig
9
10 structure Dom : DOMINATOR_TREE
11
12 (* path expression *)
13 datatype 'e pexp =
14 NUL
15 | EMP
16 | EDGE of 'e Graph.edge
17 | || of 'e pexp * 'e pexp
18 | ++ of 'e pexp * 'e pexp
19
20 (* path sequence *)
21 type 'e pseq = ('e pexp * Graph.node_id * Graph.node_id) list
22
23 (* Given a path sequence and a source node $s$, solve for the path of $s$ *)
24 val solve : 'e pseq -> Graph.node_id -> 'e pexp
25
26 (* decompose a graph into a path sequence *)
27 val eliminate : ('n,'e,'g) Graph.graph -> 'e pseq
28
29 end
30