added var_names property

This commit is contained in:
Marcell Vazquez-Chanlatte 2017-11-26 20:01:54 -08:00
parent 034bc22955
commit 9098cff929
2 changed files with 13 additions and 1 deletions

View file

@ -45,3 +45,9 @@ def test_walk():
phi = stl.parse(
'((G[0, 1](x + y > a?)) & (F[1,2](z - x > 0))) | ((X(AP1)) U (AP2))')
assert len(list((~phi).walk())) == 11
def test_var_names():
phi = stl.parse(
'((G[0, 1](x + y > a?)) & (F[1,2](z - x > 0))) | ((X(AP1)) U (AP2))')
assert phi.var_names == {'x', 'y', 'z', 'x', 'AP1', 'AP2'}