Beispiel #1
0
 def walk_bv_comp (self, formula, args, **kwargs):
     a,b = args
     eq = libyices.yices_bveq_atom(a, b)
     self._check_term_result(eq)
     one = libyices.yices_bvconst_int32(1, 1)
     zero = libyices.yices_bvconst_int32(1, 0)
     res = libyices.yices_ite(eq, one, zero)
     self._check_term_result(res)
     return res
Beispiel #2
0
 def walk_bv_comp (self, formula, args, **kwargs):
     a,b = args
     eq = libyices.yices_bveq_atom(a, b)
     self._check_term_result(eq)
     one = libyices.yices_bvconst_int32(1, 1)
     zero = libyices.yices_bvconst_int32(1, 0)
     res = libyices.yices_ite(eq, one, zero)
     self._check_term_result(res)
     return res
Beispiel #3
0
 def walk_equals(self, formula, args, **kwargs):
     tp = self._get_type(formula.arg(0))
     res = None
     if tp.is_bv_type():
         res = libyices.yices_bveq_atom(args[0], args[1])
     else:
         assert tp.is_int_type() or tp.is_real_type()
         res = libyices.yices_arith_eq_atom(args[0], args[1])
     self._check_term_result(res)
     return res
Beispiel #4
0
 def walk_equals(self, formula, args, **kwargs):
     tp = self._get_type(formula.arg(0))
     res = None
     if tp.is_bv_type():
         res = libyices.yices_bveq_atom(args[0], args[1])
     else:
         assert tp.is_int_type() or tp.is_real_type()
         res = libyices.yices_arith_eq_atom(args[0], args[1])
     self._check_term_result(res)
     return res