add rshift (>>) : SLT x Int -> STL as next(self, i)
This commit is contained in:
parent
8f4e511326
commit
5b7fea3953
2 changed files with 11 additions and 3 deletions
10
stl/ast.py
10
stl/ast.py
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue