-
Notifications
You must be signed in to change notification settings - Fork 273
String solver cbmc pass option #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ee67a16
b76ff86
c87e55a
43396c3
df0b9b5
32c440f
f3114c0
3d81e2c
85041f5
f1da808
8154f23
bb07798
a044f85
72ff309
f7ac9fd
96f2ff9
ba24a6f
ea4d029
6471dd2
c561031
c9a31d8
5acd0dc
51bdce1
05b4486
8bc6457
3bcc968
1764c1b
eafc46b
da3cd59
bbaf6bc
6edf9cf
251f9af
2e89a82
4f8665c
6c6de42
0d14e2d
a56190e
86049a2
5f6f525
e6f5e2d
c93c526
8df84f8
b10ac54
f6796d6
db27c3a
a0d785b
39ed567
df328e0
0c6c3c5
54e76cf
2b8050f
3db508f
1fb50b8
1c3f915
c28e97a
58a68af
bc07116
616cf1b
e7bf4dd
ae7e6d1
59ac505
bc3cc50
d59e21b
b1a2a54
99360ee
6a219d0
a26a843
9718528
1c90c05
330cd07
bb4eeff
2307b4c
57707d9
80a908d
7d64ea0
16086ab
aceb05d
dae543d
23c6f78
d6f63de
920af00
740397f
1e6574a
bb7450c
a4befc5
892b68c
408dea4
18e3d8e
d6f8820
fdba0bb
ac41780
ddbb844
377a73b
a9c886a
e241290
a4e3a16
a226f6d
5399966
23ce04b
c8da951
08c8d63
0e271df
2a24561
9c3311e
a9e8b9c
d534e99
add43dd
cc91d1a
91e3628
fede5af
2a5cac1
77a2685
9cb8535
4b84909
8be3253
e02fee2
599b343
d138195
4abb6d6
06eccb4
7ce74e8
64ae282
6afcf55
ad547d2
c864f07
557b119
a1fce4f
c4c0815
a3e39ea
4d0f0c3
2675eaf
453381d
2baf3bd
e447fa7
7999115
653ae6c
30c1b78
0a489c7
2888fc2
d03aac0
45c9d04
7bf66a1
a690724
888e374
1c89da7
b90ec2c
f1a4908
759613c
3f21d28
36015e3
96d30c1
24bfd52
ff4d91a
cac8777
b81708e
1624e6e
3f1c02b
04ad43d
95a4d9e
1eea52d
23426ce
4dc1edd
4f878c0
86abfae
37a3b75
b254c25
ea93657
f04df39
7526764
fab0bc6
7cf5e6d
cddbb6c
19f5172
9635737
4061517
32d997e
d4cee59
f9c45b3
f100d55
33ded2d
8e212b2
9f53d15
27a4a7d
6661386
3751029
2bc890d
0081e63
45f4b77
24cf61b
1e91533
2c4395e
a874b87
b56fcdc
99add90
26be0a4
20cd623
39e4ccc
fef67d7
2236603
baebf8f
0ff5946
1249657
4066ea2
7e49aa1
a7e6c4c
9a0f4af
dab12b2
aff92df
ff6b640
74a7d6b
94afd07
3da7602
185eb92
731623d
8177899
2ac64a2
c1691c3
7d1d5f9
ed20626
827bda9
7755cde
592a8f2
c6c0f69
4f7fc09
acbc764
3731dd8
57b3d8d
f6bc09c
98d0687
d3a39a1
0fadc77
0fc6d29
3c5b277
9df15f3
ad4ec55
c814f13
547f384
0202011
f49cacc
b949db3
7efb88e
854ac38
26f02b2
e83f58d
3b92cff
5b23ab1
ffb602b
6d32484
0b1a56b
8e45db2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ Author: Daniel Kroening, [email protected] | |
#include <ansi-c/c_preprocess.h> | ||
|
||
#include <goto-programs/goto_convert_functions.h> | ||
#include <goto-programs/pass_preprocess.h> | ||
#include <goto-programs/remove_function_pointers.h> | ||
#include <goto-programs/remove_virtual_functions.h> | ||
#include <goto-programs/remove_returns.h> | ||
|
@@ -341,6 +342,11 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options) | |
options.set_option("refine-arithmetic", true); | ||
} | ||
|
||
if(cmdline.isset("pass")) | ||
{ | ||
options.set_option("pass", true); | ||
} | ||
|
||
if(cmdline.isset("max-node-refinement")) | ||
options.set_option("max-node-refinement", cmdline.get_value("max-node-refinement")); | ||
|
||
|
@@ -911,6 +917,12 @@ bool cbmc_parse_optionst::process_goto_program( | |
status() << "Partial Inlining" << eom; | ||
goto_partial_inline(goto_functions, ns, ui_message_handler); | ||
|
||
|
||
if(cmdline.isset("pass")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By the looks of it: is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is used in |
||
status() << "PASS Preprocessing " << eom; | ||
pass_preprocess(symbol_table, goto_functions); | ||
} | ||
|
||
// remove returns, gcc vectors, complex | ||
remove_returns(symbol_table, goto_functions); | ||
remove_vector(symbol_table, goto_functions); | ||
|
@@ -1175,6 +1187,7 @@ void cbmc_parse_optionst::help() | |
" --yices use Yices\n" | ||
" --z3 use Z3\n" | ||
" --refine use refinement procedure (experimental)\n" | ||
" --pass use pass procedure (experimental)\n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So ... what is the pass procedure? Would be nice to be user-friendly in the --help output. |
||
" --outfile filename output formula to given file\n" | ||
" --arrays-uf-never never turn arrays into uninterpreted functions\n" | ||
" --arrays-uf-always always turn arrays into uninterpreted functions\n" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <solvers/sat/satcheck.h> | ||
#include <solvers/refinement/bv_refinement.h> | ||
#include <solvers/refinement/string_refinement.h> | ||
#include <solvers/smt1/smt1_dec.h> | ||
#include <solvers/smt2/smt2_dec.h> | ||
#include <solvers/cvc/cvc_dec.h> | ||
|
@@ -324,6 +325,29 @@ cbmc_solverst::solvert* cbmc_solverst::get_bv_refinement() | |
|
||
/*******************************************************************\ | ||
|
||
Function: cbmc_solverst::get_string_refinement | ||
|
||
Inputs: | ||
|
||
Outputs: | ||
|
||
Purpose: | ||
|
||
\*******************************************************************/ | ||
|
||
cbmc_solverst::solvert* cbmc_solverst::get_string_refinement() | ||
{ | ||
propt *prop; | ||
prop=new satcheck_no_simplifiert(); | ||
prop->set_message_handler(get_message_handler()); | ||
|
||
string_refinementt *string_refinement = new string_refinementt(ns, *prop); | ||
string_refinement->set_ui(ui); | ||
return new cbmc_solver_with_propt(string_refinement, prop); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's two objects allocated on the heap and never freed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
|
||
/*******************************************************************\ | ||
|
||
Function: cbmc_solverst::get_smt1 | ||
|
||
Inputs: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,11 +79,14 @@ class cbmc_solverst:public messaget | |
virtual std::unique_ptr<solvert> get_solver() | ||
{ | ||
solvert *solver; | ||
|
||
if(options.get_bool_option("dimacs")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove whitespace? |
||
solver = get_dimacs(); | ||
else if(options.get_bool_option("refine")) | ||
solver = get_bv_refinement(); | ||
else if(options.get_bool_option("pass")) { | ||
std::cout << "PASS solver" << std::endl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a proper message_streamt API |
||
solver = get_string_refinement(); | ||
} | ||
else if(options.get_bool_option("smt1")) | ||
solver = get_smt1(get_smt1_solver_type()); | ||
else if(options.get_bool_option("smt2")) | ||
|
@@ -111,6 +114,7 @@ class cbmc_solverst:public messaget | |
solvert* get_default(); | ||
solvert* get_dimacs(); | ||
solvert* get_bv_refinement(); | ||
solvert* get_string_refinement(); | ||
solvert* get_smt1(smt1_dect::solvert solver); | ||
solvert* get_smt2(smt2_dect::solvert solver); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
options.set_option("pass", cmdline.isset("pass"));
?