CBMC
validate_goto_model.h
Go to the documentation of this file.
1 /*******************************************************************\
2 Module: Validate Goto Programs
3 
4 Author: Diffblue
5 
6 Date: Oct 2018
7 
8 \*******************************************************************/
9 
10 #ifndef CPROVER_GOTO_PROGRAMS_VALIDATE_GOTO_MODEL_H
11 #define CPROVER_GOTO_PROGRAMS_VALIDATE_GOTO_MODEL_H
12 
13 #include <util/validation_mode.h>
14 
16 {
17 public:
18  // this check is disabled by default (not all goto programs
19  // have an entry point)
20  bool entry_point_exists = false;
21  bool check_returns_removed = true;
22 
23 private:
24  void set_all_flags(bool options_value)
25  {
26  entry_point_exists = options_value;
27  check_returns_removed = options_value;
28  }
29 
30 public:
32 
33  enum class set_optionst
34  {
35  all_true,
36  all_false
37  };
38 
40  {
41  switch(flag_option)
42  {
44  set_all_flags(true);
45  break;
47  set_all_flags(false);
48  break;
49  }
50  }
51 };
52 
53 class goto_functionst;
54 
56  const goto_functionst &goto_functions,
57  const validation_modet vm,
58  const goto_model_validation_optionst validation_options);
59 
60 #endif // CPROVER_GOTO_PROGRAMS_VALIDATE_GOTO_MODEL_H
A collection of goto functions.
goto_model_validation_optionst(set_optionst flag_option)
void set_all_flags(bool options_value)
void validate_goto_model(const goto_functionst &goto_functions, const validation_modet vm, const goto_model_validation_optionst validation_options)
validation_modet