def tro(self): from release import RELEASE return [RELEASE(self.operand1, self.operand2, self.lower_bound, self.upper_bound)] \ + [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.tro() if not y == self.operand2] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.tro() if not y == self.operand1]
def nextnormalform(self, ininterval=0): from _or import OR from _and import AND from next import NEXT if self.lower_bound == 0 and self.upper_bound == 0: return self.operand2.nextnormalform(ininterval) elif (self.lower_bound == 0 and (not self.upper_bound == 0) and ininterval % 2 == 0): return OR(self.operand2.nextnormalform(ininterval), AND(self.operand1.nextnormalform(ininterval), AND( NEXT(self.operand1.nextnormalform(ininterval + 1), 0.5), OR(NEXT(self.operand2.nextnormalform(ininterval + 1), 0.5), NEXT(UNTIL(self.operand1, self.operand2, 0, self.upper_bound - 1).nextnormalform(ininterval), 1))))) elif (self.lower_bound == 0 and (not self.upper_bound == 0) and ininterval % 2 == 1): return OR(self.operand2.nextnormalform(ininterval), AND(self.operand1.nextnormalform(ininterval), OR( NEXT(self.operand2.nextnormalform(ininterval + 1), 0.5), AND(NEXT(self.operand1.nextnormalform(ininterval + 1), 0.5), AND(NEXT(self.operand1.nextnormalform(ininterval), 1), NEXT(UNTIL(self.operand1, self.operand2, 0, self.upper_bound - 1).nextnormalform(ininterval), 1)))))) elif ((not self.lower_bound == 0) and (not self.upper_bound == 0) and ininterval % 2 == 0): return AND(self.operand1.nextnormalform(ininterval), AND(NEXT(self.operand1.nextnormalform(ininterval + 1), 0.5), NEXT( UNTIL(self.operand1, self.operand2, self.lower_bound - 1, self.upper_bound - 1).nextnormalform(ininterval), 1))) elif ((not self.lower_bound == 0) and (not self.upper_bound == 0) and ininterval % 2 == 1): return AND(self.operand1.nextnormalform(ininterval), AND(NEXT(self.operand1.nextnormalform(ininterval + 1), 0.5), AND(NEXT(self.operand1.nextnormalform(ininterval), 1), NEXT( UNTIL(self.operand1, self.operand2, self.lower_bound - 1, self.upper_bound - 1).nextnormalform(ininterval), 1))))
def ufc_minus(self): from until import UNTIL from _and import AND from _not import NOT return [UNTIL(AND(self.operand1, NOT(self.operand2)), AND(y, NOT(self.operand2)), self.lower_bound, self.upper_bound) for y in self.operand1.ufc_minus()] \ + [UNTIL(AND(self.operand1, NOT(self.operand2)), AND(y, NOT(UNTIL(self.operand1, self.operand2, self.lower_bound, self.upper_bound))), self.lower_bound, self.upper_bound) for y in self.operand2.ufc_minus()]
def picc(self): from _and import AND from _not import NOT from _or import OR return [UNTIL(AND(self.operand1, NOT(self.operand2)), AND(y, OR(self.operand2, UNTIL(self.operand1, self.operand2, self.lower_bound, self.upper_bound))), self.lower_bound, self.upper_bound) for y in self.operand1.picc()] \ + [UNTIL(AND(self.operand1, NOT(self.operand2)), AND(y, OR(self.operand2, UNTIL(self.operand1, self.operand2, self.lower_bound, self.upper_bound))), self.lower_bound, self.upper_bound) for y in self.operand2.picc()]
def tro(self): from until import UNTIL return [UNTIL(self.operand1, self.operand2, self.lower_bound, self.upper_bound)] \ + [RELEASE(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.tro() if not y == self.operand2] \ + [RELEASE(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.tro() if not y == self.operand1]
def ufc_plus(self): from until import UNTIL from _not import NOT return [ UNTIL(NOT(self.operand1), y, self.lower_bound, self.upper_bound) for y in self.operand1.ufc_plus() ]
def aso(self): from release import RELEASE from _and import AND from _or import OR from implies import IMPLIES from _finally import FINALLY from globally import GLOBALLY from next import NEXT result = list() if isinstance(self.operand1, (UNTIL, RELEASE)): result += [self.operand1.__class__(self.operand1.operand1, UNTIL(self.operand1.operand2, self.operand2, self.lower_bound, self.upper_bound), self.operand1.lower_bound, self.operand1.upper_bound)] if isinstance(self.operand2, (UNTIL, RELEASE)): result += [self.operand2.__class__(UNTIL(self.operand1, self.operand2.operand1, self.lower_bound, self.upper_bound), self.operand2.operand2, self.operand2.lower_bound, self.operand2.upper_bound)] if isinstance(self.operand1, (AND, OR, IMPLIES)): result += [self.operand1.__class__(self.operand1.operand1, UNTIL(self.operand1.operand2, self.operand2, self.lower_bound, self.upper_bound))] if isinstance(self.operand2, (AND, OR, IMPLIES)): result += [self.operand2.__class__(UNTIL(self.operand1, self.operand2.operand1, self.lower_bound, self.upper_bound), self.operand2.operand2)] if isinstance(self.operand1, (FINALLY, GLOBALLY)): result += [self.operand1.__class__(UNTIL(self.operand1.operand1, self.operand2, self.lower_bound, self.upper_bound), self.operand1.lower_bound, self.operand1.upper_bound)] if isinstance(self.operand2, (FINALLY, GLOBALLY)): result += [self.operand2.__class__(UNTIL(self.operand1, self.operand2.operand1, self.lower_bound, self.upper_bound), self.operand2.lower_bound, self.operand2.upper_bound)] if isinstance(self.operand1, NEXT): result += [NEXT(UNTIL(self.operand1.operand1, self.operand2, self.lower_bound, self.upper_bound), self.operand1.lower_bound)] if isinstance(self.operand2, NEXT): result += [NEXT(UNTIL(self.operand1, self.operand2.operand1, self.lower_bound, self.upper_bound), self.operand2.lower_bound)] return result + [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.aso() if not y == self.operand2] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.aso() if not y == self.operand1]
def io(self): return [UNTIL(self.operand1, self.operand2, self.lower_bound + 1, self.upper_bound), UNTIL(self.operand1, self.operand2, self.lower_bound, self.upper_bound + 1), UNTIL(self.operand1, self.operand2, self.lower_bound, self.upper_bound - 1)] \ + [UNTIL(self.operand1, self.operand2, self.lower_bound - 1, self.upper_bound) for fake_iterator in [1] if not self.lower_bound == 0] \ + [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.io()] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.io()]
def ufc_minus(self): from until import UNTIL from _not import NOT from _and import AND from globally import GLOBALLY return [ UNTIL( NOT(self.operand1), AND( y, GLOBALLY(NOT(self.operand1), self.lower_bound, self.upper_bound)), self.lower_bound, self.upper_bound) for y in self.operand1.ufc_minus() ]
def picc(self): from until import UNTIL from _not import NOT from _and import AND from _or import OR return [ UNTIL( NOT(self.operand1), AND( y, OR( self.operand1, FINALLY(self.operand1, self.lower_bound, self.upper_bound))), self.lower_bound, self.upper_bound) for y in self.operand1.picc() ]
def adjust(self, c): """ Adjusts formula to a given step width c by dividing all interval bounds by c. """ return UNTIL(self.operand1.adjust(c), self.operand2.adjust(c), self.lower_bound / float(c), self.upper_bound / float(c))
def rro(self): return [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.rro() if not y == self.operand2] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.rro() if not y == self.operand1]
def expand(self): from _not import NOT from until import UNTIL from ap import ap_true return NOT(UNTIL(ap_true, NOT(self.operand1.expand()), self.lower_bound, self.upper_bound))
def picc(self): from until import UNTIL from _and import AND return [UNTIL(self.operand1, AND(y, GLOBALLY(self.operand1, self.lower_bound, self.upper_bound)), self.lower_bound, self.upper_bound) for y in self.operand1.picc()]
def ufc_minus(self): from until import UNTIL return [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand1.ufc_minus()]
def expand(self): from _not import NOT from until import UNTIL return NOT( UNTIL(NOT(self.operand1.expand()), NOT(self.operand2.expand()), self.lower_bound, self.upper_bound))
def picc(self): from _not import NOT from until import UNTIL return NOT( UNTIL(NOT(self.operand1), NOT(self.operand2), self.lower_bound, self.upper_bound)).picc()
def ufc_minus(self): from _not import NOT from until import UNTIL return NOT( UNTIL(NOT(self.operand1), NOT(self.operand2), self.lower_bound, self.upper_bound)).ufc_minus()
def mco(self): return [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.mco()] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.mco()]
def oro(self, atomic_props): return [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.oro(atomic_props) if not y == self.operand2] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.oro(atomic_props) if not y == self.operand1]
def sto(self, onezero): return [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.sto(onezero) if not y == self.operand2] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.sto(onezero) if not y == self.operand1]
def expand(self): return UNTIL(self.operand1.expand(), self.operand2.expand(), self.lower_bound, self.upper_bound)
def expand(self): from until import UNTIL from ap import ap_true return UNTIL(ap_true, self.operand1.expand(), self.lower_bound, self.upper_bound)
def tio(self, lower_bound=None, upper_bound=None): return [UNTIL(y, self.operand2, self.lower_bound, self.upper_bound) for y in self.operand1.tio(lower_bound, upper_bound) if not y == self.operand2] \ + [UNTIL(self.operand1, y, self.lower_bound, self.upper_bound) for y in self.operand2.tio(lower_bound, upper_bound) if not y == self.operand1]