1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Mathias Preiner, Aina Niemetz, Dejan Jovanovic |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
8 |
|
* in the top-level source directory and their institutional affiliations. |
9 |
|
* All rights reserved. See the file COPYING in the top-level source |
10 |
|
* directory for licensing information. |
11 |
|
* **************************************************************************** |
12 |
|
* |
13 |
|
* SAT Solver creation facility. |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "prop/sat_solver_factory.h" |
17 |
|
|
18 |
|
#include "prop/bvminisat/bvminisat.h" |
19 |
|
#include "prop/cadical.h" |
20 |
|
#include "prop/cryptominisat.h" |
21 |
|
#include "prop/kissat.h" |
22 |
|
#include "prop/minisat/minisat.h" |
23 |
|
|
24 |
|
namespace cvc5 { |
25 |
|
namespace prop { |
26 |
|
|
27 |
8927 |
BVSatSolverInterface* SatSolverFactory::createMinisat( |
28 |
|
context::Context* mainSatContext, |
29 |
|
StatisticsRegistry& registry, |
30 |
|
const std::string& name) |
31 |
|
{ |
32 |
8927 |
return new BVMinisatSatSolver(registry, mainSatContext, name); |
33 |
|
} |
34 |
|
|
35 |
8988 |
MinisatSatSolver* SatSolverFactory::createCDCLTMinisat( |
36 |
|
StatisticsRegistry& registry) |
37 |
|
{ |
38 |
8988 |
return new MinisatSatSolver(registry); |
39 |
|
} |
40 |
|
|
41 |
3 |
SatSolver* SatSolverFactory::createCryptoMinisat(StatisticsRegistry& registry, |
42 |
|
const std::string& name) |
43 |
|
{ |
44 |
|
#ifdef CVC5_USE_CRYPTOMINISAT |
45 |
3 |
CryptoMinisatSolver* res = new CryptoMinisatSolver(registry, name); |
46 |
3 |
res->init(); |
47 |
3 |
return res; |
48 |
|
#else |
49 |
|
Unreachable() << "cvc5 was not compiled with Cryptominisat support."; |
50 |
|
#endif |
51 |
|
} |
52 |
|
|
53 |
3 |
SatSolver* SatSolverFactory::createCadical(StatisticsRegistry& registry, |
54 |
|
const std::string& name) |
55 |
|
{ |
56 |
|
#ifdef CVC5_USE_CADICAL |
57 |
3 |
CadicalSolver* res = new CadicalSolver(registry, name); |
58 |
3 |
res->init(); |
59 |
3 |
return res; |
60 |
|
#else |
61 |
|
Unreachable() << "cvc5 was not compiled with CaDiCaL support."; |
62 |
|
#endif |
63 |
|
} |
64 |
|
|
65 |
|
SatSolver* SatSolverFactory::createKissat(StatisticsRegistry& registry, |
66 |
|
const std::string& name) |
67 |
|
{ |
68 |
|
#ifdef CVC5_USE_KISSAT |
69 |
|
KissatSolver* res = new KissatSolver(registry, name); |
70 |
|
res->init(); |
71 |
|
return res; |
72 |
|
#else |
73 |
|
Unreachable() << "cvc5 was not compiled with Kissat support."; |
74 |
|
#endif |
75 |
|
} |
76 |
|
|
77 |
|
} // namespace prop |
78 |
27735 |
} // namespace cvc5 |