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 "smt/env.h" |
21 |
|
#include "util/resource_manager.h" |
22 |
|
|
23 |
|
namespace cvc5 { |
24 |
|
namespace decision { |
25 |
|
|
26 |
15339 |
DecisionEngine::DecisionEngine(Env& env) |
27 |
15339 |
: EnvObj(env), d_cnfStream(nullptr), d_satSolver(nullptr) |
28 |
|
{ |
29 |
15339 |
} |
30 |
|
|
31 |
15339 |
void DecisionEngine::finishInit(CDCLTSatSolverInterface* ss, CnfStream* cs) |
32 |
|
{ |
33 |
15339 |
d_satSolver = ss; |
34 |
15339 |
d_cnfStream = cs; |
35 |
15339 |
} |
36 |
|
|
37 |
3343232 |
prop::SatLiteral DecisionEngine::getNext(bool& stopSearch) |
38 |
|
{ |
39 |
3343232 |
resourceManager()->spendResource(Resource::DecisionStep); |
40 |
3343232 |
return getNextInternal(stopSearch); |
41 |
|
} |
42 |
|
|
43 |
2581 |
DecisionEngineEmpty::DecisionEngineEmpty(Env& env) : DecisionEngine(env) {} |
44 |
21283 |
bool DecisionEngineEmpty::isDone() { return false; } |
45 |
153809 |
void DecisionEngineEmpty::addAssertion(TNode assertion, bool isLemma) {} |
46 |
7416 |
void DecisionEngineEmpty::addSkolemDefinition(TNode lem, |
47 |
|
TNode skolem, |
48 |
|
bool isLemma) |
49 |
|
{ |
50 |
7416 |
} |
51 |
1880484 |
prop::SatLiteral DecisionEngineEmpty::getNextInternal(bool& stopSearch) |
52 |
|
{ |
53 |
1880484 |
return undefSatLiteral; |
54 |
|
} |
55 |
|
|
56 |
|
} // namespace decision |
57 |
31137 |
} // namespace cvc5 |