@@ -25,8 +25,28 @@ class call_grapht
25
25
explicit call_grapht (const goto_modelt &, bool collect_callsites=false );
26
26
explicit call_grapht (const goto_functionst &, bool collect_callsites=false );
27
27
28
- // These two constructors build a call graph restricted to functions
28
+ // These two functions build a call graph restricted to functions
29
29
// reachable from the given root.
30
+
31
+ static call_grapht create_from_root_function (
32
+ const goto_modelt &model,
33
+ const irep_idt &root,
34
+ bool collect_callsites)
35
+ {
36
+ return call_grapht (model, root, collect_callsites);
37
+ }
38
+
39
+ static call_grapht create_from_root_function (
40
+ const goto_functionst &functions,
41
+ const irep_idt &root,
42
+ bool collect_callsites)
43
+ {
44
+ return call_grapht (functions, root, collect_callsites);
45
+ }
46
+
47
+ // Constructors used to implement the above:
48
+
49
+ private:
30
50
call_grapht (
31
51
const goto_modelt &model,
32
52
const irep_idt &root,
@@ -36,6 +56,8 @@ class call_grapht
36
56
const irep_idt &root,
37
57
bool collect_callsites);
38
58
59
+ public:
60
+
39
61
void output_dot (std::ostream &out) const ;
40
62
void output (std::ostream &out) const ;
41
63
void output_xml (std::ostream &out) const ;
0 commit comments