CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
all_properties_verifier_with_fault_localization.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Goto Verifier for Verifying all Properties and Localizing Faults
4
5Author: Daniel Kroening, Peter Schrammel
6
7\*******************************************************************/
8
12
13#ifndef CPROVER_GOTO_CHECKER_ALL_PROPERTIES_VERIFIER_WITH_FAULT_LOCALIZATION_H
14#define CPROVER_GOTO_CHECKER_ALL_PROPERTIES_VERIFIER_WITH_FAULT_LOCALIZATION_H
15
16#include "goto_verifier.h"
17
19#include "goto_trace_storage.h"
21#include "properties.h"
22#include "report_util.h"
23
26template <class incremental_goto_checkerT>
28{
29public:
41
43 {
44 while(true)
45 {
46 const auto result = incremental_goto_checker(properties);
48 break;
49
50 // we've got an error trace
52 for(const auto &property_id : result.updated_properties)
53 {
54 if(properties.at(property_id).status == property_statust::FAIL)
55 {
56 // get correctly truncated error trace for property and store it
58 incremental_goto_checker.build_trace(property_id));
59
60 fault_locations.insert(
61 {property_id,
62 incremental_goto_checker.localize_fault(property_id)});
63 }
64 }
65
66 ++iterations;
67 }
68
70 }
71
95
97 {
98 return traces;
99 }
100
101protected:
104 std::size_t iterations = 1;
106 std::unordered_map<irep_idt, fault_location_infot> fault_locations;
107};
108
109#endif // CPROVER_GOTO_CHECKER_ALL_PROPERTIES_VERIFIER_WITH_FAULT_LOCALIZATION_H
void message_building_error_trace(messaget &log)
Outputs a message that an error trace is being built.
Definition bmc_util.cpp:35
Abstract interface to eager or lazy GOTO models.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
Requires an incremental goto checker that is a goto_trace_providert and fault_localization_providert.
all_properties_verifier_with_fault_localizationt(const optionst &options, ui_message_handlert &ui_message_handler, abstract_goto_modelt &goto_model)
std::unordered_map< irep_idt, fault_location_infot > fault_locations
const goto_tracet & insert(goto_tracet &&)
Store trace that ends in a violated assertion.
An implementation of goto_verifiert checks all properties in a goto model.
propertiest properties
const optionst & options
ui_message_handlert & ui_message_handler
virtual uit get_ui() const
Definition ui_message.h:33
Interface for Goto Checkers to provide Fault Localization.
Goto Trace Storage.
Goto Verifier Interface.
Incremental Goto Checker Interface.
resultt determine_result(const propertiest &properties)
Determines the overall result corresponding from the given properties That is PASS if all properties ...
propertiest initialize_properties(const abstract_goto_modelt &goto_model)
Returns the properties in the goto model.
Properties.
@ FAIL
The property was violated.
resultt
The result of goto verifying.
Definition properties.h:45
void output_properties_with_fault_localization(const propertiest &properties, const std::unordered_map< irep_idt, fault_location_infot > &fault_locations, std::size_t iterations, ui_message_handlert &ui_message_handler)
void output_properties_with_traces_and_fault_localization(const propertiest &properties, const goto_trace_storaget &traces, const trace_optionst &trace_options, const std::unordered_map< irep_idt, fault_location_infot > &fault_locations, std::size_t iterations, ui_message_handlert &ui_message_handler)
void output_overall_result(resultt result, ui_message_handlert &ui_message_handler)
Bounded Model Checking Utilities.
@ DONE
The goto checker has returned all results for the given set of properties.
Options for printing the trace using show_goto_trace.
Definition goto_trace.h:221