Skip to content

Commit

Permalink
refactor: Simplify handling of callback for macrostate discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
Adda0 committed Jul 15, 2024
1 parent dfba328 commit 3044850
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/nfa/operations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1052,8 +1052,7 @@ Nfa mata::nfa::determinize(
using Iterator = mata::utils::OrdVector<SymbolPost>::const_iterator;
SynchronizedExistentialSymbolPostIterator synchronized_iterator;

bool continue_determinization{ true };
while (continue_determinization && !worklist.empty()) {
while (!worklist.empty()) {
const auto Spair = worklist.back();
worklist.pop_back();
const StateSet S = Spair.second;
Expand Down Expand Up @@ -1089,10 +1088,7 @@ Nfa mata::nfa::determinize(
}
result.delta.mutable_state_post(Sid).insert(SymbolPost(currentSymbol, Tid));
if (macrostate_discover.has_value() && existingTitr == subset_map->end()
&& !(*macrostate_discover)(result, Tid, T)) {
continue_determinization = false;
break;
}
&& !(*macrostate_discover)(result, Tid, T)) { return result; }
}
}
return result;
Expand Down

0 comments on commit 3044850

Please sign in to comment.