}
out << "): ";
}
- out << Node::fromExpr( tm->getValue( n.toExpr() ) );
+ out << tm->getValue( n );
out << ";" << std::endl;
/*
out << ") " << tn;
}
out << " ";
- out << Node::fromExpr( tm->getValue( n.toExpr() ) );
+ out << tm->getValue( n );
out << ")" << std::endl;
/*
theory::TheoryModel* m = d_theoryEngine->getModel();
Node resultNode;
if( m ){
- resultNode = Node::fromExpr( m->getValue( n.toExpr() ) );
+ resultNode = m->getValue( n );
}
Trace("smt") << "--- got value " << n << " = " << resultNode << endl;
// type-check the result we got
theory::TheoryModel* m = d_theoryEngine->getModel();
Node resultNode;
if( m ){
- resultNode = Node::fromExpr( m->getValue( n.toExpr() ) );
+ resultNode = m->getValue( n );
}
// type-check the result we got
d_rep_set.clear();
}
-Expr TheoryModel::getValue( const Expr& expr ){
- Node n = Node::fromExpr( expr );
+Node TheoryModel::getValue( TNode n ){
//apply substitutions
Node nn = d_substitutions.apply( n );
//get value in model
- Node ret = getModelValue( nn );
+ return getModelValue( nn );
+}
+
+Expr TheoryModel::getValue( const Expr& expr ){
+ Node n = Node::fromExpr( expr );
+ Node ret = getValue( n );
return ret.toExpr();
}
}else{
return r;
}
-}
\ No newline at end of file
+}
*/
Node getModelValue( TNode n );
public:
+ /**
+ * Get value function. This should be called only after a ModelBuilder has called buildModel(...)
+ * on this model.
+ */
+ Node getValue( TNode n );
+
/** get existing domain value, with possible exclusions
* This function returns a term in d_rep_set.d_type_reps[tn] but not in exclude
*/
bool areEqual( Node a, Node b );
bool areDisequal( Node a, Node b );
public:
- /** get value function */
+ /** get value function for Exprs. */
Expr getValue( const Expr& expr );
+
+
/** to stream function */
void toStream( std::ostream& out );
public: