add rshift (>>) : SLT x Int -> STL as next(self, i)

This commit is contained in:
Marcell Vazquez-Chanlatte 2017-12-07 19:00:07 -08:00
parent 8f4e511326
commit 5b7fea3953
2 changed files with 11 additions and 3 deletions

View file

@ -37,6 +37,16 @@ class AST(object):
return self.arg return self.arg
return Neg(self) return Neg(self)
def __rshift__(self, t):
if self in (BOT, TOP):
return self
phi = self
for _ in range(t):
phi = Next(phi)
return phi
@property @property
def children(self): def children(self):
return tuple() return tuple()

View file

@ -207,9 +207,7 @@ def iff(x, y):
def next(phi, i=1): def next(phi, i=1):
for _ in range(i): return phi >> i
phi = Next(phi)
return phi
def timed_until(phi, psi, lo, hi): def timed_until(phi, psi, lo, hi):