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 @@ -271,7 +271,12 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
271271
272272 if (cmdline.isset (" string-refine" ))
273273 {
274- options.set_option (" string-refine" , true );
274+ options.set_option (" refine-strings" , true );
275+ options.set_option (" string-non-empty" , cmdline.isset (" string-non-empty" ));
276+ options.set_option (" string-printable" , cmdline.isset (" string-printable" ));
277+ if (cmdline.isset (" string-max-length" ))
278+ options.set_option (
279+ " string-max-length" , cmdline.get_value (" string-max-length" ));
275280 }
276281
277282 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 @@ -173,6 +173,16 @@ cbmc_solverst::solvert* cbmc_solverst::get_string_refinement()
173173 string_refinementt *string_refinement=new string_refinementt (
174174 ns, *prop, MAX_NB_REFINEMENT);
175175 string_refinement->set_ui (ui);
176+
177+ string_refinement->do_concretizing =options.get_bool_option (" trace" );
178+ if (options.get_bool_option (" string-max-length" ))
179+ string_refinement->set_max_string_length (
180+ options.get_signed_int_option (" string-max-length" ));
181+ if (options.get_bool_option (" string-non-empty" ))
182+ string_refinement->enforce_non_empty_string ();
183+ if (options.get_bool_option (" string-printable" ))
184+ string_refinement->enforce_printable_characters ();
185+
176186 return new solvert (string_refinement, prop);
177187}
178188
You can’t perform that action at this time.
0 commit comments