Skip to content

Commit 1cb804c

Browse files
Natasha Yogananda Jeppudanielsn
Natasha Yogananda Jeppu
authored andcommitted
Add parse option --show-array-constraints to track array constraints added during post processing
Array theory constraints added during post processing might be useful to reason about proof runtimes. This commit adds a new parse option --show-array-constraints that tracks constraints pertaining to arrays added during post processing. fix command line argument to display error message of xml or plain format is used
1 parent 9c5877f commit 1cb804c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,17 @@ int cbmc_parse_optionst::doit()
566566
return CPROVER_EXIT_USAGE_ERROR;
567567
}
568568

569+
if(cmdline.isset("show-array-constraints"))
570+
{
571+
if(!cmdline.isset("json-ui") || cmdline.isset("xml-ui"))
572+
{
573+
log.error() << "--show-array-constraints supports only"
574+
" json output. Use --json-ui."
575+
<< messaget::eom;
576+
return CPROVER_EXIT_USAGE_ERROR;
577+
}
578+
}
579+
569580
register_languages();
570581

571582
// configure gcc, if required
@@ -1145,6 +1156,8 @@ void cbmc_parse_optionst::help()
11451156
" --write-solver-stats-to json-file\n"
11461157
" collect the solver query complexity\n"
11471158
" --show-array-constraints show array theory constraints added\n"
1159+
" during post processing.\n"
1160+
" Requires --json-ui.\n"
11481161
"\n";
11491162
// clang-format on
11501163
}

0 commit comments

Comments
 (0)