File tree Expand file tree Collapse file tree 4 files changed +54
-2
lines changed
Expand file tree Collapse file tree 4 files changed +54
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,25 @@ void jbmc_parse_optionst::get_command_line_options(optionst &options)
135135 parse_java_language_options (cmdline, options);
136136 parse_java_object_factory_options (cmdline, options);
137137
138+ if (cmdline.isset (" max-field-sensitivity-array-size" ))
139+ {
140+ options.set_option (
141+ " max-field-sensitivity-array-size" ,
142+ cmdline.get_value (" max-field-sensitivity-array-size" ));
143+ }
144+
145+ if (cmdline.isset (" no-array-field-sensitivity" ))
146+ {
147+ if (cmdline.isset (" max-field-sensitivity-array-size" ))
148+ {
149+ log.error ()
150+ << " --no-array-field-sensitivity and --max-field-sensitivity-array-size"
151+ << " must not be given together" << messaget::eom;
152+ exit (CPROVER_EXIT_USAGE_ERROR);
153+ }
154+ options.set_option (" no-array-field-sensitivity" , true );
155+ }
156+
138157 if (cmdline.isset (" show-symex-strategies" ))
139158 {
140159 log.status () << show_path_strategies () << messaget::eom;
Original file line number Diff line number Diff line change @@ -147,6 +147,25 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
147147 exit (CPROVER_EXIT_USAGE_ERROR);
148148 }
149149
150+ if (cmdline.isset (" max-field-sensitivity-array-size" ))
151+ {
152+ options.set_option (
153+ " max-field-sensitivity-array-size" ,
154+ cmdline.get_value (" max-field-sensitivity-array-size" ));
155+ }
156+
157+ if (cmdline.isset (" no-array-field-sensitivity" ))
158+ {
159+ if (cmdline.isset (" max-field-sensitivity-array-size" ))
160+ {
161+ log.error ()
162+ << " --no-array-field-sensitivity and --max-field-sensitivity-array-size"
163+ << " must not be given together" << messaget::eom;
164+ exit (CPROVER_EXIT_USAGE_ERROR);
165+ }
166+ options.set_option (" no-array-field-sensitivity" , true );
167+ }
168+
150169 if (cmdline.isset (" partial-loops" ) && cmdline.isset (" unwinding-assertions" ))
151170 {
152171 log.error ()
Original file line number Diff line number Diff line change @@ -186,7 +186,8 @@ void run_property_decider(
186186 " (show-symex-strategies)" \
187187 " (depth):" \
188188 " (unwind):" \
189- " (unwindset):" \
189+ " (max-field-sensitivity-array-size):" \
190+ " (no-array-field-sensitivity)" \
190191 " (graphml-witness):" \
191192 " (unwindset):"
192193
@@ -198,6 +199,14 @@ void run_property_decider(
198199 " --program-only only show program expression\n " \
199200 " --show-loops show the loops in the program\n " \
200201 " --depth nr limit search depth\n " \
202+ " --max-field-sensitivity-array-size M\n " \
203+ " maximum size M of arrays for which field\n " \
204+ " sensitivity will be applied to array,\n " \
205+ " the default is 64\n " \
206+ " --no-array-field-sensitivity\n " \
207+ " deactivate field sensitivity for arrays, this is\n " \
208+ " equivalent to setting the maximum field \n " \
209+ " sensitivity size for arrays to 0\n " \
201210 " --unwind nr unwind nr times\n " \
202211 " --unwindset L:B,... unwind loop L with a bound of B\n " \
203212 " (use --show-loops to get the loop IDs)\n " \
Original file line number Diff line number Diff line change @@ -46,7 +46,12 @@ symex_configt::symex_configt(const optionst &options)
4646 run_validation_checks(options.get_bool_option(" validate-ssa-equation" )),
4747 show_symex_steps(options.get_bool_option(" show-goto-symex-steps" )),
4848 max_field_sensitivity_array_size(
49- options.get_unsigned_int_option(" max-field-sensitivity-array-size" ))
49+ options.is_set(" no-array-field-sensitivity" )
50+ ? 0
51+ : options.is_set(" max-field-sensitivity-array-size" )
52+ ? options.get_unsigned_int_option(
53+ " max-field-sensitivity-array-size" )
54+ : DEFAULT_MAX_FIELD_SENSITIVITY_ARRAY_SIZE)
5055{
5156}
5257
You can’t perform that action at this time.
0 commit comments