-
Notifications
You must be signed in to change notification settings - Fork 21
Add transition using the alphabet member keys #587
Copy link
Copy link
Open
Labels
For:libraryThe issue is related to library (c++ implementation)The issue is related to library (c++ implementation)Module:nfaThe issue is related to Nondeterministic Finite AutomataThe issue is related to Nondeterministic Finite AutomataType:suggestionA suggestion for feature/change that is not necessary at this momentA suggestion for feature/change that is not necessary at this moment
Milestone
Metadata
Metadata
Assignees
Labels
For:libraryThe issue is related to library (c++ implementation)The issue is related to library (c++ implementation)Module:nfaThe issue is related to Nondeterministic Finite AutomataThe issue is related to Nondeterministic Finite AutomataType:suggestionA suggestion for feature/change that is not necessary at this momentA suggestion for feature/change that is not necessary at this moment
By @bruderjakob17 in #584.
Options:
template <typename SymbolName>Nfa::add_transition(State source, SymbolName symbol, State target, Alphabet* alphabet = nullptr)which calls the member alphabetthis->alphabet->translate_symbol(symbol), unless the parameteralphabetis notnullptrat which point this alphabet instance is preferred.This is consistent with the
Nft::add_transition()which is the more high-level approach to adding complex automata-level transitions, disregarding the technical details of the Mata implementation of the transition relation.Nfa::add_transition_with_symbol_name()(and however shorter this can be made) to distinguish from the same high-level approach, but without the alphabet.std::string. I think onlyNfa::add_transtiion(..., Symbol, ...)andNfa::add_transition(..., SymbolName symbol_name, ...)would be sufficient.