void BitblastSolver::collectModelInfo(TheoryModel* m) {
return d_bitblaster->collectModelInfo(m);
}
+
+Node BitblastSolver::getModelValue(TNode node) {
+ return d_bitblaster->getVarValue(node);
+}
bool addAssertions(const std::vector<TNode>& assertions, Theory::Effort e);
void explain(TNode literal, std::vector<TNode>& assumptions);
EqualityStatus getEqualityStatus(TNode a, TNode b);
- void collectModelInfo(TheoryModel* m);
+ void collectModelInfo(TheoryModel* m);
+ Node getModelValue(TNode node);
};
}
*/
virtual EqualityStatus getEqualityStatus(TNode a, TNode b) { return EQUALITY_UNKNOWN; }
+ /**
+ * Return the model value of the give shared term (or null if not avalilable.
+ */
+ virtual Node getModelValue(TNode var) { return Node::null(); }
+
/**
* Check the current assignment's consistency.
*
return theoryOf(Theory::theoryOf(a.getType()))->getEqualityStatus(a, b);
}
+Node TheoryEngine::getModelValue(TNode var) {
+ Assert(d_sharedTerms.isShared(var));
+ return theoryOf(Theory::theoryOf(var.getType()))->getModelValue(var);
+}
+
static Node mkExplanation(const std::vector<NodeTheoryPair>& explanation) {
std::set<TNode> all;
*/
theory::EqualityStatus getEqualityStatus(TNode a, TNode b);
+ /**
+ * Retruns the value that a theory that owns the type of var currently
+ * has (or null if none);
+ */
+ Node getModelValue(TNode var);
+
private:
/** Default visitor for pre-registration */
return d_engine->getEqualityStatus(a, b);
}
+Node Valuation::getModelValue(TNode var) {
+ return d_engine->getModelValue(var);
+}
+
+
Node Valuation::ensureLiteral(TNode n) {
Debug("ensureLiteral") << "rewriting: " << n << std::endl;
Node rewritten = Rewriter::rewrite(n);
*/
EqualityStatus getEqualityStatus(TNode a, TNode b);
+ /**
+ * Returns the model value of the shared term (or null if not available).
+ */
+ Node getModelValue(TNode var);
+
/**
* Ensure that the given node will have a designated SAT literal
* that is definitionally equal to it. The result of this function