simplify parser + start removing lineq code
This commit is contained in:
parent
7798fe679e
commit
b9b10ac835
11 changed files with 143 additions and 247 deletions
|
|
@ -7,12 +7,12 @@ from hypothesis import given
|
|||
|
||||
@given(st.integers(), st.integers(), st.integers())
|
||||
def test_params1(a, b, c):
|
||||
phi = stl.parse('G[a?, b?](x > c?)')
|
||||
assert {x.name for x in phi.params} == {'a?', 'b?', 'c?'}
|
||||
phi = stl.parse('G[a, b] x')
|
||||
assert {x.name for x in phi.params} == {'a', 'b'}
|
||||
|
||||
phi2 = phi.set_params({'a?': a, 'b?': b, 'c?': c})
|
||||
phi2 = phi.set_params({'a': a, 'b': b})
|
||||
assert phi2.params == set()
|
||||
assert phi2 == stl.parse(f'G[{a}, {b}](x > {c})')
|
||||
assert phi2 == stl.parse(f'G[{a}, {b}](x)')
|
||||
|
||||
|
||||
@given(SignalTemporalLogicStrategy)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue