示例#1
0
 def add_assertion(self, formula, named=None):
     self._assert_is_boolean(formula)
     term = self.converter.convert(formula)
     code = yicespy.yices_assert_formula(self.yices, term)
     if code != 0:
         msg = yicespy.yices_error_string()
         if code == -1 and "non-linear arithmetic" in msg:
             raise NonLinearError(formula)
         raise InternalSolverError("Yices returned non-zero code upon assert"\
                                   ": %s (code: %s)" % \
                                   (msg, code))
示例#2
0
文件: yices.py 项目: 0Chuzz/pysmt
 def add_assertion(self, formula, named=None):
     self._assert_is_boolean(formula)
     term = self.converter.convert(formula)
     code = yicespy.yices_assert_formula(self.yices, term)
     if code != 0:
         msg = yicespy.yices_error_string()
         if code == -1 and "non-linear arithmetic" in msg:
             raise NonLinearError(formula)
         raise InternalSolverError("Yices returned non-zero code upon assert"\
                                   ": %s (code: %s)" % \
                                   (msg, code))