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
|
|
@ -1413,10 +1413,19 @@ lbtt-guard: STRING
|
|||
{
|
||||
res.cur_label = bddtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!f->is_boolean())
|
||||
{
|
||||
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();
|
||||
}
|
||||
delete $1;
|
||||
|
|
|
|||
|
|
@ -86,6 +86,17 @@ State: 1 {0}
|
|||
1 0
|
||||
2 0 -1 t
|
||||
-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
|
||||
|
||||
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:2.1-9: ... declared here.
|
||||
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
|
||||
|
||||
cat >input <<EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue