d_opts(opts)
{
d_de = new DecisionEngine();
- d_te = new TheoryEngine();
+ d_te = new TheoryEngine(this);
d_prop = new PropEngine(opts, d_de, d_te);
}
#define __CVC4__THEORY__THEORY_H
#include "expr/node.h"
-#include "util/literal.h"
#include "theory/output_channel.h"
namespace CVC4 {
/**
* Return whether a node is shared or not. Used by setup().
*/
- bool isShared(Node);
+ bool isShared(const Node& n);
public:
/**
* Prepare for a Node.
*/
- virtual void setup(Node) = 0;
+ virtual void setup(const Node& n) = 0;
/**
- * Assert a literal in the current context.
+ * Assert a fact in the current context.
*/
- void assertLiteral(Literal);
+ void assertFact(const Node& n);
/**
* Check the current assignment's consistency.
*/
- virtual void check(OutputChannel& out, Effort level = FULL_EFFORT) = 0;
+ virtual void check(OutputChannel& out,
+ Effort level = FULL_EFFORT) = 0;
/**
* T-propagate new literal assignments in the current context.
*/
- virtual void propagate(OutputChannel& out, Effort level = FULL_EFFORT) = 0;
+ virtual void propagate(OutputChannel& out,
+ Effort level = FULL_EFFORT) = 0;
/**
* Return an explanation for the literal represented by parameter n
* (which was previously propagated by this theory). Report
* explanations to an output channel.
*/
- virtual void explain(OutputChannel& out, Node n, Effort level = FULL_EFFORT) = 0;
+ virtual void explain(OutputChannel& out,
+ const Node& n,
+ Effort level = FULL_EFFORT) = 0;
};/* class Theory */
#ifndef __CVC4__THEORY_ENGINE_H
#define __CVC4__THEORY_ENGINE_H
+#include "expr/node.h"
+#include "theory/theory.h"
+
namespace CVC4 {
+class SmtEngine;
+
// In terms of abstraction, this is below (and provides services to)
// PropEngine.
* CVC4.
*/
class TheoryEngine {
+
+ SmtEngine* d_smt;
+
public:
+
+ /**
+ * Construct a theory engine.
+ */
+ TheoryEngine(SmtEngine* smt) : d_smt(smt) {
+ }
+
+ /**
+ * Get the theory associated to a given Node.
+ */
+ CVC4::theory::Theory* theoryOf(const Node& n);
+
};/* class TheoryEngine */
}/* CVC4 namespace */
decision_engine.cpp \
decision_engine.h \
exception.h \
- literal.h \
model.h \
options.h \
output.cpp \
#include "util/decision_engine.h"
#include "util/Assert.h"
-#include "util/literal.h"
+#include "expr/node.h"
namespace CVC4 {
* Only here to permit compilation and linkage. This may be pure
* virtual in the final design (?)
*/
-Literal DecisionEngine::nextDecision() {
+Node DecisionEngine::nextDecision() {
Unreachable();
}
#define __CVC4__DECISION_ENGINE_H
#include "cvc4_config.h"
-#include "util/literal.h"
+#include "expr/node.h"
namespace CVC4 {
/**
* Get the next decision.
*/
- virtual Literal nextDecision();// = 0
+ virtual Node nextDecision();// = 0
// TODO: design decision: decision engine should be notified of
// propagated lits, and also why(?) (so that it can make decisions
+++ /dev/null
-/********************* */
-/** literal.h
- ** Original author: mdeters
- ** Major contributors: none
- ** Minor contributors (to current version): none
- ** This file is part of the CVC4 prototype.
- ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
- ** See the file COPYING in the top-level source directory for licensing
- ** information.
- **
- ** A literal.
- **/
-
-#ifndef __CVC4__LITERAL_H
-#define __CVC4__LITERAL_H
-
-namespace CVC4 {
-
-class Literal {
-};
-
-}/* CVC4 namespace */
-
-#endif /* __CVC4__LITERAL_H */