Example #1
0
 def push(self, levels=1):
     for _ in xrange(levels):
         c = libyices.yices_push(self.yices)
         if c != 0:
             # 4 is STATUS_UNSAT
             if libyices.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" % \
                                           libyices.yices_error_string())
Example #2
0
 def push(self, levels=1):
     for _ in xrange(levels):
         c = libyices.yices_push(self.yices)
         assert c == 0
Example #3
0
 def push(self, levels=1):
     for _ in xrange(levels):
         c = libyices.yices_push(self.yices)
         assert c == 0