|
TuringSim
C++ framework to simulate abstract computing models
|
37 template<
typename CharT =
char,
typename Traits = std::
char_traits<CharT>>
38 std::function<std::basic_ostream<CharT, Traits>&(std::basic_ostream<CharT, Traits>&)> debug(NodeType node) {
39 std::function<std::basic_ostream<CharT, Traits>&(std::basic_ostream<CharT, Traits>&)> f =
40 [node] (std::basic_ostream<CharT, Traits>& os) -> std::basic_ostream<CharT, Traits>& {
59 bool decideForEmptySet(NodeType node);
65 std::optional<bool> toBool(NodeType node);
73 template<
typename TransitionType, AcceptingStyle acceptingStyle>
79 template<
typename TransitionType_>
92 typedef typename TransitionType::StateType
StateType;
141 template<
typename TransitionType_>
212 template<
typename TransitionType_>
AcceptingMachine & operator=(const AcceptingMachine &)=default
The default copy assignment operator.
AcceptingMachine & operator=(AcceptingMachine &&)=default
The default move assignment operator.
AcceptingMachine()=default
Default constructor.
TransitionType::StateType StateType
The type of the machine states. Got from TransitionType.
std::true_type IsAlternating
Whether the machine is alternating. It is std::true_type for this specialization.
AcceptingMachine & operator=(const AcceptingMachine &)=default
The default copy assignment operator.
TransitionType::StateType StateType
The type of the machine states. Got from TransitionType.
TransitionType_ TransitionType
The type of the transitions.
std::false_type IsAlternating
Whether the machine is alternating. It is std::false_type for this specialization.
AcceptingMachine()=default
Default constructor.
@ NonAccepting
A computation machine that does not accept anything.
AcceptingMachine()=default
Default constructor.
std::true_type IsAccepting
Whether the machine is accepting. It is std::true_type for this specialization.
TransitionType::StorageType StorageType
The type of the machine memoryGot from TransitionType.
TransitionType_ TransitionType
The type of the transitions.
TransitionType_ TransitionType
The type of the transitions.
AcceptingMachine & operator=(const AcceptingMachine &)=default
The default copy assignment operator.
Types of nodes for alternating machines, with helping functions.
TransitionType::StorageType StorageType
The type of the machine memoryGot from TransitionType.
virtual bool isAcceptingConfiguration(const StateType &state, const StorageType &storage) const noexcept=0
Whether a given configuration is accepting.
AcceptingMachine(AcceptingMachine &&)=default
The default move constructor.
virtual ~AcceptingMachine()=default
The default virtual destructor.
virtual ~AcceptingMachine()=default
The default virtual destructor.
AcceptingMachine(const AcceptingMachine &)=default
The default copy constructor.
virtual Acceptance::NodeType isAcceptingConfiguration(const StateType &state, const StorageType &storage) const noexcept=0
Whether a given configuration is accepting, rejecting or quantified.
The namespace that contains machines. To run them, see TuringSim::Runner.
AcceptingMachine(const AcceptingMachine &)=default
The default copy constructor.
std::true_type IsAccepting
Whether the machine is accepting. It is std::true_type for this specialization.
AcceptingMachine(AcceptingMachine &&)=default
The default move constructor.
Base class for accepting machines.
TransitionType::StorageType StorageType
The type of the machine memoryGot from TransitionType.
AcceptingStyle
Whether the machine is accepting, alternating or nothing.
AcceptingMachine(const AcceptingMachine &)=default
The default copy constructor.
AcceptingMachine & operator=(AcceptingMachine &&)=default
The default move assignment operator.
AcceptingMachine & operator=(AcceptingMachine &&)=default
The default move assignment operator.
virtual ~AcceptingMachine()=default
The default virtual destructor.
virtual bool isInitiallyUniversal() const noexcept=0
Whether we only want all initial states to success, or only one.
AcceptingMachine(AcceptingMachine &&)=default
The default move constructor.
std::false_type IsAccepting
Whether the machine is accepting. It is std::false_type for this specialization.
std::false_type IsAlternating
Whether the machine is alternating. It is std::false_type for this specialization.
TransitionType::StateType StateType
The type of the machine states. Got from TransitionType.