step towards actually testing boolean evaluation on random formulas
This commit is contained in:
parent
7d8cf78222
commit
75042d0dc4
5 changed files with 17 additions and 20 deletions
|
|
@ -5,10 +5,12 @@ import stl
|
|||
|
||||
GRAMMAR = {
|
||||
'phi': (('Unary', '(', 'phi', ')'), ('(', 'phi', ')', 'Binary', '(', 'phi',
|
||||
')'), ('AP', )),
|
||||
'Unary': (('~', ), ('G', ), ('F', ), ('X', )),
|
||||
'Binary': ((' | ', ), (' & ', ), (' U ', )),
|
||||
')'), ('AP', ), ('LINEQ', )),
|
||||
'Unary': (('~', ), ('G', 'Interval'), ('F', 'Interval'), ('X', )),
|
||||
'Interval': (('',), ('[1, 3]',)),
|
||||
'Binary': ((' | ', ), (' & ', ), (' U ',)),
|
||||
'AP': (('AP1', ), ('AP2', ), ('AP3', ), ('AP4', ), ('AP5', )),
|
||||
'LINEQ': (('x > 4', ), ('y < 2', ), ('y >= 3', ), ('x + y >= 2',)),
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -19,5 +21,5 @@ def to_stl(term):
|
|||
SignalTemporalLogicStrategy = st.builds(to_stl,
|
||||
ContextFreeGrammarStrategy(
|
||||
GRAMMAR,
|
||||
max_length=25,
|
||||
max_length=27,
|
||||
start='phi'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue