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