コード例 #1
0
ファイル: yices.py プロジェクト: SE-Researcher/ASE2018
 def walk_bv_constant(self, formula, **kwargs):
     width = formula.bv_width()
     res = None
     if width <= 64:
         # we can use the numberical representation
         value = formula.constant_value()
         res = yicespy.yices_bvconst_uint64(width, value)
     else:
         # we must resort to strings to communicate the result to yices
         res = yicespy.yices_parse_bvbin(formula.bv_bin_str())
     self._check_term_result(res)
     return res
コード例 #2
0
ファイル: yices.py プロジェクト: 0Chuzz/pysmt
 def walk_bv_constant(self, formula, **kwargs):
     width = formula.bv_width()
     res = None
     if width <= 64:
         # we can use the numberical representation
         value = formula.constant_value()
         res = yicespy.yices_bvconst_uint64(width, value)
     else:
         # we must resort to strings to communicate the result to yices
         res = yicespy.yices_parse_bvbin(formula.bv_bin_str())
     self._check_term_result(res)
     return res
コード例 #3
0
 def walk_bv_constant(self, formula, **kwargs):
     width = formula.bv_width()
     res = None
     value = formula.constant_value()
     if value <= ((2**63) - 1):
         # we can use the numerical representation
         # Note: yicespy uses *signed* longs in the API, so the maximal
         # representable number is 2^63 - 1
         res = yicespy.yices_bvconst_uint64(width, value)
     else:
         # we must resort to strings to communicate the result to yices
         res = yicespy.yices_parse_bvbin(formula.bv_bin_str())
     self._check_term_result(res)
     return res