File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,12 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
291291
292292 if (cmdline.isset (" string-refine" ))
293293 {
294- options.set_option (" string-refine" , true );
294+ options.set_option (" refine-strings" , true );
295+ options.set_option (" string-non-empty" , cmdline.isset (" string-non-empty" ));
296+ options.set_option (" string-printable" , cmdline.isset (" string-printable" ));
297+ if (cmdline.isset (" string-max-length" ))
298+ options.set_option (
299+ " string-max-length" , cmdline.get_value (" string-max-length" ));
295300 }
296301
297302 if (cmdline.isset (" max-node-refinement" ))
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class optionst;
4141 " (no-sat-preprocessor)" \
4242 " (no-pretty-names)(beautify)" \
4343 " (dimacs)(refine)(max-node-refinement):(refine-arrays)(refine-arithmetic)" \
44- " (string-refine) " \
44+ " (refine-strings)( string-non-empty)(string-printable)(string-max-length): " \
4545 " (aig)(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
4646 " (little-endian)(big-endian)" \
4747 " (show-goto-functions)(show-loops)" \
Original file line number Diff line number Diff line change @@ -172,6 +172,16 @@ cbmc_solverst::solvert* cbmc_solverst::get_string_refinement()
172172 string_refinementt *string_refinement=new string_refinementt (
173173 ns, *prop, MAX_NB_REFINEMENT);
174174 string_refinement->set_ui (ui);
175+
176+ string_refinement->do_concretizing =options.get_bool_option (" trace" );
177+ if (options.get_bool_option (" string-max-length" ))
178+ string_refinement->set_max_string_length (
179+ options.get_signed_int_option (" string-max-length" ));
180+ if (options.get_bool_option (" string-non-empty" ))
181+ string_refinement->enforce_non_empty_string ();
182+ if (options.get_bool_option (" string-printable" ))
183+ string_refinement->enforce_printable_characters ();
184+
175185 return new solvert (string_refinement, prop);
176186}
177187
You can’t perform that action at this time.
0 commit comments