|
CBMC
|
Very simple NFA implementation Not super performant, but should be good enough for our purposes. More...
#include <nfa.h>
Inheritance diagram for nfat< T >:
Collaboration diagram for nfat< T >:Classes | |
| struct | statet |
| A state is a set of possibly active transitions. More... | |
| struct | transitiont |
Public Types | |
| using | state_labelt = std::size_t |
Public Member Functions | |
| nfat ()=default | |
| void | add_transition (state_labelt from, T when, state_labelt to) |
| Add a transition from "from" to "to" exactly when "when" is consumed. More... | |
| void | add_arbitrary_transition (state_labelt from, state_labelt to) |
| Add a transition from "from" to "to" when any input is consumed This is handled a special case so not all inputs need to be enumerated for arbitrary transitions. More... | |
| void | add_epsilon_transition (state_labelt from, state_labelt to) |
| Add a transition from "from" to "to" that doesn’t consume input. More... | |
| statet | initial_state (state_labelt initial) const |
| statet | next_state (const statet ¤t, const T &input) const |
| void | dump_automaton_dot_to (std::ostream &out) const |
| Write the automaton structure to out in graphviz dot format. More... | |
Private Member Functions | |
| void | resize_if_necessary (state_labelt from, state_labelt to) |
| void | follow_epsilon_transitions (statet &state) const |
Private Attributes | |
| std::vector< transitiont > | transitions |
Very simple NFA implementation Not super performant, but should be good enough for our purposes.
| using nfat< T >::state_labelt = std::size_t |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
private |