sbacc: fix sbacc producing complete automata marked as incomplete
Fixes #312, reported by František Blahoudek. * spot/twaalgos/sbacc.cc: Detect the case were this can happen, and fix it. * tests/core/sbacc.test: New test case. * NEWS: Mention the bug.
This commit is contained in:
parent
396024143c
commit
18e65f3bc8
3 changed files with 29 additions and 0 deletions
4
NEWS
4
NEWS
|
|
@ -6,6 +6,10 @@ New in spot 2.4.3.dev (not yet released)
|
|||
Fin-less & CNF version of the acceptance condition had several
|
||||
unit clauses.
|
||||
|
||||
- If the automaton passed to sbacc() was incomplete because of some
|
||||
unreachable states, then it was possible that the output would
|
||||
marked incomplete while it was in fact complete.
|
||||
|
||||
New in spot 2.4.3 (2017-12-19)
|
||||
|
||||
Bugs fixed:
|
||||
|
|
|
|||
|
|
@ -168,6 +168,17 @@ namespace spot
|
|||
}
|
||||
}
|
||||
res->merge_edges();
|
||||
|
||||
// If the automaton was marked as not complete, and we have
|
||||
// ignored some unreachable state, then it is possible that the
|
||||
// result becomes complete.
|
||||
if (res->prop_complete().is_false())
|
||||
for (unsigned i = 0; i < ns; ++i)
|
||||
if (!si.reachable_state(i))
|
||||
{
|
||||
res->prop_complete(trival::maybe());
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,3 +265,17 @@ EOF
|
|||
|
||||
autfilt --sbacc alt.hoa > out.hoa
|
||||
diff out.hoa expect.hoa
|
||||
|
||||
# Issue #312
|
||||
autfilt -S <<EOF | autfilt --is-complete
|
||||
HOA: v1
|
||||
States: 2
|
||||
Start: 0
|
||||
AP: 0
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: !complete
|
||||
--BODY--
|
||||
State: 0 [t] 0 {0}
|
||||
State: 1
|
||||
--END--
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue