hoaparse: catch non-Boolean guard in LBTT format
Fixes #90. * src/hoaparse/hoaparse.yy: Here. * src/tests/hoaparse.test: Test it.
This commit is contained in:
parent
7f8aad05e8
commit
da5ba0b138
2 changed files with 23 additions and 2 deletions
|
|
@ -1415,8 +1415,17 @@ lbtt-guard: STRING
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res.cur_label =
|
if (!f->is_boolean())
|
||||||
formula_to_bdd(f, res.h->aut->get_dict(), res.h->aut);
|
{
|
||||||
|
error(@$,
|
||||||
|
"non-Boolean transition label (replaced by true)");
|
||||||
|
res.cur_label = bddtrue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
res.cur_label =
|
||||||
|
formula_to_bdd(f, res.h->aut->get_dict(), res.h->aut);
|
||||||
|
}
|
||||||
f->destroy();
|
f->destroy();
|
||||||
}
|
}
|
||||||
delete $1;
|
delete $1;
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,17 @@ State: 1 {0}
|
||||||
1 0
|
1 0
|
||||||
2 0 -1 t
|
2 0 -1 t
|
||||||
-1
|
-1
|
||||||
|
/* Another automaton. Here we make sure that guard must
|
||||||
|
be Boolean, even though we the LBT parser we use
|
||||||
|
would accept LTL. */
|
||||||
|
2 1t
|
||||||
|
0 1
|
||||||
|
1 -1 G "b"
|
||||||
|
0 -1 & "a" ! "b"
|
||||||
|
-1
|
||||||
|
1 0
|
||||||
|
0 0 -1 t
|
||||||
|
-1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
diff='different state numbers have been used'
|
diff='different state numbers have been used'
|
||||||
|
|
@ -97,6 +108,7 @@ input:2.1-9: ... declared here.
|
||||||
input:10.5: state number is larger than state count...
|
input:10.5: state number is larger than state count...
|
||||||
input:2.1-9: ... declared here.
|
input:2.1-9: ... declared here.
|
||||||
input:12.1-19.2: 2 states have been declared, but 3 $diff
|
input:12.1-19.2: 2 states have been declared, but 3 $diff
|
||||||
|
input:25.5-10: non-Boolean transition label (replaced by true)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat >input <<EOF
|
cat >input <<EOF
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue