Skip to content

Commit f34c10b

Browse files
committed
Synchronise help output with actual support for --fp-reachability-slice
Neither CBMC nor JBMC actually interpret this option, despite it being advertised in help output (and man pages). Conversely, goto-instrument has support for `--reachability-slice-fb`, but it wasn't available on the command line.
1 parent cf4df69 commit f34c10b

8 files changed

+16
-24
lines changed

doc/man/cbmc.1

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,6 @@ set malloc failure mode to return null
258258
\fB\-\-string\-abstraction\fR
259259
track C string lengths and zero\-termination
260260
.TP
261-
\fB\-\-fp\-reachability\-slice\fR f
262-
remove instructions that cannot appear on a trace
263-
that visits all given functions. The list of
264-
functions has to be given as a comma separated
265-
list f.
266-
.TP
267261
\fB\-\-reachability\-slice\fR
268262
remove instructions that cannot appear on a trace
269263
from entry point to a property

doc/man/goto-instrument.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,10 @@ list \fIf\fR.
972972
remove instructions that cannot appear on a trace
973973
from entry point to a property
974974
.TP
975+
\fB\-\-reachability\-slice\-fb\fR
976+
remove instructions that cannot appear on a trace
977+
from entry point through a property
978+
.TP
975979
\fB\-\-full\-slice\fR
976980
slice away instructions that don't affect assertions
977981
.TP

doc/man/jbmc.1

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,6 @@ ignore user assumptions
138138
\fB\-\-mm\fR MM
139139
memory consistency model for concurrent programs
140140
.TP
141-
\fB\-\-fp\-reachability\-slice\fR f
142-
remove instructions that cannot appear on a trace
143-
that visits all given functions. The list of
144-
functions has to be given as a comma separated
145-
list f.
146-
.TP
147141
\fB\-\-reachability\-slice\fR
148142
remove instructions that cannot appear on a trace
149143
from entry point to a property

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,6 @@ void jbmc_parse_optionst::help()
967967
" --no-assumptions ignore user assumptions\n"
968968
" --mm MM memory consistency model for concurrent programs\n" // NOLINT(*)
969969
HELP_REACHABILITY_SLICER
970-
HELP_REACHABILITY_SLICER_FB
971970
" --full-slice run full slicer (experimental)\n" // NOLINT(*)
972971
"\n"
973972
"Java Bytecode frontend options:\n"

src/cbmc/cbmc_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ void cbmc_parse_optionst::help()
902902
" --mm MM memory consistency model for concurrent programs (default: sc)\n" // NOLINT(*)
903903
HELP_CONFIG_LIBRARY
904904
HELP_REACHABILITY_SLICER
905-
HELP_REACHABILITY_SLICER_FB
906905
" --full-slice run full slicer (experimental)\n" // NOLINT(*)
907906
" --drop-unused-functions drop functions trivially unreachable from main function\n" // NOLINT(*)
908907
" --havoc-undefined-functions\n"

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ Author: Daniel Kroening, [email protected]
9595
#include "nondet_volatile.h"
9696
#include "points_to.h"
9797
#include "race_check.h"
98-
#include "reachability_slicer.h"
9998
#include "remove_function.h"
10099
#include "rw_set.h"
101100
#include "show_locations.h"
@@ -1971,6 +1970,7 @@ void goto_instrument_parse_optionst::help()
19711970
"\n"
19721971
"Slicing:\n"
19731972
HELP_REACHABILITY_SLICER
1973+
HELP_FP_REACHABILITY_SLICER
19741974
" --full-slice slice away instructions that don't affect assertions\n" // NOLINT(*)
19751975
" --property id slice with respect to specific property only\n" // NOLINT(*)
19761976
" --slice-global-inits slice away initializations of unused global variables\n" // NOLINT(*)

src/goto-instrument/goto_instrument_parse_options.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Author: Daniel Kroening, [email protected]
3636
#include "generate_function_bodies.h"
3737
#include "insert_final_assert_false.h"
3838
#include "nondet_volatile.h"
39+
#include "reachability_slicer.h"
3940
#include "replace_calls.h"
4041
#include "uninitialized.h"
4142
#include "unwindset.h"
@@ -77,8 +78,9 @@ Author: Daniel Kroening, [email protected]
7778
"(custom-bitvector-analysis)" \
7879
"(show-struct-alignment)(interval-analysis)(show-intervals)" \
7980
"(show-uninitialized)(show-locations)" \
80-
"(full-slice)(reachability-slice)(slice-global-inits)" \
81-
"(fp-reachability-slice):" \
81+
"(full-slice)(slice-global-inits)" \
82+
OPT_REACHABILITY_SLICER \
83+
OPT_FP_REACHABILITY_SLICER \
8284
"(inline)(partial-inline)(function-inline):(log):(no-caching)" \
8385
"(value-set-fi-fp-removal)" \
8486
OPT_REMOVE_CONST_FUNCTION_POINTERS \

src/goto-instrument/reachability_slicer.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ void reachability_slicer(
4242
message_handlert &);
4343

4444
// clang-format off
45-
#define OPT_REACHABILITY_SLICER \
46-
"(fp-reachability-slice):(reachability-slice)(reachability-slice-fb)" // NOLINT(*)
45+
#define OPT_FP_REACHABILITY_SLICER "(fp-reachability-slice):"
46+
#define OPT_REACHABILITY_SLICER "(reachability-slice)(reachability-slice-fb)"
4747

48-
#define HELP_REACHABILITY_SLICER \
48+
#define HELP_FP_REACHABILITY_SLICER \
4949
" --fp-reachability-slice f remove instructions that cannot appear on a trace\n" \
5050
" that visits all given functions. The list of\n" \
5151
" functions has to be given as a comma separated\n" \
52-
" list f.\n" \
52+
" list f.\n"
53+
#define HELP_REACHABILITY_SLICER \
5354
" --reachability-slice remove instructions that cannot appear on a trace\n" \
54-
" from entry point to a property\n" // NOLINT(*)
55-
#define HELP_REACHABILITY_SLICER_FB \
55+
" from entry point to a property\n" \
5656
" --reachability-slice-fb remove instructions that cannot appear on a trace\n" \
57-
" from entry point through a property\n" // NOLINT(*)
57+
" from entry point through a property\n"
5858
// clang-format on
5959
#endif // CPROVER_GOTO_INSTRUMENT_REACHABILITY_SLICER_H

0 commit comments

Comments
 (0)