Skip to content

Commit 21de424

Browse files
author
kroening
committed
started solver_factory
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@3250 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
1 parent f53351d commit 21de424

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

src/cbmc/bmc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ class bmct:public messaget
9393
virtual void do_unwind_module(
9494
decision_proceduret &decision_procedure);
9595
void do_conversion(prop_convt &solver);
96+
97+
prop_convt *solver_factory();
9698

9799
virtual void show_vcc();
98100
virtual bool all_claims(

src/cbmc/cbmc_solvers.cpp

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,84 @@ Author: Daniel Kroening, [email protected]
2626

2727
/*******************************************************************\
2828
29+
Function: bmct::solver_factory
30+
31+
Inputs:
32+
33+
Outputs:
34+
35+
Purpose: Decide using "default" decision procedure
36+
37+
\*******************************************************************/
38+
39+
prop_convt *bmct::solver_factory()
40+
{
41+
//const std::string &filename=options.get_option("outfile");
42+
43+
if(options.get_bool_option("boolector"))
44+
{
45+
}
46+
else if(options.get_bool_option("mathsat"))
47+
{
48+
}
49+
else if(options.get_bool_option("cvc"))
50+
{
51+
}
52+
else if(options.get_bool_option("dimacs"))
53+
{
54+
}
55+
else if(options.get_bool_option("opensmt"))
56+
{
57+
}
58+
else if(options.get_bool_option("refine"))
59+
{
60+
}
61+
else if(options.get_bool_option("aig"))
62+
{
63+
}
64+
else if(options.get_bool_option("smt1"))
65+
{
66+
}
67+
else if(options.get_bool_option("smt2"))
68+
{
69+
}
70+
else if(options.get_bool_option("yices"))
71+
{
72+
}
73+
else if(options.get_bool_option("z3"))
74+
{
75+
}
76+
else
77+
{
78+
// THE DEFAULT
79+
80+
#if 0
81+
// SAT preprocessor won't work with beautification.
82+
if(options.get_bool_option("sat-preprocessor") &&
83+
!options.get_bool_option("beautify"))
84+
{
85+
solver=std::auto_ptr<propt>(new satcheckt);
86+
}
87+
else
88+
solver=std::auto_ptr<propt>(new satcheck_minisat_no_simplifiert);
89+
90+
solver->set_message_handler(get_message_handler());
91+
solver->set_verbosity(get_verbosity());
92+
93+
bv_cbmct bv_cbmc(ns, *solver);
94+
95+
if(options.get_option("arrays-uf")=="never")
96+
bv_cbmc.unbounded_array=bv_cbmct::U_NONE;
97+
else if(options.get_option("arrays-uf")=="always")
98+
bv_cbmc.unbounded_array=bv_cbmct::U_ALL;
99+
#endif
100+
}
101+
102+
return 0;
103+
}
104+
105+
/*******************************************************************\
106+
29107
Function: bmct::decide_default
30108
31109
Inputs:

0 commit comments

Comments
 (0)