-
Notifications
You must be signed in to change notification settings - Fork 19
Fix mata::nft::algorithms::concatenate_eps
#542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add the JumpMode
parameter to the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I would keep the jump transition here unless JumpMode::AppendDontCares
is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.