Exemplo n.º 1
0
 def push(self, levels=1):
     for _ in xrange(levels):
         c = yicespy.yices_push(self.yices)
         if c != 0:
             # 4 is STATUS_UNSAT
             if yicespy.yices_context_status(self.yices) == 4:
                 # Yices fails to push if the context is in UNSAT state
                 # (It makes no sense to conjoin formulae to False)
                 # PySMT allows this and we support it by counting the
                 # spurious push calls
                 self.failed_pushes += 1
             else:
                 raise InternalSolverError("Error in push: %s" % \
                                           yicespy.yices_error_string())
Exemplo n.º 2
0
 def push(self, levels=1):
     for _ in xrange(levels):
         c = yicespy.yices_push(self.yices)
         if c != 0:
             # 4 is STATUS_UNSAT
             if yicespy.yices_context_status(self.yices) == 4:
                 # Yices fails to push if the context is in UNSAT state
                 # (It makes no sense to conjoin formulae to False)
                 # PySMT allows this and we support it by counting the
                 # spurious push calls
                 self.failed_pushes += 1
             else:
                 raise InternalSolverError("Error in push: %s" % \
                                           yicespy.yices_error_string())