bool Solver::getInterpolant(Term conj, Term& output) const
{
CVC4_API_SOLVER_TRY_CATCH_BEGIN;
- Expr result;
- bool success = d_smtEngine->getInterpol(conj.d_node->toExpr(), result);
+ CVC4::ExprManagerScope exmgrs(*(d_exprMgr.get()));
+ Node result;
+ bool success = d_smtEngine->getInterpol(*conj.d_node, result);
if (success)
{
- output = Term(output.d_solver, result);
+ output = Term(this, result);
}
return success;
CVC4_API_SOLVER_TRY_CATCH_END;
bool Solver::getInterpolant(Term conj, Grammar& g, Term& output) const
{
CVC4_API_SOLVER_TRY_CATCH_BEGIN;
- Expr result;
+ CVC4::ExprManagerScope exmgrs(*(d_exprMgr.get()));
+ Node result;
bool success = d_smtEngine->getInterpol(
- conj.d_node->toExpr(), *g.resolve().d_type, result);
+ *conj.d_node, TypeNode::fromType(*g.resolve().d_type), result);
if (success)
{
- output = Term(output.d_solver, result);
+ output = Term(this, result);
}
return success;
CVC4_API_SOLVER_TRY_CATCH_END;
bool Solver::getAbduct(Term conj, Term& output) const
{
CVC4_API_SOLVER_TRY_CATCH_BEGIN;
+ CVC4::ExprManagerScope exmgrs(*(d_exprMgr.get()));
Node result;
bool success = d_smtEngine->getAbduct(*conj.d_node, result);
if (success)
{
- output = Term(output.d_solver, result);
+ output = Term(this, result);
}
return success;
CVC4_API_SOLVER_TRY_CATCH_END;
bool Solver::getAbduct(Term conj, Grammar& g, Term& output) const
{
CVC4_API_SOLVER_TRY_CATCH_BEGIN;
+ CVC4::ExprManagerScope exmgrs(*(d_exprMgr.get()));
Node result;
bool success = d_smtEngine->getAbduct(
*conj.d_node, TypeNode::fromType(*g.resolve().d_type), result);
if (success)
{
- output = Term(output.d_solver, result);
+ output = Term(this, result);
}
return success;
CVC4_API_SOLVER_TRY_CATCH_END;
}
}
-bool SmtEngine::getInterpol(const Expr& conj,
- const Type& grammarType,
- Expr& interpol)
+bool SmtEngine::getInterpol(const Node& conj,
+ const TypeNode& grammarType,
+ Node& interpol)
{
return false;
}
-bool SmtEngine::getInterpol(const Expr& conj, Expr& interpol)
+bool SmtEngine::getInterpol(const Node& conj, Node& interpol)
{
- Type grammarType;
+ TypeNode grammarType;
return getInterpol(conj, grammarType, interpol);
}
* This method invokes a separate copy of the SMT engine for solving the
* corresponding sygus problem for generating such a solution.
*/
- bool getInterpol(const Expr& conj, const Type& grammarType, Expr& interpol);
+ bool getInterpol(const Node& conj,
+ const TypeNode& grammarType,
+ Node& interpol);
/** Same as above, but without user-provided grammar restrictions */
- bool getInterpol(const Expr& conj, Expr& interpol);
+ bool getInterpol(const Node& conj, Node& interpol);
/**
* This method asks this SMT engine to find an abduct with respect to the