-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sonny Martin
committed
Feb 27, 2019
1 parent
ab3cb60
commit 1fb1129
Showing
24 changed files
with
328 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,10 +46,6 @@ Author: Daniel Kroening, [email protected] | |
#include <goto-checker/stop_on_fail_verifier.h> | ||
#include <goto-checker/stop_on_fail_verifier_with_fault_localization.h> | ||
|
||
#include <goto-instrument/cover.h> | ||
#include <goto-instrument/full_slicer.h> | ||
#include <goto-instrument/nondet_static.h> | ||
#include <goto-instrument/reachability_slicer.h> | ||
#include <goto-programs/adjust_float_expressions.h> | ||
#include <goto-programs/initialize_goto_model.h> | ||
#include <goto-programs/instrument_preconditions.h> | ||
|
@@ -60,9 +56,6 @@ Author: Daniel Kroening, [email protected] | |
#include <goto-programs/remove_complex.h> | ||
#include <goto-programs/remove_function_pointers.h> | ||
#include <goto-programs/remove_returns.h> | ||
#include <goto-programs/remove_vector.h> | ||
#include <goto-programs/remove_complex.h> | ||
#include <goto-programs/remove_unused_functions.h> | ||
#include <goto-programs/remove_skip.h> | ||
#include <goto-programs/remove_unused_functions.h> | ||
#include <goto-programs/remove_vector.h> | ||
|
@@ -75,6 +68,11 @@ Author: Daniel Kroening, [email protected] | |
#include <goto-programs/string_instrumentation.h> | ||
#include <goto-programs/validate_goto_model.h> | ||
|
||
#include <goto-instrument/cover.h> | ||
#include <goto-instrument/full_slicer.h> | ||
#include <goto-instrument/nondet_static.h> | ||
#include <goto-instrument/reachability_slicer.h> | ||
|
||
#include <goto-symex/path_storage.h> | ||
|
||
#include <pointer-analysis/add_failed_symbols.h> | ||
|
@@ -553,12 +551,10 @@ int cbmc_parse_optionst::doit() | |
|
||
if(cmdline.isset("validate-goto-model")) | ||
{ | ||
goto_model_validation_optionst goto_model_validation_options{true}; | ||
// this option is temporarily disabled until all source locations | ||
// are reliably set correctly | ||
goto_model_validation_options.check_source_location = false; | ||
goto_model.validate( | ||
validation_modet::INVARIANT, goto_model_validation_options); | ||
validation_modet::INVARIANT, | ||
goto_model_validation_optionst{ | ||
goto_model_validation_optionst::set_optionst::all_true}); | ||
} | ||
|
||
if( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,12 @@ Author: Daniel Kroening, [email protected] | |
#include <goto-programs/goto_inline.h> | ||
#include <goto-programs/interpreter.h> | ||
#include <goto-programs/link_to_library.h> | ||
#include <goto-programs/remove_returns.h> | ||
#include <goto-programs/loop_ids.h> | ||
#include <goto-programs/parameter_assignments.h> | ||
#include <goto-programs/read_goto_binary.h> | ||
#include <goto-programs/remove_calls_no_body.h> | ||
#include <goto-programs/remove_function_pointers.h> | ||
#include <goto-programs/remove_returns.h> | ||
#include <goto-programs/remove_skip.h> | ||
#include <goto-programs/remove_unused_functions.h> | ||
#include <goto-programs/remove_virtual_functions.h> | ||
|
@@ -136,7 +136,9 @@ int goto_instrument_parse_optionst::doit() | |
if(validate_only || cmdline.isset("validate-goto-model")) | ||
{ | ||
goto_model.validate( | ||
validation_modet::EXCEPTION, goto_model_validation_optionst{}); | ||
validation_modet::EXCEPTION, | ||
goto_model_validation_optionst{ | ||
goto_model_validation_optionst::set_optionst::all_true}); | ||
|
||
if(validate_only) | ||
{ | ||
|
@@ -150,7 +152,9 @@ int goto_instrument_parse_optionst::doit() | |
if(cmdline.isset("validate-goto-model")) | ||
{ | ||
goto_model.validate( | ||
validation_modet::INVARIANT, goto_model_validation_optionst{}); | ||
validation_modet::INVARIANT, | ||
goto_model_validation_optionst{ | ||
goto_model_validation_optionst::set_optionst::all_true}); | ||
} | ||
|
||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,4 +72,3 @@ void goto_functiont::validate( | |
|
||
validate_full_type(type, ns, vm); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include "abstract_goto_model.h" | ||
#include "goto_functions.h" | ||
#include "validate_goto_model.h" | ||
|
||
// A model is a pair consisting of a symbol table | ||
// and the CFGs for the functions. | ||
|
@@ -96,10 +97,16 @@ class goto_modelt : public abstract_goto_modelt | |
/// reported via DATA_INVARIANT violations or exceptions. | ||
void validate( | ||
const validation_modet vm, | ||
const goto_model_validation_optionst &goto_model_validation_options) const override | ||
const goto_model_validation_optionst &goto_model_validation_options) | ||
const override | ||
{ | ||
symbol_table.validate(vm); | ||
|
||
// Does a number of checks at the function_mapt level to ensure the | ||
// goto_program is well formed. Does not call any validate methods | ||
// (at the goto_functiont level or below) | ||
validate_goto_model(goto_functions, vm, goto_model_validation_options); | ||
|
||
const namespacet ns(symbol_table); | ||
goto_functions.validate(ns, vm, goto_model_validation_options); | ||
} | ||
|
@@ -146,12 +153,18 @@ class wrapper_goto_modelt : public abstract_goto_modelt | |
/// reported via DATA_INVARIANT violations or exceptions. | ||
void validate( | ||
const validation_modet vm, | ||
const goto_model_validation_optionst &goto_model_validation_options) const override | ||
const goto_model_validation_optionst &goto_model_validation_options) | ||
const override | ||
{ | ||
symbol_table.validate(vm); | ||
|
||
// Does a number of checks at the function_mapt level to ensure the | ||
// goto_program is well formed. Does not call any validate methods | ||
// (at the goto_functiont level or below) | ||
validate_goto_model(goto_functions, vm, goto_model_validation_options); | ||
|
||
const namespacet ns(symbol_table); | ||
goto_functions.validate(ns, vm, goto_model_validation_options); | ||
goto_functions.validate(ns, vm, goto_model_validation_options); | ||
} | ||
|
||
private: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.