Skip to content

Commit 5868fb5

Browse files
committed
Validate goto models in goto-analyzer (if enabled via command line flag)
1 parent 6ec1e5c commit 5868fb5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/goto-analyzer/goto_analyzer_parse_options.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ int goto_analyzer_parse_optionst::doit()
406406
if(process_goto_program(options))
407407
return CPROVER_EXIT_INTERNAL_ERROR;
408408

409+
if(cmdline.isset("validate-goto-model"))
410+
{
411+
goto_model.validate(validation_modet::INVARIANT);
412+
}
413+
409414
// show it?
410415
if(cmdline.isset("show-symbol-table"))
411416
{
@@ -875,6 +880,7 @@ void goto_analyzer_parse_optionst::help()
875880
HELP_GOTO_CHECK
876881
"\n"
877882
"Other options:\n"
883+
HELP_VALIDATE
878884
" --version show version and exit\n"
879885
HELP_FLUSH
880886
HELP_TIMESTAMP

src/goto-analyzer/goto_analyzer_parse_options.h

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Author: Daniel Kroening, [email protected]
104104
#include <util/ui_message.h>
105105
#include <util/parse_options.h>
106106
#include <util/timestamper.h>
107+
#include <util/validation_interface.h>
107108

108109
#include <langapi/language.h>
109110

@@ -148,6 +149,7 @@ class optionst;
148149
"(show)(verify)(simplify):" \
149150
"(location-sensitive)(concurrent)" \
150151
"(no-simplify-slicing)" \
152+
OPT_VALIDATE \
151153
// clang-format on
152154

153155
class goto_analyzer_parse_optionst:

0 commit comments

Comments
 (0)