added code to get scope of stl formula
This commit is contained in:
parent
e491ac7043
commit
2c34d9dc7a
2 changed files with 38 additions and 2 deletions
|
|
@ -85,3 +85,19 @@ def test_discretize():
|
|||
|
||||
phi = stl.parse('G[0.3, 1.2]((AP1) U (AP2))')
|
||||
assert not stl.utils.is_discretizable(phi, dt)
|
||||
|
||||
|
||||
def test_scope():
|
||||
dt = 0.3
|
||||
|
||||
phi = stl.parse('X(AP1)')
|
||||
assert stl.utils.scope(phi, dt) == 0.3
|
||||
|
||||
phi = stl.parse('G[0.3, 1.2](F[0.6, 1.5](AP1))')
|
||||
assert stl.utils.scope(phi, dt) == 1.2 + 1.5
|
||||
|
||||
phi = stl.parse('G[0.3, 1.2](F(AP1))')
|
||||
assert stl.utils.scope(phi, dt) == float('inf')
|
||||
|
||||
phi = stl.parse('G[0.3, 1.2]((AP1) U (AP2))')
|
||||
assert stl.utils.scope(phi, dt) == float('inf')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue