|
20 | 20 | #include <ansi-c/c_preprocess.h>
|
21 | 21 |
|
22 | 22 | #include <goto-programs/goto_convert_functions.h>
|
| 23 | +#include <goto-programs/string_refine_preprocess.h> |
23 | 24 | #include <goto-programs/remove_function_pointers.h>
|
24 | 25 | #include <goto-programs/remove_virtual_functions.h>
|
25 | 26 | #include <goto-programs/remove_instanceof.h>
|
@@ -310,6 +311,11 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
|
310 | 311 | options.set_option("refine-arithmetic", true);
|
311 | 312 | }
|
312 | 313 |
|
| 314 | + if(cmdline.isset("refine-strings")) |
| 315 | + { |
| 316 | + options.set_option("refine-strings", true); |
| 317 | + } |
| 318 | + |
313 | 319 | if(cmdline.isset("max-node-refinement"))
|
314 | 320 | options.set_option(
|
315 | 321 | "max-node-refinement",
|
@@ -904,6 +910,14 @@ bool cbmc_parse_optionst::process_goto_program(
|
904 | 910 | status() << "Partial Inlining" << eom;
|
905 | 911 | goto_partial_inline(goto_functions, ns, ui_message_handler);
|
906 | 912 |
|
| 913 | + |
| 914 | + if(cmdline.isset("refine-strings")) |
| 915 | + { |
| 916 | + status() << "Preprocessing for string refinement" << eom; |
| 917 | + string_refine_preprocesst( |
| 918 | + symbol_table, goto_functions, ui_message_handler); |
| 919 | + } |
| 920 | + |
907 | 921 | // remove returns, gcc vectors, complex
|
908 | 922 | remove_returns(symbol_table, goto_functions);
|
909 | 923 | remove_vector(symbol_table, goto_functions);
|
@@ -1191,6 +1205,7 @@ void cbmc_parse_optionst::help()
|
1191 | 1205 | " --yices use Yices\n"
|
1192 | 1206 | " --z3 use Z3\n"
|
1193 | 1207 | " --refine use refinement procedure (experimental)\n"
|
| 1208 | + " --refine-strings use string refinement (experimental)\n" |
1194 | 1209 | " --outfile filename output formula to given file\n"
|
1195 | 1210 | " --arrays-uf-never never turn arrays into uninterpreted functions\n" // NOLINT(*)
|
1196 | 1211 | " --arrays-uf-always always turn arrays into uninterpreted functions\n" // NOLINT(*)
|
|
0 commit comments