CBMC
cover_goals_verifier_with_trace_storage.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Goto Verifier for Covering Goals that stores Traces
4 
5 Author: Daniel Kroening, Peter Schrammel
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_GOTO_CHECKER_COVER_GOALS_VERIFIER_WITH_TRACE_STORAGE_H
13 #define CPROVER_GOTO_CHECKER_COVER_GOALS_VERIFIER_WITH_TRACE_STORAGE_H
14 
15 #include "goto_verifier.h"
16 
17 #include "bmc_util.h"
19 #include "goto_trace_storage.h"
21 #include "properties.h"
22 
23 template <class incremental_goto_checkerT>
25 {
26 public:
28  const optionst &options,
34  traces(incremental_goto_checker.get_namespace())
35  {
37  }
38 
39  resultt operator()() override
40  {
41  while(incremental_goto_checker(properties).progress !=
43  {
44  if(
45  options.get_bool_option("show-test-suite") ||
46  options.get_bool_option("trace"))
47  {
48  // we've got a trace; store it and link it to the covered goals
50  (void)traces.insert_all(incremental_goto_checker.build_full_trace());
51  }
52 
53  ++iterations;
54  }
55 
57  }
58 
59  void report() override
60  {
62  }
63 
65  {
66  return traces;
67  }
68 
69 protected:
71  incremental_goto_checkerT incremental_goto_checker;
72  unsigned iterations = 1;
74 };
75 
76 #endif // CPROVER_GOTO_CHECKER_COVER_GOALS_VERIFIER_WITH_TRACE_STORAGE_H
message_building_error_trace
void message_building_error_trace(messaget &log)
Outputs a message that an error trace is being built.
Definition: bmc_util.cpp:36
ui_message_handlert
Definition: ui_message.h:21
determine_result
resultt determine_result(const propertiest &properties)
Determines the overall result corresponding from the given properties That is PASS if all properties ...
Definition: properties.cpp:264
resultt
resultt
The result of goto verifying.
Definition: properties.h:44
goto_verifiert
An implementation of goto_verifiert checks all properties in a goto model.
Definition: goto_verifier.h:26
cover_goals_verifier_with_trace_storaget::operator()
resultt operator()() override
Check whether all properties hold.
Definition: cover_goals_verifier_with_trace_storage.h:39
optionst
Definition: options.h:22
goto_verifier.h
cover_goals_verifier_with_trace_storaget::get_traces
const goto_trace_storaget & get_traces() const
Definition: cover_goals_verifier_with_trace_storage.h:64
cover_goals_verifier_with_trace_storaget::iterations
unsigned iterations
Definition: cover_goals_verifier_with_trace_storage.h:72
cover_goals_verifier_with_trace_storaget::goto_model
abstract_goto_modelt & goto_model
Definition: cover_goals_verifier_with_trace_storage.h:70
output_goals
void output_goals(const propertiest &properties, unsigned iterations, ui_message_handlert &ui_message_handler)
Outputs the properties interpreted as 'coverage goals' and the number of goto verifier iterations tha...
Definition: cover_goals_report_util.cpp:161
incremental_goto_checker.h
initialize_properties
propertiest initialize_properties(const abstract_goto_modelt &goto_model)
Returns the properties in the goto model.
Definition: properties.cpp:70
bmc_util.h
cover_goals_report_util.h
cover_goals_verifier_with_trace_storaget
Definition: cover_goals_verifier_with_trace_storage.h:24
goto_trace_storage.h
goto_verifiert::options
const optionst & options
Definition: goto_verifier.h:53
goto_trace_storaget::insert_all
const goto_tracet & insert_all(goto_tracet &&)
Store trace that contains multiple violated assertions.
Definition: goto_trace_storage.cpp:37
goto_trace_storaget
Definition: goto_trace_storage.h:21
incremental_goto_checkert::resultt::progresst::DONE
@ DONE
The goto checker has returned all results for the given set of properties.
optionst::get_bool_option
bool get_bool_option(const std::string &option) const
Definition: options.cpp:44
abstract_goto_modelt
Abstract interface to eager or lazy GOTO models.
Definition: abstract_goto_model.h:20
cover_goals_verifier_with_trace_storaget::cover_goals_verifier_with_trace_storaget
cover_goals_verifier_with_trace_storaget(const optionst &options, ui_message_handlert &ui_message_handler, abstract_goto_modelt &goto_model)
Definition: cover_goals_verifier_with_trace_storage.h:27
properties.h
goto_verifiert::ui_message_handler
ui_message_handlert & ui_message_handler
Definition: goto_verifier.h:54
cover_goals_verifier_with_trace_storaget::incremental_goto_checker
incremental_goto_checkerT incremental_goto_checker
Definition: cover_goals_verifier_with_trace_storage.h:71
goto_verifiert::properties
propertiest properties
Definition: goto_verifier.h:56
cover_goals_verifier_with_trace_storaget::report
void report() override
Report results.
Definition: cover_goals_verifier_with_trace_storage.h:59
cover_goals_verifier_with_trace_storaget::traces
goto_trace_storaget traces
Definition: cover_goals_verifier_with_trace_storage.h:73
goto_verifiert::log
messaget log
Definition: goto_verifier.h:55