File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -135,3 +135,30 @@ void class_hierarchyt::output(std::ostream &out) const
135
135
<< ch << ' \n ' ;
136
136
}
137
137
}
138
+
139
+ /* ******************************************************************\
140
+
141
+ Function: output_dot
142
+
143
+ Inputs:
144
+
145
+ Outputs:
146
+
147
+ Purpose:
148
+
149
+ \*******************************************************************/
150
+
151
+ std::ostream &output_dot (std::ostream &ostr, const class_hierarchyt &hierarchy)
152
+ {
153
+ ostr << " digraph call_graph {\n "
154
+ << " rankdir=BT;\n "
155
+ << " node [fontsize=12 shape=box];\n " ;
156
+ for (const auto &c : hierarchy.class_map )
157
+ for (const auto &ch : c.second .parents )
158
+ ostr << " \" " << c.first << " \" -> "
159
+ << " \" " << ch << " \" "
160
+ << " [arrowhead=\" vee\" ];"
161
+ << " \n " ;
162
+ ostr << " }\n " ;
163
+ return ostr;
164
+ }
Original file line number Diff line number Diff line change @@ -55,4 +55,6 @@ class class_hierarchyt
55
55
void get_parents_trans_rec (const irep_idt &, idst &) const ;
56
56
};
57
57
58
+ std::ostream &output_dot (std::ostream &ostr, const class_hierarchyt &hierarchy);
59
+
58
60
#endif // CPROVER_GOTO_PROGRAMS_CLASS_HIERARCHY_H
You can’t perform that action at this time.
0 commit comments