hoa: swallow the neverclaim parser
This way we can easily parse a stream of HOAs intermixed with neverclaims. * src/hoaparse/hoaparse.yy, src/hoaparse/hoascan.ll: Add rules for neverclaims, adjusted from src/neverparse/neverclaimparse.yy and src/neverparse/neverclaimparse.ll. * src/hoaparse/public.hh, NEWS: Update documentation. * src/neverparse/: Remove this directory. * README, configure.ac, src/Makefile.am: Adjust accordingly. * src/tgbatest/ltl2tgba.cc, src/bin/ltlcross.cc: Use HOA parser to read neverclaims. * src/tgbatest/hoaparse.test, src/tgbatest/neverclaimread.test: Adjust.
This commit is contained in:
parent
39eefd0c6e
commit
e1bba50047
18 changed files with 453 additions and 817 deletions
|
|
@ -480,6 +480,7 @@ EOF
|
|||
diff expected input.out
|
||||
|
||||
|
||||
# Mix HOA with neverclaims
|
||||
cat >input <<EOF
|
||||
HOA: v1
|
||||
States: 2
|
||||
|
|
@ -496,6 +497,22 @@ State: 1
|
|||
[!0] 1
|
||||
[0] 0
|
||||
--END--
|
||||
|
||||
never { /* a U b */
|
||||
T0_init:
|
||||
if
|
||||
:: ((b)) -> goto accept_all
|
||||
:: ((a)) -> goto T0_init
|
||||
fi;
|
||||
accept_all:
|
||||
skip
|
||||
}
|
||||
|
||||
|
||||
never {
|
||||
start: if :: false -> goto T0 fi;
|
||||
T0: false
|
||||
}
|
||||
EOF
|
||||
|
||||
expectok input <<EOF
|
||||
|
|
@ -519,6 +536,32 @@ State: 2 {0}
|
|||
[1] 1
|
||||
[!1] 2
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 2
|
||||
Start: 0
|
||||
AP: 2 "b" "a"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 1
|
||||
[1] 0
|
||||
State: 1 {0}
|
||||
[t] 1
|
||||
--END--
|
||||
HOA: v1
|
||||
States: 2
|
||||
Start: 0
|
||||
AP: 0
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
--BODY--
|
||||
State: 0
|
||||
[f] 1
|
||||
State: 1
|
||||
--END--
|
||||
EOF
|
||||
|
||||
cat >input <<EOF
|
||||
|
|
@ -665,17 +708,17 @@ this is complete garbage!
|
|||
and even more garbage
|
||||
EOF
|
||||
|
||||
se='syntax error, unexpected' # this is just to keep lines short
|
||||
expecterr input <<EOF
|
||||
input:8.11: syntax error, unexpected identifier, expecting integer or '}'
|
||||
input:8.11: $se identifier, expecting integer or '}'
|
||||
input:8.10-12: ignoring this invalid acceptance set
|
||||
input:11.2: syntax error, unexpected identifier
|
||||
input:11.2: $se identifier
|
||||
input:11.1-3: ignoring this invalid label
|
||||
input:21.5-7: syntax error, unexpected string, expecting integer
|
||||
input:25.1-4: syntax error, unexpected identifier, expecting end of file or HOA:
|
||||
input:21.5-7: $se string, expecting integer
|
||||
input:25.1: $se \$undefined, expecting end of file or HOA: or never
|
||||
input:25.1-12: ignoring leading garbage
|
||||
input:32.1-5: syntax error, unexpected header name, expecting --END-- or State:
|
||||
input:37.1-4: syntax error, unexpected identifier, expecting end of file or HOA:
|
||||
input:39.1-3: syntax error, unexpected identifier, expecting end of file or HOA:
|
||||
input:32.1-5: $se header name, expecting --END-- or State:
|
||||
input:37.1: $se 't', expecting end of file or HOA: or never
|
||||
EOF
|
||||
|
||||
# A comment can contain --BODY-- or --END--, so we do not want to be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue