Beispiel #1
0
void dreal_set_domain_lb(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->setDomainLowerBound(n);
}
Beispiel #2
0
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);
}
Beispiel #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 );
}