bitblaster.h \
bitblaster.cpp \
bv_subtheory.h \
- bv_subtheory_eq.h \
- bv_subtheory_eq.cpp \
bv_subtheory_core.h \
bv_subtheory_core.cpp \
bv_subtheory_bitblast.h \
bv_subtheory_bitblast.cpp \
+ bv_subtheory_inequality.h \
+ bv_subtheory_inequality.cpp \
bitblast_strategies.h \
bitblast_strategies.cpp \
slicer.h \
class InequalityGraph {
context::Context d_context;
+
+ struct InequalityEdge {
+ TermId next;
+ ReasonId reason;
+ InequalityEdge(TermId n, ReasonId r)
+ : next(n)
+ reason(r)
+ {}
+ };
+
+ class InequalityNode {
+ TermId d_id;
+ unsigned d_bitwidth;
+ bool d_isConstant;
+ BitVector d_value;
+ };
+ std::vector<InequalityNode> d_nodes;
+ std::vector< std::vector<InequalityEdge> > d_nodeEdges;
public:
bool addInequality(TermId a, TermId b, ReasonId reason);
bool propagate();
bool areLessThan(TermId a, TermId b);
- void getConflict(std::vector<ReasonId>& conflict);
+ void getConflict(std::vector<ReasonId>& conflict);
+ TermId addTerm(unsigned bitwidth);
+ TermId addTerm(const BitVector& value);
};
}
// forward declaration
class TheoryBV;
+typedef context::CDQueue<TNode> AssertionQueue;
/**
* Abstract base class for bit-vector subtheory solvers
*
/** The bit-vector theory */
TheoryBV* d_bv;
- context::CDQueue<TNode> d_assertionQueue;
+ AssertionQueue d_assertionQueue;
context::CDO<uint32_t> d_assertionIndex;
public:
virtual bool check(Theory::Effort e) = 0;
virtual void explain(TNode literal, std::vector<TNode>& assumptions) = 0;
virtual void preRegister(TNode node) {}
- virtual void propagate(Effort e) {}
+ virtual void propagate(Theory::Effort e) {}
virtual void collectModelInfo(TheoryModel* m) = 0;
bool done() { return d_assertionQueue.size() == d_assertionIndex; }
TNode get() {
}
-bool InequalitySolver::propagate(Theory::Effort e) {
+void InequalitySolver::propagate(Theory::Effort e) {
}
#ifndef __CVC4__THEORY__BV__BV_SUBTHEORY__INEQUALITY_H
#define __CVC4__THEORY__BV__BV_SUBTHEORY__INEQUALITY_H
-#include "context/context.h"
-#include "context/cdqueue.h"
-#include "theory/uf/equality_engine.h"
-#include "theory/theory.h"
-
+#include "theory/bv/theory_bv.h"
+#include "theory/bv/bv_subtheory.h"
namespace CVC4 {
namespace theory {
namespace bv {
-class InequalitySolver {
+class InequalitySolver: public SubtheorySolver {
public:
{}
bool check(Theory::Effort e);
- void propagate(Effort e);
+ void propagate(Theory::Effort e);
void explain(TNode literal, std::vector<TNode>& assumptions);
};
#include "theory/bv/theory_bv_utils.h"
#include "util/statistics_registry.h"
#include "theory/bv/bv_subtheory.h"
-#include "theory/bv/bv_subtheory_eq.h"
#include "theory/bv/bv_subtheory_core.h"
#include "theory/bv/bv_subtheory_bitblast.h"
#include "theory/bv/slicer.h"