summaryrefslogtreecommitdiff
path: root/src/prop/theory_proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/prop/theory_proxy.cpp')
-rw-r--r--src/prop/theory_proxy.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/prop/theory_proxy.cpp b/src/prop/theory_proxy.cpp
index 5304691a6..5de97d0d8 100644
--- a/src/prop/theory_proxy.cpp
+++ b/src/prop/theory_proxy.cpp
@@ -39,12 +39,16 @@ TheoryProxy::TheoryProxy(PropEngine* propEngine,
DecisionEngine* decisionEngine,
context::Context* context,
CnfStream* cnfStream,
- SmtGlobals* globals)
+ std::ostream* replayLog,
+ ExprStream* replayStream,
+ LemmaChannels* channels)
: d_propEngine(propEngine),
d_cnfStream(cnfStream),
d_decisionEngine(decisionEngine),
d_theoryEngine(theoryEngine),
- d_globals(globals),
+ d_channels(channels),
+ d_replayLog(replayLog),
+ d_replayStream(replayStream),
d_queue(context),
d_replayedDecisions("prop::theoryproxy::replayedDecisions", 0)
{
@@ -58,20 +62,12 @@ TheoryProxy::~TheoryProxy() {
/** The lemma input channel we are using. */
LemmaInputChannel* TheoryProxy::inputChannel() {
- return d_globals->getLemmaInputChannel();
+ return d_channels->getLemmaInputChannel();
}
/** The lemma output channel we are using. */
LemmaOutputChannel* TheoryProxy::outputChannel() {
- return d_globals->getLemmaOutputChannel();
-}
-
-std::ostream* TheoryProxy::replayLog() {
- return d_globals->getReplayLog();
-}
-
-ExprStream* TheoryProxy::replayStream() {
- return d_globals->getReplayStream();
+ return d_channels->getLemmaOutputChannel();
}
@@ -203,8 +199,8 @@ void TheoryProxy::notifyNewLemma(SatClause& lemma) {
SatLiteral TheoryProxy::getNextReplayDecision() {
#ifdef CVC4_REPLAY
- if(replayStream() != NULL) {
- Expr e = replayStream()->nextExpr();
+ if(d_replayStream != NULL) {
+ Expr e = d_replayStream->nextExpr();
if(!e.isNull()) { // we get null node when out of decisions to replay
// convert & return
++d_replayedDecisions;
@@ -217,9 +213,9 @@ SatLiteral TheoryProxy::getNextReplayDecision() {
void TheoryProxy::logDecision(SatLiteral lit) {
#ifdef CVC4_REPLAY
- if(replayLog() != NULL) {
+ if(d_replayLog != NULL) {
Assert(lit != undefSatLiteral, "logging an `undef' decision ?!");
- (*replayLog()) << d_cnfStream->getNode(lit) << std::endl;
+ (*d_replayLog) << d_cnfStream->getNode(lit) << std::endl;
}
#endif /* CVC4_REPLAY */
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback