|
TuringSim
C++ framework to simulate abstract computing models
|
3 #include <symbol/symbolPattern.h>
4 #include <transition/Turing/turingMachineTransition.h>
20 typename ApplyHelperType_,
21 bool hasHalfTape =
false
33 static_assert(std::is_same_v<SymbolType, SymbolType_>);
35 static_assert(std::is_same_v<StateType, StateType_>);
LocalTuringMachineTransition(LocalTuringMachineTransition &&)=default
The default move constructor.
virtual ~LocalTuringMachineTransition() override=default
The default virtual destructor.
std::conditional_t< isHalfTape, HalfTape::HalfTape< SymbolType >, Tape::Tape< SymbolType > > TapeLike
Transitions for Turing machines.
std::shared_ptr< const State::MConfiguration::MConfiguration< std::string > > StateType
The type of states.
LocalTuringMachineTransition & operator=(const LocalTuringMachineTransition &)=default
The default copy assignment operator.
StateType_ StateType
The type of states.
ApplyHelperType_ ApplyHelperType
The type of apply helpers.
LocalTuringMachineTransition(const LocalTuringMachineTransition &)=default
The default copy constructor.
LocalTuringMachineTransition & operator=(LocalTuringMachineTransition &&)=default
The default move assignment operator.
LocalTuringMachineTransition()=default
The default constructor.
virtual std::optional< ApplyHelperType > match(const StateType &state, const StorageType &tape) const override final
Test whether the transition matches a configuration. Returned optional is empty iff the transition do...
virtual std::optional< ApplyHelperType > matchFromCurrentCell(const StateType &state, const SymbolType &symbol) const =0
Test whether the transition matches a configuration. Returned optional is empty iff the transition do...
std::string SymbolType
The type of symbols on the tape.
StorageType_ StorageType
The type of storage.
Base class for Turing machine transitions.
std::integral_constant< bool, hasHalfTape > HasHalfTape
Whether the tape is a half-tape or a full tape.
SymbolType_ SymbolType
The type of symbols on the tape.
Memory::TapeLike< hasHalfTape, SymbolType_ > StorageType
The type of storage.
Base class for Turing machine transitions that only reads the current symbol on the tape to decide if...
StorageType_::Movement Movement
The type of movement on the tape.