Fix mata::nft::algorithms::concatenate_eps#542
Conversation
|
|
||
| // Add epsilon transitions connecting lhs and rhs automata. | ||
| // The epsilon transitions lead from lhs original final states to rhs original initial states. | ||
| std::vector<Symbol> nft_epsilon(result.num_of_levels, epsilon); |
There was a problem hiding this comment.
In our current setup, it should be necessary to explicitly create n epsilon transitions over n levels only when dealing with JumpMode::AppendDontCares. For a JumpMode::RepeatSymbol, it is sufficient to have only one transition. Even though at this moment we use explicit transitions in JumpMode::RepeatSymbol, we support long jumps over the epsilon symbol.
There was a problem hiding this comment.
We should probably add the JumpMode parameter to the function.
There was a problem hiding this comment.
I agree. I would keep the jump transition here unless JumpMode::AppendDontCares is set.
There was a problem hiding this comment.
I need explicit NFT transition for Noodler here. It seems a bit weird for this function to take JumpMode if the point of the parameter is to decide whether we add one or multiple epsilons.
| for (const auto& lhs_final_state: lhs.final) { | ||
| for (const auto& rhs_initial_state: rhs.initial) { | ||
| result.delta.add(lhs_final_state, epsilon, | ||
| result.add_transition(lhs_final_state, nft_epsilon, |
There was a problem hiding this comment.
So, this can be reversed, in my opinion.
|
We will merge for now, since Noodler development must continue, but in the future, we will have to think about what to do with jumps in NFTs (which currently Noodler does not support at all). |
No description provided.