DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <FiniteAutomaton.hh>
Private Attributes | |
AcceptingStates | _accepting |
The template class FiniteAutomaton aims at defining a generic finite automaton (FA). Each state of the FA owns a property of type StatePropertyId. A StatePropertyId should be a copyable, hashable type typically something that is an identifier usually it is a string if there is no StatePropertyManager involved with a given Statemachine but it can be a size_t that links to a StateProperty in a StatePropertyManager.
Each transition is associated with an information of type InputSymbolPropertyId. By construction a StatePropertyId is the property of one state and only one. In this sense, a StatePropertyId fully characterises a state of of the StateMachine. A valid FA always has an initial state. It also contains a subset of accepting (final) states.
Definition at line 48 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::AcceptingStateIterator = typename AcceptingStates::iterator |
Definition at line 60 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::AcceptingStates = std::unordered_set<State> |
Definition at line 58 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::ConstAcceptingStateIterator = typename AcceptingStates::const_iterator |
Definition at line 59 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::InputSymbolId = _InputSymbolId |
Definition at line 52 of file FiniteAutomaton.hh.
Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::InputSymbolIdIterator |
Definition at line 65 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::NullInputSymbolId = _NullInputSymbolId |
Definition at line 55 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::NullStatePropertyId = _NullStatePropertyId |
Definition at line 54 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::SM = StateMachine<_StatePropertyId, _InputSymbolId, _NullStatePropertyId> |
Definition at line 51 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::State = typename SM::State |
Definition at line 56 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::StatePropertyId = _StatePropertyId |
Definition at line 53 of file FiniteAutomaton.hh.
using Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::Transition = typename SM::Transition |
Definition at line 57 of file FiniteAutomaton.hh.
|
inline |
Default constructor
Definition at line 76 of file FiniteAutomaton.hh.
|
inline |
Copy constructor
Definition at line 85 of file FiniteAutomaton.hh.
References Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::acceptingStateBegin(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::acceptingStateEnd(), Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::behaviour(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::setAcceptingState().
|
inline |
Definition at line 195 of file FiniteAutomaton.hh.
Referenced by Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::FiniteAutomaton(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::operator=().
|
inline |
Definition at line 205 of file FiniteAutomaton.hh.
Referenced by Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::FiniteAutomaton(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::operator=().
|
inline |
Definition at line 215 of file FiniteAutomaton.hh.
|
inlinevirtual |
clear the automaton
Reimplemented from Diades::Automata::Experimental::StateMachine< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >.
Definition at line 244 of file FiniteAutomaton.hh.
References Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::clear(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::clearAllAcceptingStates().
|
inline |
Clear the set of accepting states
Definition at line 298 of file FiniteAutomaton.hh.
Referenced by Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::clear().
|
inlinevirtual |
delete state
derives from StateMachine::deleteState and update acceptingStates
state | the State to delete |
Definition at line 259 of file FiniteAutomaton.hh.
References Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::deleteState(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::unsetAcceptingState().
Referenced by trimDdAutStates2().
|
inline |
Definition at line 156 of file FiniteAutomaton.hh.
References Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::initialStateBegin(), Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::initialStateEnd(), and Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::numberOfInitialStates().
|
inline |
Iterator over the set of input symbols
Definition at line 124 of file FiniteAutomaton.hh.
|
inline |
Iterator over the set of input symbols
Definition at line 135 of file FiniteAutomaton.hh.
|
inline |
Definition at line 146 of file FiniteAutomaton.hh.
|
inline |
Insert a new symbol identifier
symbol | a new symbol identifier |
Definition at line 319 of file FiniteAutomaton.hh.
|
inline |
s | a State |
Definition at line 330 of file FiniteAutomaton.hh.
Referenced by Diades::Automata::Experimental::StateCopy< FiniteAutomaton< S, I, NS, NI > >::newState(), Diades::Automata::Experimental::ManagedStateCopy< FiniteAutomaton< S, I, NS, NI >, StateProperty >::newState(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::swapAcceptingState(), Diades::Automata::Experimental::toDotStates(), and writeTreeViewTransition().
|
inlinevirtual |
Definition at line 176 of file FiniteAutomaton.hh.
References Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::initialState(), and Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::isValid().
|
inline |
Definition at line 308 of file FiniteAutomaton.hh.
|
inline |
Definition at line 185 of file FiniteAutomaton.hh.
|
inline |
Assign operator
Definition at line 101 of file FiniteAutomaton.hh.
References Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::acceptingStateBegin(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::acceptingStateEnd(), Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::behaviour(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::clear(), Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::operator=(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::setAcceptingState().
|
inline |
state | a state to become an accepting state in the automaton |
Definition at line 272 of file FiniteAutomaton.hh.
Referenced by applyTag(), Diades::Automata::Experimental::explainFromStates(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::FiniteAutomaton(), Diades::Automata::Experimental::ManagedSynchronisedAcceptingStateCreation< S, I, NS, NI, _StateProperty, StatePropertyCombination >::newState(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::operator=(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::swapAcceptingState().
|
inline |
swap the status of the state as accepting/non-accepting
If the given state is an accepting state then it becomes non accepting And if the state is not an accepting state, it becomes an accepting state
state | a state of the current StateMachine |
Definition at line 227 of file FiniteAutomaton.hh.
References Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::isAcceptingState(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::setAcceptingState(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::unsetAcceptingState().
Referenced by applyTag().
|
inline |
state | a state to become an non accepting state in the automaton |
Definition at line 284 of file FiniteAutomaton.hh.
Referenced by applyTag(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::deleteState(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::swapAcceptingState().
|
private |
Definition at line 68 of file FiniteAutomaton.hh.
Referenced by Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::acceptingStateBegin(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::acceptingStateEnd(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::acceptingStates(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::clearAllAcceptingStates(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::isAcceptingState(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::numberOfAcceptingStates(), Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::setAcceptingState(), and Diades::Automata::Experimental::FiniteAutomaton< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::unsetAcceptingState().