File tree 3 files changed +10
-1
lines changed
3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ class goto_difft : public messaget
28
28
messaget(_message_handler),
29
29
goto_model1(_goto_model1),
30
30
goto_model2(_goto_model2),
31
- ui(ui_message_handlert::PLAIN)
31
+ ui(ui_message_handlert::PLAIN),
32
+ total_functions_count(0 )
32
33
{}
33
34
34
35
virtual bool operator ()()=0;
@@ -42,6 +43,7 @@ class goto_difft : public messaget
42
43
const goto_modelt &goto_model2;
43
44
language_uit::uit ui;
44
45
46
+ unsigned total_functions_count;
45
47
typedef std::set<irep_idt> irep_id_sett;
46
48
irep_id_sett new_functions, modified_functions, deleted_functions;
47
49
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ Author: Peter Schrammel
6
6
7
7
\*******************************************************************/
8
8
9
+ #include < util/i2string.h>
10
+
9
11
#include " goto_diff.h"
10
12
11
13
/* ******************************************************************\
@@ -26,6 +28,7 @@ std::ostream &goto_difft::output_functions(std::ostream &out) const
26
28
{
27
29
case ui_message_handlert::PLAIN:
28
30
{
31
+ out << " total number of functions: " << total_functions_count << " \n " ;
29
32
out << " new functions: \n " ;
30
33
for (irep_id_sett::const_iterator it = new_functions.begin ();
31
34
it != new_functions.end (); ++it)
@@ -63,6 +66,8 @@ std::ostream &goto_difft::output_functions(std::ostream &out) const
63
66
case ui_message_handlert::JSON_UI:
64
67
{
65
68
json_objectt json_result;
69
+ json_result[" TotalNumberOfFunctions" ] =
70
+ json_stringt (i2string (total_functions_count));
66
71
convert_function_group
67
72
(json_result[" NewFunctions" ].make_array (), new_functions);
68
73
convert_function_group (
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ bool syntactic_difft::operator()()
68
68
if (!it->second .body_available ())
69
69
continue ;
70
70
71
+ total_functions_count++;
72
+
71
73
goto_functionst::function_mapt::const_iterator f_it =
72
74
goto_model1.goto_functions .function_map .find (it->first );
73
75
if (f_it==goto_model1.goto_functions .function_map .end () ||
You can’t perform that action at this time.
0 commit comments