Skip to content

Commit 22df547

Browse files
author
kroening
committed
added --show-reachable-properties
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@5164 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
1 parent 1caed78 commit 22df547

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Author: Daniel Kroening, [email protected]
2727
#include <goto-programs/remove_vector.h>
2828
#include <goto-programs/remove_complex.h>
2929
#include <goto-programs/remove_asm.h>
30+
#include <goto-programs/remove_unused_functions.h>
3031
#include <goto-programs/goto_inline.h>
3132
#include <goto-programs/show_properties.h>
3233
#include <goto-programs/set_properties.h>
@@ -471,6 +472,18 @@ int cbmc_parse_optionst::doit()
471472
return 0;
472473
}
473474

475+
if(cmdline.isset("show-reachable-properties")) // may replace --show-properties
476+
{
477+
const namespacet ns(symbol_table);
478+
479+
// Entry point will have been set before and function pointers removed
480+
status() << "Removing Unused Functions" << eom;
481+
remove_unused_functions(goto_functions, ui_message_handler);
482+
483+
show_properties(ns, get_ui(), goto_functions);
484+
return 0;
485+
}
486+
474487
if(set_properties(goto_functions))
475488
return 7;
476489

src/cbmc/cbmc_parse_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class optionst;
4040
"(little-endian)(big-endian)" \
4141
"(show-goto-functions)(show-value-sets)(show-loops)" \
4242
"(show-symbol-table)(show-parse-tree)(show-vcc)" \
43-
"(show-claims)(claim):(show-properties)(property):" \
43+
"(show-claims)(claim):(show-properties)(show-reachable-properties)(property):" \
4444
"(all-claims)(all-properties)" \
4545
"(error-label):(verbosity):(no-library)" \
4646
"(version)" \

0 commit comments

Comments
 (0)