cprover
goto_diff.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: GOTO-DIFF Base Class
4 
5 Author: Peter Schrammel
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_DIFF_GOTO_DIFF_H
13 #define CPROVER_GOTO_DIFF_GOTO_DIFF_H
14 
15 #include <util/ui_message.h>
16 
17 #include <iosfwd>
18 #include <set>
19 
20 class goto_modelt;
21 class json_arrayt;
22 class json_objectt;
23 class optionst;
24 
26 {
27 public:
29  const goto_modelt &_goto_model1,
30  const goto_modelt &_goto_model2,
31  const optionst &_options,
32  ui_message_handlert &_message_handler)
33  : message_handler(_message_handler),
34  goto_model1(_goto_model1),
35  goto_model2(_goto_model2),
36  options(_options),
38  {
39  }
40 
41  virtual bool operator()()=0;
42 
43  virtual void output_functions() const;
44 
45 protected:
49  const optionst &options;
50 
53 
55  const std::string &group_name,
56  const std::set<irep_idt> &function_group,
57  const goto_modelt &goto_model) const;
58  void output_function(
59  const irep_idt &function_name,
60  const goto_modelt &goto_model) const;
61 
63  json_arrayt &result,
64  const std::set<irep_idt> &function_group,
65  const goto_modelt &goto_model) const;
67  json_objectt &result,
68  const irep_idt &function_name,
69  const goto_modelt &goto_model) const;
70 };
71 
72 #endif // CPROVER_GOTO_DIFF_GOTO_DIFF_H
goto_difft(const goto_modelt &_goto_model1, const goto_modelt &_goto_model2, const optionst &_options, ui_message_handlert &_message_handler)
Definition: goto_diff.h:28
const goto_modelt & goto_model1
Definition: goto_diff.h:47
void output_function(const irep_idt &function_name, const goto_modelt &goto_model) const
Output function information in plain text format.
const goto_modelt & goto_model2
Definition: goto_diff.h:48
ui_message_handlert & message_handler
Definition: goto_diff.h:46
unsigned total_functions_count
Definition: goto_diff.h:51
virtual void output_functions() const
Output diff result.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:35
std::set< irep_idt > modified_functions
Definition: goto_diff.h:52
virtual bool operator()()=0
void output_function_group(const std::string &group_name, const std::set< irep_idt > &function_group, const goto_modelt &goto_model) const
Output group of functions in plain text format.
void convert_function_json(json_objectt &result, const irep_idt &function_name, const goto_modelt &goto_model) const
Convert function information to JSON.
void convert_function_group_json(json_arrayt &result, const std::set< irep_idt > &function_group, const goto_modelt &goto_model) const
Convert a function group to JSON.
const optionst & options
Definition: goto_diff.h:49
std::set< irep_idt > deleted_functions
Definition: goto_diff.h:52
std::set< irep_idt > new_functions
Definition: goto_diff.h:52