void dreal_set_domain_ub(dreal_context c, dreal_expr v, double n) { assert(c); assert(v); OpenSMTContext * c_ = static_cast<OpenSMTContext *>(c); OpenSMTContext & context = *c_; assert(context.getStatus() == l_True); Enode * var = static_cast<Enode *>(v); var->setDomainUpperBound(n); }
dreal_expr dreal_mk_real_var(dreal_context c, char const * s , double lb, double ub) { assert(c); assert(s); OpenSMTContext * c_ = static_cast<OpenSMTContext *>(c); OpenSMTContext & context = *c_; Snode * sort = context.mkSortReal(); context.DeclareFun(s, sort); Enode * res = context.mkVar(s, true); res->setDomainLowerBound(lb); res->setDomainUpperBound(ub); res->setValueLowerBound(lb); res->setValueUpperBound(ub); return static_cast<void *>(res); }
opensmt_expr opensmt_mk_int_var( opensmt_context c, char const * s , long lb, long ub) { assert( c ); assert( s ); OpenSMTContext * c_ = static_cast< OpenSMTContext * >( c ); OpenSMTContext & context = *c_; Snode * sort = context.mkSortInt( ); context.DeclareFun( s, sort ); Enode * res = context.mkVar( s, true ); res->setDomainLowerBound(lb); res->setDomainUpperBound(ub); res->setValueLowerBound(lb); res->setValueUpperBound(ub); return static_cast< void * >( res ); }