python: cleanup with autopep8
* tests/python/341.py, tests/python/alarm.py, tests/python/bdddict.py, tests/python/bddnqueen.py, tests/python/bugdet.py, tests/python/dualize.py, tests/python/except.py, tests/python/gen.py, tests/python/genem.py, tests/python/implies.py, tests/python/interdep.py, tests/python/ipnbdoctest.py, tests/python/kripke.py, tests/python/ltl2tgba.py, tests/python/ltlf.py, tests/python/ltlparse.py, tests/python/ltlsimple.py, tests/python/relabel.py, tests/python/rs_like.py, tests/python/sccsplit.py, tests/python/semidet.py, tests/python/setacc.py, tests/python/setxor.py, tests/python/split.py, tests/python/streett_totgba.py, tests/python/stutter.py, tests/python/sum.py, tests/python/toparity.py, tests/python/toweak.py, tests/python/trival.py, python/spot/__init__.py, python/spot/aux.py, python/spot/jupyter.py: Reformat with autopep8. fixup! * spot/tl/simplify.cc: Fix typos in tracing code.
This commit is contained in:
parent
5b01ce32dd
commit
822fe77891
33 changed files with 444 additions and 356 deletions
|
|
@ -19,10 +19,14 @@
|
|||
|
||||
import spot
|
||||
|
||||
def incl(a,b):
|
||||
|
||||
def incl(a, b):
|
||||
return not b.intersects(spot.dualize(spot.tgba_determinize(a)))
|
||||
def equiv(a,b):
|
||||
return incl(a,b) and incl(b,a)
|
||||
|
||||
|
||||
def equiv(a, b):
|
||||
return incl(a, b) and incl(b, a)
|
||||
|
||||
|
||||
def do_split(f, in_list):
|
||||
aut = spot.translate(f)
|
||||
|
|
@ -30,7 +34,8 @@ def do_split(f, in_list):
|
|||
for a in in_list:
|
||||
inputs &= spot.buddy.bdd_ithvar(aut.get_dict().varnum(spot.formula(a)))
|
||||
s = spot.split_2step(aut, inputs)
|
||||
return aut,s
|
||||
return aut, s
|
||||
|
||||
|
||||
aut, s = do_split('(FG !a) <-> (GF b)', ['a'])
|
||||
assert equiv(aut, spot.unsplit_2step(s))
|
||||
|
|
@ -58,46 +63,45 @@ State: 2
|
|||
--END--"""
|
||||
|
||||
aut, s = do_split('! ((G (req -> (F ack))) && (G (go -> (F grant))))', ['go',
|
||||
'req'])
|
||||
'req'])
|
||||
assert equiv(aut, spot.unsplit_2step(s))
|
||||
# FIXME s.to_str() is NOT the same on Debian stable and on Debian unstable
|
||||
# we should investigate this
|
||||
#assert s.to_str() == """HOA: v1
|
||||
#States: 9
|
||||
#Start: 0
|
||||
#AP: 4 "ack" "req" "go" "grant"
|
||||
#acc-name: Buchi
|
||||
#Acceptance: 1 Inf(0)
|
||||
#properties: trans-labels explicit-labels state-acc
|
||||
#--BODY--
|
||||
#State: 0
|
||||
#[1&!2] 3
|
||||
#[!1&!2] 4
|
||||
#[1&2] 5
|
||||
#[!1&2] 6
|
||||
#State: 1
|
||||
#[t] 7
|
||||
#State: 2
|
||||
#[t] 8
|
||||
#State: 3
|
||||
#[t] 0
|
||||
#[!0] 1
|
||||
#State: 4
|
||||
#[t] 0
|
||||
#State: 5
|
||||
#[t] 0
|
||||
#[!0] 1
|
||||
#[!3] 2
|
||||
#State: 6
|
||||
#[t] 0
|
||||
#[!3] 2
|
||||
#State: 7 {0}
|
||||
#[!0] 1
|
||||
#State: 8 {0}
|
||||
#[!3] 2
|
||||
#--END--"""
|
||||
# assert s.to_str() == """HOA: v1
|
||||
# States: 9
|
||||
# Start: 0
|
||||
# AP: 4 "ack" "req" "go" "grant"
|
||||
# acc-name: Buchi
|
||||
# Acceptance: 1 Inf(0)
|
||||
# properties: trans-labels explicit-labels state-acc
|
||||
# --BODY--
|
||||
# State: 0
|
||||
# [1&!2] 3
|
||||
# [!1&!2] 4
|
||||
# [1&2] 5
|
||||
# [!1&2] 6
|
||||
# State: 1
|
||||
# [t] 7
|
||||
# State: 2
|
||||
# [t] 8
|
||||
# State: 3
|
||||
# [t] 0
|
||||
# [!0] 1
|
||||
# State: 4
|
||||
# [t] 0
|
||||
# State: 5
|
||||
# [t] 0
|
||||
# [!0] 1
|
||||
# [!3] 2
|
||||
# State: 6
|
||||
# [t] 0
|
||||
# [!3] 2
|
||||
# State: 7 {0}
|
||||
# [!0] 1
|
||||
# State: 8 {0}
|
||||
# [!3] 2
|
||||
# --END--"""
|
||||
|
||||
aut, s = do_split('((G (((! g_0) || (! g_1)) && ((r_0 && (X r_1)) -> (F (g_0 \
|
||||
&& g_1))))) && (G (r_0 -> F g_0))) && (G (r_1 -> F g_1))', ['r_0', 'r_1'])
|
||||
assert equiv(aut, spot.unsplit_2step(s))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue