-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goto programs validation #3191
Goto programs validation #3191
Changes from all commits
5fddbcd
8bd353c
2ec4b83
4cd976f
a3b5513
6cc09c9
ca11166
ab3cb60
1fb1129
971c788
b5b1f64
a1de5dc
6ba2cf4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,24 +53,25 @@ Author: Daniel Kroening, [email protected] | |
#include <goto-programs/loop_ids.h> | ||
#include <goto-programs/mm_io.h> | ||
#include <goto-programs/read_goto_binary.h> | ||
#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> | ||
#include <goto-programs/rewrite_union.h> | ||
#include <goto-programs/set_properties.h> | ||
#include <goto-programs/show_goto_functions.h> | ||
#include <goto-programs/show_symbol_table.h> | ||
#include <goto-programs/show_properties.h> | ||
#include <goto-programs/show_symbol_table.h> | ||
#include <goto-programs/string_abstraction.h> | ||
#include <goto-programs/string_instrumentation.h> | ||
#include <goto-programs/validate_goto_model.h> | ||
|
||
#include <goto-instrument/reachability_slicer.h> | ||
#include <goto-instrument/cover.h> | ||
#include <goto-instrument/full_slicer.h> | ||
#include <goto-instrument/nondet_static.h> | ||
#include <goto-instrument/cover.h> | ||
#include <goto-instrument/reachability_slicer.h> | ||
|
||
#include <goto-symex/path_storage.h> | ||
|
||
|
@@ -550,7 +551,7 @@ int cbmc_parse_optionst::doit() | |
|
||
if(cmdline.isset("validate-goto-model")) | ||
{ | ||
goto_model.validate(validation_modet::INVARIANT); | ||
goto_model.validate(); | ||
} | ||
|
||
if( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ Author: Daniel Kroening, [email protected] | |
#include <goto-programs/set_properties.h> | ||
#include <goto-programs/show_properties.h> | ||
#include <goto-programs/show_symbol_table.h> | ||
#include <goto-programs/validate_goto_model.h> | ||
|
||
#include <analyses/is_threaded.h> | ||
#include <analyses/goto_check.h> | ||
|
@@ -405,7 +406,7 @@ int goto_analyzer_parse_optionst::doit() | |
|
||
if(cmdline.isset("validate-goto-model")) | ||
{ | ||
goto_model.validate(validation_modet::INVARIANT); | ||
goto_model.validate(); | ||
} | ||
|
||
// show it? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,25 +25,26 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <goto-programs/class_hierarchy.h> | ||
#include <goto-programs/goto_convert_functions.h> | ||
#include <goto-programs/remove_calls_no_body.h> | ||
#include <goto-programs/remove_function_pointers.h> | ||
#include <goto-programs/remove_virtual_functions.h> | ||
#include <goto-programs/remove_skip.h> | ||
#include <goto-programs/goto_inline.h> | ||
#include <goto-programs/show_properties.h> | ||
#include <goto-programs/set_properties.h> | ||
#include <goto-programs/read_goto_binary.h> | ||
#include <goto-programs/write_goto_binary.h> | ||
#include <goto-programs/interpreter.h> | ||
#include <goto-programs/string_abstraction.h> | ||
#include <goto-programs/string_instrumentation.h> | ||
#include <goto-programs/loop_ids.h> | ||
#include <goto-programs/link_to_library.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/parameter_assignments.h> | ||
#include <goto-programs/slice_global_inits.h> | ||
#include <goto-programs/remove_virtual_functions.h> | ||
#include <goto-programs/set_properties.h> | ||
#include <goto-programs/show_properties.h> | ||
#include <goto-programs/show_symbol_table.h> | ||
#include <goto-programs/slice_global_inits.h> | ||
#include <goto-programs/string_abstraction.h> | ||
#include <goto-programs/string_instrumentation.h> | ||
#include <goto-programs/validate_goto_model.h> | ||
#include <goto-programs/write_goto_binary.h> | ||
|
||
#include <pointer-analysis/value_set_analysis.h> | ||
#include <pointer-analysis/goto_program_dereference.h> | ||
|
@@ -147,7 +148,7 @@ int goto_instrument_parse_optionst::doit() | |
|
||
if(cmdline.isset("validate-goto-model")) | ||
{ | ||
goto_model.validate(validation_modet::INVARIANT); | ||
goto_model.validate(); | ||
} | ||
|
||
{ | ||
|
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. | ||
|
@@ -94,10 +95,18 @@ class goto_modelt : public abstract_goto_modelt | |
/// | ||
/// The validation mode indicates whether well-formedness check failures are | ||
/// reported via DATA_INVARIANT violations or exceptions. | ||
void validate(const validation_modet vm) const override | ||
void validate( | ||
const validation_modet vm = validation_modet::INVARIANT, | ||
const goto_model_validation_optionst &goto_model_validation_options = | ||
goto_model_validation_optionst{}) 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); | ||
} | ||
|
@@ -142,10 +151,18 @@ class wrapper_goto_modelt : public abstract_goto_modelt | |
/// | ||
/// The validation mode indicates whether well-formedness check failures are | ||
/// reported via DATA_INVARIANT violations or exceptions. | ||
void validate(const validation_modet vm) const override | ||
void validate( | ||
const validation_modet vm, | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⛏️ ... especially if you need to explain it twice? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, the name is the same as the command line parameter "validate_goto_model". |
||
validate_goto_model(goto_functions, vm, goto_model_validation_options); | ||
|
||
const namespacet ns(symbol_table); | ||
goto_functions.validate(ns, vm); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Is there a way to condense this comment and turn it into a name for this function?