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/cadical.h" |
19 |
|
#include "prop/cryptominisat.h" |
20 |
|
#include "prop/kissat.h" |
21 |
|
#include "prop/minisat/minisat.h" |
22 |
|
|
23 |
|
namespace cvc5 { |
24 |
|
namespace prop { |
25 |
|
|
26 |
15338 |
MinisatSatSolver* SatSolverFactory::createCDCLTMinisat( |
27 |
|
StatisticsRegistry& registry) |
28 |
|
{ |
29 |
15338 |
return new MinisatSatSolver(registry); |
30 |
|
} |
31 |
|
|
32 |
4 |
SatSolver* SatSolverFactory::createCryptoMinisat(StatisticsRegistry& registry, |
33 |
|
const std::string& name) |
34 |
|
{ |
35 |
|
#ifdef CVC5_USE_CRYPTOMINISAT |
36 |
4 |
CryptoMinisatSolver* res = new CryptoMinisatSolver(registry, name); |
37 |
4 |
res->init(); |
38 |
4 |
return res; |
39 |
|
#else |
40 |
|
Unreachable() << "cvc5 was not compiled with Cryptominisat support."; |
41 |
|
#endif |
42 |
|
} |
43 |
|
|
44 |
7287 |
SatSolver* SatSolverFactory::createCadical(StatisticsRegistry& registry, |
45 |
|
const std::string& name) |
46 |
|
{ |
47 |
7287 |
CadicalSolver* res = new CadicalSolver(registry, name); |
48 |
7287 |
res->init(); |
49 |
7287 |
return res; |
50 |
|
} |
51 |
|
|
52 |
|
SatSolver* SatSolverFactory::createKissat(StatisticsRegistry& registry, |
53 |
|
const std::string& name) |
54 |
|
{ |
55 |
|
#ifdef CVC5_USE_KISSAT |
56 |
|
KissatSolver* res = new KissatSolver(registry, name); |
57 |
|
res->init(); |
58 |
|
return res; |
59 |
|
#else |
60 |
|
Unreachable() << "cvc5 was not compiled with Kissat support."; |
61 |
|
#endif |
62 |
|
} |
63 |
|
|
64 |
|
} // namespace prop |
65 |
31125 |
} // namespace cvc5 |