Skip to content

Commit 92a5b75

Browse files
Natasha Yogananda Jeppudanielsn
authored andcommitted
Add parse option to display points-to set information for pointer dereference
The points to set information provides some intuition about the complexity of the resulting case split expression in case of a pointer dereference. This commit adds parse option --show-points-to-sets to track the size and contents of the points-to set for pointers. cpp lint bmc_util.h Add error message for plain and xml format output
1 parent e7fb35e commit 92a5b75

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,16 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
522522
options.set_option("show-goto-symex-steps", true);
523523

524524
if(cmdline.isset("show-points-to-sets"))
525+
{
526+
if(!cmdline.isset("json-ui"))
527+
{
528+
log.error() << "--show-points-to-sets supports only"
529+
" json output. Use --json-ui."
530+
<< messaget::eom;
531+
exit(CPROVER_EXIT_USAGE_ERROR);
532+
}
525533
options.set_option("show-points-to-sets", true);
534+
}
526535

527536
PARSE_OPTIONS_GOTO_TRACE(cmdline, options);
528537
}

src/goto-checker/bmc_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void run_property_decider(
205205
" --show-goto-symex-steps show which steps symex travels, includes " \
206206
" diagnostic information\n" \
207207
" --show-points-to-sets show points-to sets for\n" \
208-
" pointer dereference\n" \
208+
" pointer dereference. Requires --json-ui.\n" \
209209
" --program-only only show program expression\n" \
210210
" --show-byte-ops show all byte extracts and updates\n" \
211211
" --show-loops show the loops in the program\n" \

0 commit comments

Comments
 (0)