|
TuringSim
C++ framework to simulate abstract computing models
|
The class to represent a simple turing machine. More...
#include <machine/simpleTuringMachine.h>


Public Member Functions | |
| SimpleTuringMachine ()=delete | |
| The default deleted constructor. | |
| SimpleTuringMachine (const SimpleTuringMachine &)=default | |
| The default copy constructor. | |
| SimpleTuringMachine (SimpleTuringMachine &&)=default | |
| The default move constructor. | |
| SimpleTuringMachine & | operator= (const SimpleTuringMachine &)=default |
| The default copy assignment operator. More... | |
| SimpleTuringMachine & | operator= (SimpleTuringMachine &&)=default |
| The default move assignment operator. More... | |
| virtual | ~SimpleTuringMachine () override=default |
| The default virtual destructor. | |
| SimpleTuringMachine (const std::set< StateType > &finalStates) | |
| Build a SimpleTuringMachine from a set of final states. More... | |
| virtual bool | isHaltingState (const StateType &state) const noexcept override final |
| Test if a given state is a halting one. More... | |
The class to represent a simple turing machine.
A simple Turing machine is a Turing machine which only has simple transitions. Simple transitions are transitions that are explicit 5-tuple (pre-state, pre-symbol, post-state, post-symbol, movement). These transitions are objects of class Transition::SimpleTuringMachineTransition.
This class has a single data member: the set of final states.
All typedef types in Machine::LocalTuringMachine (and above) are still accessible.
| StateType_ | the type of the states. std::less<StateType_> and std::allocator<StateType_> must exist. |
| SymbolType_ | the type of symbols on the tape. std::less<StateType_> and std::allocator<StateType_> must exist. |
| deterministic | whether the machine is deterministic. |
| hasHalfTape | whether the tape is a half-tape or a actual complete tape. |
| acceptingStyle | whether the machine is alternating, regularly accepting, or not. |
Definition at line 34 of file simpleTuringMachine.h.
|
inline |
Build a SimpleTuringMachine from a set of final states.
| [in] | finalStates | the set of final states. |
Definition at line 96 of file simpleTuringMachine.h.
|
inlinefinaloverridevirtualnoexcept |
Test if a given state is a halting one.
| [in] | state | a const reference to a StateType. It represents the current state of the machine. |
Parameter state must come from getInitialStates() const, or a sequence of valid transition applications from an initial state.
Termination of Turing machines does not depend on the current storage.
See Machine::isHaltingConfiguration(const StateType& state, const StorageType& storage) const for more details on termination.
Definition at line 111 of file simpleTuringMachine.h.
|
default |
The default copy assignment operator.
*this.
|
default |
The default move assignment operator.
*this.