continue refactoring to optimize for mtl

This commit is contained in:
Marcell Vazquez-Chanlatte 2018-09-06 11:09:01 -07:00
parent 5fd66cfd2c
commit 98824c9ba1
21 changed files with 393 additions and 467 deletions

View file

@ -1,20 +0,0 @@
import stl
from stl.hypothesis import SignalTemporalLogicStrategy
import hypothesis.strategies as st
from hypothesis import given
@given(st.integers(), st.integers(), st.integers())
def test_params1(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})
assert phi2.params == set()
assert phi2 == stl.parse(f'G[{a}, {b}](x)')
@given(SignalTemporalLogicStrategy)
def test_hash_stable(phi):
assert hash(phi) == hash(stl.parse(str(phi)))