parseaut: Add a trust_hoa option.
Fixes #114. * src/parseaut/public.hh: Add support for a trust_hoa option. * src/parseaut/parseaut.yy: If trust_hoa is set, recognize the "inherently-weak" and "stutter-invariant" properties. * src/bin/common_conv.cc, src/bin/common_conv.hh (read_automaton): Move... * src/bin/common_hoaread.cc, src/bin/common_hoaread.hh: ... in this new file, that also handle the --trust-hoa option. * src/bin/Makefile.am: Add them. * src/bin/autfilt.cc, src/bin/dstar2tgba.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc: Use them. * src/tests/parseaut.test, src/tests/ltldo.test: Adjust, and test --trust-hoa=no. * src/tests/complement.test, src/tests/prodor.test, src/tests/sbacc.test: Adjust. * wrap/python/spot.py (automata): Add option trust_hoa. * NEWS: Update.
This commit is contained in:
parent
585e29e7d8
commit
51a75a316d
18 changed files with 221 additions and 38 deletions
|
|
@ -63,7 +63,7 @@ AP: 2 "a" "b"
|
|||
acc-name: generalized-co-Buchi 2
|
||||
Acceptance: 2 Fin(0)|Fin(1)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
properties: deterministic stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
[0&1] 0 {0 1}
|
||||
|
|
@ -78,7 +78,7 @@ AP: 1 "a"
|
|||
acc-name: co-Buchi
|
||||
Acceptance: 1 Fin(0)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
properties: deterministic inherently-weak
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 2
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ AP: 1 "_foo_"
|
|||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
properties: deterministic stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 0 {0}
|
||||
|
|
@ -97,6 +97,27 @@ AP: 1 "_foo_"
|
|||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 0 {0}
|
||||
[!0] 0
|
||||
--END--
|
||||
EOF
|
||||
diff output expected
|
||||
|
||||
# Not trusting properties
|
||||
run 0 $ltldo "$ltl2tgba -H %s>%H" -f GF_foo_ -H --trust-hoa=no >output
|
||||
cat output
|
||||
cat >expected <<EOF
|
||||
HOA: v1
|
||||
name: "GFp0"
|
||||
States: 1
|
||||
Start: 0
|
||||
AP: 1 "_foo_"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
|
|
|
|||
|
|
@ -1658,11 +1658,15 @@ EOF
|
|||
|
||||
# Implicit labels
|
||||
|
||||
../../bin/ltl2tgba -H 'GFa & GFb & (c U d)' > out.hoa
|
||||
../../bin/ltl2tgba -C -Hi 'GFa & GFb & (c U d)' |
|
||||
sed 's/ stutter-invariant//;/properties:$/d' > out-i.hoa
|
||||
../../bin/autfilt -C -Hi out.hoa --name=%M > out-i2.hoa
|
||||
diff out-i.hoa out-i2.hoa
|
||||
../../bin/ltl2tgba -H 'GFa & GFb & (c U d)' >out.hoa
|
||||
../../bin/ltl2tgba -C -Hi 'GFa & GFb & (c U d)' >out-i.hoa
|
||||
../../bin/autfilt -C -Hi out.hoa --name=%M >out-i2.hoa
|
||||
diff -u out-i.hoa out-i2.hoa
|
||||
sed 's/ stutter-invariant//;/properties:$/d' <out-i.hoa >out-i3.hoa
|
||||
../../bin/autfilt --trust-hoa=no -C -Hi out.hoa --name=%M >out-i2.hoa
|
||||
diff -u out-i3.hoa out-i2.hoa
|
||||
|
||||
|
||||
|
||||
cat >expected <<EOF
|
||||
HOA: v1
|
||||
|
|
@ -1673,6 +1677,7 @@ AP: 4 "c" "d" "a" "b"
|
|||
acc-name: generalized-Buchi 2
|
||||
Acceptance: 2 Inf(0)&Inf(1)
|
||||
properties: implicit-labels trans-acc complete deterministic
|
||||
properties: stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
0
|
||||
|
|
@ -1738,6 +1743,7 @@ AP: 4 "c" "d" "a" "b"
|
|||
acc-name: generalized-Buchi 2
|
||||
Acceptance: 2 Inf(0)&Inf(1)
|
||||
properties: implicit-labels state-acc complete deterministic
|
||||
properties: stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
1 0 2 2 1 0 2 2 1 0 2 2 1 0 2 2
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ Start: 0
|
|||
AP: 2 "a" "b"
|
||||
Acceptance: 2 Inf(0) | Inf(1)
|
||||
properties: trans-labels explicit-labels trans-acc complete
|
||||
properties: stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
[0&1] 1 {1}
|
||||
|
|
@ -66,7 +67,7 @@ Start: 0
|
|||
AP: 2 "a" "b"
|
||||
acc-name: generalized-Buchi 2
|
||||
Acceptance: 2 Inf(0)&Inf(1)
|
||||
properties: trans-labels explicit-labels trans-acc
|
||||
properties: trans-labels explicit-labels trans-acc stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
[0&1] 1 {1}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ AP: 2 "a" "b"
|
|||
acc-name: generalized-Buchi 2
|
||||
Acceptance: 2 Inf(0)&Inf(1)
|
||||
properties: trans-labels explicit-labels state-acc complete
|
||||
properties: deterministic
|
||||
properties: deterministic stutter-invariant
|
||||
--BODY--
|
||||
State: 0 {0 1}
|
||||
[0&1] 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue