CBMC
|
Verifier that take a goto program as input, and output formatted counterexamples for counterexample-guided-synthesis. More...
#include <cegis_verifier.h>
Public Member Functions | |
cegis_verifiert (const invariant_mapt &invariant_candidates, const std::map< loop_idt, std::set< exprt >> &assigns_map, goto_modelt &goto_model, const optionst &options, messaget &log) | |
std::optional< cext > | verify () |
Verify goto_model . More... | |
Public Attributes | |
propertiest | properties |
Result counterexample. More... | |
irep_idt | target_violation_id |
Protected Member Functions | |
std::list< loop_idt > | get_cause_loop_id (const goto_tracet &goto_trace, const goto_programt::const_targett violation) |
std::list< loop_idt > | get_cause_loop_id_for_assigns (const goto_tracet &goto_trace) |
cext::violation_typet | extract_violation_type (const std::string &description) |
cext::violation_locationt | get_violation_location (const loop_idt &loop_id, const goto_functiont &function, unsigned location_number_of_target) |
void | restore_functions () |
Restore transformed functions to original functions. More... | |
cext | build_cex (const goto_tracet &goto_trace, const source_locationt &loop_entry_loc) |
bool | is_instruction_in_transformed_loop (const loop_idt &loop_id, const goto_functiont &function, unsigned location_number_of_target) |
Decide whether the target instruction is in the body of the transformed loop specified by loop_id . More... | |
bool | is_instruction_in_transformed_loop_condition (const loop_idt &loop_id, const goto_functiont &function, unsigned location_number_of_target) |
Decide whether the target instruction is between the loop-havoc and the evaluation of the loop guard. More... | |
void | preprocess_goto_model () |
Preprocess the goto model to prepare for verification. More... | |
Protected Attributes | |
const invariant_mapt & | invariant_candidates |
const std::map< loop_idt, std::set< exprt > > & | assigns_map |
goto_modelt & | goto_model |
const optionst & | options |
messaget | log |
const namespacet | ns |
std::unordered_map< irep_idt, goto_programt > | original_functions |
Map from function names to original functions. More... | |
std::unordered_map< goto_programt::const_targett, unsigned, const_target_hash > | original_loop_number_map |
Map from instrumented instructions for loop contracts to their original loop numbers. More... | |
std::unordered_set< goto_programt::const_targett, const_target_hash > | loop_havoc_set |
Loop havoc instructions instrumented during applying loop contracts. More... | |
Verifier that take a goto program as input, and output formatted counterexamples for counterexample-guided-synthesis.
Definition at line 99 of file cegis_verifier.h.
|
inline |
Definition at line 102 of file cegis_verifier.h.
|
protected |
Definition at line 363 of file cegis_verifier.cpp.
|
protected |
Definition at line 109 of file cegis_verifier.cpp.
|
protected |
Definition at line 182 of file cegis_verifier.cpp.
|
protected |
Definition at line 147 of file cegis_verifier.cpp.
|
protected |
Definition at line 262 of file cegis_verifier.cpp.
|
protected |
Decide whether the target instruction is in the body of the transformed loop specified by loop_id
.
Definition at line 318 of file cegis_verifier.cpp.
|
protected |
Decide whether the target instruction is between the loop-havoc and the evaluation of the loop guard.
Definition at line 282 of file cegis_verifier.cpp.
|
protected |
Preprocess the goto model to prepare for verification.
Definition at line 83 of file cegis_verifier.cpp.
|
protected |
Restore transformed functions to original functions.
Definition at line 547 of file cegis_verifier.cpp.
std::optional< cext > cegis_verifiert::verify | ( | ) |
Verify goto_model
.
Return an empty std::optional
if there is no violation. Otherwise, return the formatted counterexample.
Definition at line 553 of file cegis_verifier.cpp.
Definition at line 173 of file cegis_verifier.h.
|
protected |
Definition at line 174 of file cegis_verifier.h.
|
protected |
Definition at line 172 of file cegis_verifier.h.
|
protected |
Definition at line 176 of file cegis_verifier.h.
|
protected |
Loop havoc instructions instrumented during applying loop contracts.
Definition at line 190 of file cegis_verifier.h.
|
protected |
Definition at line 177 of file cegis_verifier.h.
|
protected |
Definition at line 175 of file cegis_verifier.h.
|
protected |
Map from function names to original functions.
It is used to restore functions with annotated loops to original functions.
Definition at line 181 of file cegis_verifier.h.
|
protected |
Map from instrumented instructions for loop contracts to their original loop numbers.
Returned by code_contractst
Definition at line 186 of file cegis_verifier.h.
propertiest cegis_verifiert::properties |
Result counterexample.
Definition at line 122 of file cegis_verifier.h.
irep_idt cegis_verifiert::target_violation_id |
Definition at line 123 of file cegis_verifier.h.