mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
fix #2643 - fuzzers are here to get you @lorisdanton
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cc26d49060
commit
a921b4ff4a
2 changed files with 10 additions and 5 deletions
|
@ -381,11 +381,14 @@ typename symbolic_automata<T, M>::automaton_t* symbolic_automata<T, M>::mk_produ
|
|||
unsigned_vector final;
|
||||
unsigned_vector a_init, b_init;
|
||||
a.get_epsilon_closure(a.init(), a_init);
|
||||
bool a_init_is_final = false, b_init_is_final = false;
|
||||
for (unsigned ia : a_init) {
|
||||
if (a.is_final_state(ia)) {
|
||||
a_init_is_final = true;
|
||||
b.get_epsilon_closure(b.init(), b_init);
|
||||
for (unsigned ib : b_init) {
|
||||
if (b.is_final_state(ib)) {
|
||||
b_init_is_final = true;
|
||||
final.push_back(0);
|
||||
break;
|
||||
}
|
||||
|
@ -438,8 +441,8 @@ typename symbolic_automata<T, M>::automaton_t* symbolic_automata<T, M>::mk_produ
|
|||
}
|
||||
|
||||
svector<bool> back_reachable(n, false);
|
||||
for (unsigned i = 0; i < final.size(); ++i) {
|
||||
back_reachable[final[i]] = true;
|
||||
for (unsigned f : final) {
|
||||
back_reachable[f] = true;
|
||||
}
|
||||
|
||||
unsigned_vector stack(final);
|
||||
|
@ -464,7 +467,7 @@ typename symbolic_automata<T, M>::automaton_t* symbolic_automata<T, M>::mk_produ
|
|||
}
|
||||
}
|
||||
if (mvs1.empty()) {
|
||||
if (a.is_final_state(a.init()) && b.is_final_state(b.init())) {
|
||||
if (a_init_is_final && b_init_is_final) {
|
||||
// special case: automaton has no moves, but the initial state is final on both sides
|
||||
// this results in the automaton which accepts the empty sequence and nothing else
|
||||
final.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue