File tree 4 files changed +54
-2
lines changed 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)
135
135
parse_java_language_options (cmdline, options);
136
136
parse_java_object_factory_options (cmdline, options);
137
137
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
+
138
157
if (cmdline.isset (" show-symex-strategies" ))
139
158
{
140
159
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)
147
147
exit (CPROVER_EXIT_USAGE_ERROR);
148
148
}
149
149
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
+
150
169
if (cmdline.isset (" partial-loops" ) && cmdline.isset (" unwinding-assertions" ))
151
170
{
152
171
log .error ()
Original file line number Diff line number Diff line change @@ -186,7 +186,8 @@ void run_property_decider(
186
186
" (show-symex-strategies)" \
187
187
" (depth):" \
188
188
" (unwind):" \
189
- " (unwindset):" \
189
+ " (max-field-sensitivity-array-size):" \
190
+ " (no-array-field-sensitivity)" \
190
191
" (graphml-witness):" \
191
192
" (unwindset):"
192
193
@@ -198,6 +199,14 @@ void run_property_decider(
198
199
" --program-only only show program expression\n " \
199
200
" --show-loops show the loops in the program\n " \
200
201
" --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 " \
201
210
" --unwind nr unwind nr times\n " \
202
211
" --unwindset L:B,... unwind loop L with a bound of B\n " \
203
212
" (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)
46
46
run_validation_checks(options.get_bool_option(" validate-ssa-equation" )),
47
47
show_symex_steps(options.get_bool_option(" show-goto-symex-steps" )),
48
48
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)
50
55
{
51
56
}
52
57
You can’t perform that action at this time.
0 commit comments