示例#1
0
文件: dreal.C 项目: scungao/dreal3
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);
}
示例#2
0
文件: dreal.C 项目: scungao/dreal3
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);
}
示例#3
0
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 );
}