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 |
2 |
BVSatSolverInterface* SatSolverFactory::createMinisat( |
28 |
|
context::Context* mainSatContext, |
29 |
|
StatisticsRegistry& registry, |
30 |
|
const std::string& name) |
31 |
|
{ |
32 |
2 |
return new BVMinisatSatSolver(registry, mainSatContext, name); |
33 |
|
} |
34 |
|
|
35 |
9908 |
MinisatSatSolver* SatSolverFactory::createCDCLTMinisat( |
36 |
|
StatisticsRegistry& registry) |
37 |
|
{ |
38 |
9908 |
return new MinisatSatSolver(registry); |
39 |
|
} |
40 |
|
|
41 |
13 |
SatSolver* SatSolverFactory::createCryptoMinisat(StatisticsRegistry& registry, |
42 |
|
const std::string& name) |
43 |
|
{ |
44 |
|
#ifdef CVC5_USE_CRYPTOMINISAT |
45 |
13 |
CryptoMinisatSolver* res = new CryptoMinisatSolver(registry, name); |
46 |
13 |
res->init(); |
47 |
13 |
return res; |
48 |
|
#else |
49 |
|
Unreachable() << "cvc5 was not compiled with Cryptominisat support."; |
50 |
|
#endif |
51 |
|
} |
52 |
|
|
53 |
6086 |
SatSolver* SatSolverFactory::createCadical(StatisticsRegistry& registry, |
54 |
|
const std::string& name) |
55 |
|
{ |
56 |
6086 |
CadicalSolver* res = new CadicalSolver(registry, name); |
57 |
6086 |
res->init(); |
58 |
6086 |
return res; |
59 |
|
} |
60 |
|
|
61 |
|
SatSolver* SatSolverFactory::createKissat(StatisticsRegistry& registry, |
62 |
|
const std::string& name) |
63 |
|
{ |
64 |
|
#ifdef CVC5_USE_KISSAT |
65 |
|
KissatSolver* res = new KissatSolver(registry, name); |
66 |
|
res->init(); |
67 |
|
return res; |
68 |
|
#else |
69 |
|
Unreachable() << "cvc5 was not compiled with Kissat support."; |
70 |
|
#endif |
71 |
|
} |
72 |
|
|
73 |
|
} // namespace prop |
74 |
29286 |
} // namespace cvc5 |