In [1]:
Copied!
from pyspect.logics import *
from pyspect.tlt import TLT, ContLTL
from pyspect.set_builder import AlignedBoxSet, Union, HalfSpaceSet
from pyspect.impls.hj_reachability import TVHJImpl
# Choose fragment
TLT.select(ContLTL)
# Write spec: avoid D, stay in corridor, reach goal
phi = UNTIL(AND(NOT('D'), 'corridor'), 'goal')
# Bind propositions later
tlt = TLT(phi, where={
'D': Union(AlignedBoxSet(...), AlignedBoxSet(...)),
'corridor': AlignedBoxSet(...),
'goal': HalfSpaceSet(...),
})
# Realize on a backend
impl = TVHJImpl(...)
Phi = tlt.realize(impl)
print("Satisfaction set:", Phi)
from pyspect.logics import *
from pyspect.tlt import TLT, ContLTL
from pyspect.set_builder import AlignedBoxSet, Union, HalfSpaceSet
from pyspect.impls.hj_reachability import TVHJImpl
# Choose fragment
TLT.select(ContLTL)
# Write spec: avoid D, stay in corridor, reach goal
phi = UNTIL(AND(NOT('D'), 'corridor'), 'goal')
# Bind propositions later
tlt = TLT(phi, where={
'D': Union(AlignedBoxSet(...), AlignedBoxSet(...)),
'corridor': AlignedBoxSet(...),
'goal': HalfSpaceSet(...),
})
# Realize on a backend
impl = TVHJImpl(...)
Phi = tlt.realize(impl)
print("Satisfaction set:", Phi)
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 2 1 from pyspect.logics import * ----> 2 from pyspect.tlt import TLT, ContLTL 3 from pyspect.set_builder import AlignedBoxSet, Union, HalfSpaceSet 4 from pyspect.impls.hj_reachability import TVHJImpl 5 ImportError: cannot import name 'ContLTL' from 'pyspect.tlt' (/home/runner/work/pyspect/pyspect/src/pyspect/tlt.py)
3. Next Steps¶
- Set Builders Guide — step-by-step tutorial with figures (start here before temporal logic)
- Set Builders reference — full API