blob: de88d656e4fd5d09aba3aea41474c256da9d519e (
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
79
80
81
82
83
84
85
86
|
/******************************************************************************
* Top contributors (to current version):
* Kshitij Bansal, Andrew Reynolds, Aina Niemetz
*
* 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.
* ****************************************************************************
*
* Decision engine.
*/
#include "cvc5_private.h"
#ifndef CVC5__DECISION__DECISION_ENGINE_H
#define CVC5__DECISION__DECISION_ENGINE_H
#include "expr/node.h"
#include "prop/cnf_stream.h"
#include "prop/sat_solver.h"
#include "prop/sat_solver_types.h"
namespace cvc5 {
namespace prop {
class SkolemDefManager;
}
class DecisionEngineOld;
namespace decision {
class DecisionEngine
{
public:
/** Constructor */
DecisionEngine(context::Context* sc,
context::UserContext* uc,
prop::SkolemDefManager* skdm,
ResourceManager* rm);
/** Finish initialize */
void finishInit(prop::CDCLTSatSolverInterface* ss, prop::CnfStream* cs);
/** Presolve, called at the beginning of each check-sat call */
void presolve();
/** Gets the next decision based on strategies that are enabled */
prop::SatLiteral getNext(bool& stopSearch);
/** Is the DecisionEngine in a state where it has solved everything? */
bool isDone();
/**
* Notify this class that assertion is an (input) assertion, not corresponding
* to a skolem definition.
*/
void addAssertion(TNode assertion);
/**
* TODO: remove this interface
* Notify this class that lem is the skolem definition for skolem, which is
* a part of the current assertions.
*/
void addSkolemDefinition(TNode lem, TNode skolem);
/**
* Notify this class that the literal n has been asserted, possibly
* propagated by the SAT solver.
*/
void notifyAsserted(TNode n);
private:
/** The old implementation */
std::unique_ptr<DecisionEngineOld> d_decEngineOld;
/** Pointer to resource manager for associated SmtEngine */
ResourceManager* d_resourceManager;
/** using old implementation? */
bool d_useOld;
};
} // namespace decision
} // namespace cvc5
#endif /* CVC5__DECISION__DECISION_ENGINE_H */
|