1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Kshitij Bansal, Aina Niemetz, Andrew Reynolds |
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 |
|
* Decision engine. |
14 |
|
*/ |
15 |
|
#include "decision/decision_engine.h" |
16 |
|
|
17 |
|
#include "decision/decision_engine_old.h" |
18 |
|
#include "options/decision_options.h" |
19 |
|
#include "prop/sat_solver.h" |
20 |
|
#include "util/resource_manager.h" |
21 |
|
|
22 |
|
namespace cvc5 { |
23 |
|
namespace decision { |
24 |
|
|
25 |
9995 |
DecisionEngine::DecisionEngine(context::Context* c, ResourceManager* rm) |
26 |
|
: d_context(c), |
27 |
|
d_resourceManager(rm), |
28 |
|
d_cnfStream(nullptr), |
29 |
9995 |
d_satSolver(nullptr) |
30 |
|
{ |
31 |
9995 |
} |
32 |
|
|
33 |
9995 |
void DecisionEngine::finishInit(CDCLTSatSolverInterface* ss, CnfStream* cs) |
34 |
|
{ |
35 |
9995 |
d_satSolver = ss; |
36 |
9995 |
d_cnfStream = cs; |
37 |
9995 |
} |
38 |
|
|
39 |
2749940 |
prop::SatLiteral DecisionEngine::getNext(bool& stopSearch) |
40 |
|
{ |
41 |
2749940 |
d_resourceManager->spendResource(Resource::DecisionStep); |
42 |
2749940 |
return getNextInternal(stopSearch); |
43 |
|
} |
44 |
|
|
45 |
2249 |
DecisionEngineEmpty::DecisionEngineEmpty(context::Context* sc, |
46 |
2249 |
ResourceManager* rm) |
47 |
2249 |
: DecisionEngine(sc, rm) |
48 |
|
{ |
49 |
2249 |
} |
50 |
14936 |
bool DecisionEngineEmpty::isDone() { return false; } |
51 |
125887 |
void DecisionEngineEmpty::addAssertion(TNode assertion) {} |
52 |
7279 |
void DecisionEngineEmpty::addSkolemDefinition(TNode lem, TNode skolem) {} |
53 |
1464713 |
prop::SatLiteral DecisionEngineEmpty::getNextInternal(bool& stopSearch) |
54 |
|
{ |
55 |
1464713 |
return undefSatLiteral; |
56 |
|
} |
57 |
|
|
58 |
|
} // namespace decision |
59 |
29505 |
} // namespace cvc5 |