Exemple #1
0
 void operator()(app * t) {
     if (is_uninterp_const(t) &&  (m_util.is_int(t) || m_util.is_real(t))) {
         if (!m_bm.has_lower(t)) {
             m_goal.assert_expr(m_util.mk_le(t, m_util.mk_numeral(m_upper, m_util.is_int(t))));
             m_num_bounds++;
         }
         if (!m_bm.has_upper(t)) {
             m_goal.assert_expr(m_util.mk_ge(t, m_util.mk_numeral(m_lower, m_util.is_int(t))));
             m_num_bounds++;
         }
     }
 }
Exemple #2
0
    void operator()(app * n) {
        sort * s = get_sort(n);
        if (!m.is_bool(s) && !fu.is_float(s) && !fu.is_rm(s) && !bu.is_bv_sort(s) && !au.is_real(s))
            throw found();
        family_id fid = n->get_family_id();
        if (fid == m.get_basic_family_id())
            return;
        if (fid == fu.get_family_id() || fid == bu.get_family_id())
            return;
        if (is_uninterp_const(n))
            return;
        if (au.is_real(s) && au.is_numeral(n))
            return;

        throw found();
    }
Exemple #3
0
 void operator()(app * n) {
     family_id fid = n->get_family_id();
     if (fid == m.get_basic_family_id())
         return; 
     if (fid == u.get_family_id()) {
         switch (n->get_decl_kind()) {
         case OP_LE:  case OP_GE: case OP_LT: case OP_GT:
         case OP_ADD: case OP_UMINUS: case OP_SUB: case OP_ABS: 
         case OP_NUM: 
         case OP_IRRATIONAL_ALGEBRAIC_NUM:
             return;
         case OP_MUL:
             if (n->get_num_args() == 2 &&
                 u.is_real(n->get_arg(0)) && 
                 !u.is_numeral(n->get_arg(0)) &&
                 !u.is_numeral(n->get_arg(1))) {
                 m_has_nonlinear = true;
             }
             return;
         case OP_IDIV: case OP_DIV: case OP_REM: case OP_MOD:
             if (!u.is_numeral(n->get_arg(1)))
                 throw_found();
             return;
         case OP_POWER: 
             if (!u.is_numeral(n->get_arg(1)))
                 throw_found();
             m_has_nonlinear = true;
             return;
         case OP_IS_INT:
         case OP_TO_INT:
         case OP_TO_REAL:
             throw_found();
             return;
         default:
             throw_found();
         }
     } 
 }
Exemple #4
0
 void operator()(app * t) {
     if (is_uninterp_const(t) &&  (m_util.is_int(t) || m_util.is_real(t)) && (!m_bm.has_lower(t) || !m_bm.has_upper(t)))
         throw found();
 }