@@ -31,6 +31,31 @@ struct cfg_base_nodet:public graph_nodet<empty_edget>, public T
31
31
I PC;
32
32
};
33
33
34
+ // / A multi-procedural control flow graph (CFG) whose nodes store references to
35
+ // / instructions in a GOTO program.
36
+ // /
37
+ // / An instance of cfg_baset<T> is a directed graph whose nodes inherit from a
38
+ // / user-provided type T and store a pointer to an instruction of some
39
+ // / goto program in the field `PC`. The field `PC` of every node points to the
40
+ // / original GOTO instruction that gave rise to the node, and the field
41
+ // / cfg_baset::entry_map maps every GOTO instruction to some CFG node.
42
+ // /
43
+ // / The CFG is constructed on the operator() from either one goto_programt or
44
+ // / multiple goto_programt objects (stored in a goto_functionst). The edges of
45
+ // / the CFG are created on the method compute_edges(), and notably include:
46
+ // /
47
+ // / - Edges from location A to B if both A and B belong to the same
48
+ // / goto_programt and A can flow into B.
49
+ // / - An edge from each FUNCTION_CALL instruction and the first instruction of
50
+ // / the called function, when that function body is available and its body is
51
+ // / non-empty.
52
+ // / - For each FUNCTION_CALL instruction found, an edge between the exit point
53
+ // / of the called function and the instruction immediately after the
54
+ // / FUNCTION_CALL, when the function body is available and its body is
55
+ // / non-empty.
56
+ // /
57
+ // / Note that cfg_baset is the base class of many other subclasses and the
58
+ // / specific edges constructed by operator() can be different in those.
34
59
template <class T ,
35
60
typename P=const goto_programt,
36
61
typename I=goto_programt::const_targett>
0 commit comments