3 #include <machine/PDM/stateAcceptingPushdownMachine.h>
4 #include <transition/PDM/simplePushdownMachineTransition.h>
27 typename StackSymbolType,
30 template <
typename...>
class TransitionContainer_ = std::vector,
31 template <
typename...>
class InitialStateContainer_ = std::vector,
32 typename AcceptingConstructorArgs =
typename impl_details_::StateAcceptingMachineArgs<StateType, acceptingStyle>::AcceptingConstructorArgs
55 typename StackSymbolType_,
58 template <
typename...>
class TransitionContainer_,
59 template <
typename...>
class InitialStateContainer_,
69 InitialStateContainer_,
71 > :
public PushdownMachine<Transition::PDM::SimplePushdownMachineTransition<StateType_, LetterType_, StackSymbolType_>, deterministic, acceptingStyle, TransitionContainer_, InitialStateContainer_> {
75 using typename PushdownMachine_::WordType;
76 using typename PushdownMachine_::StackType;
77 using typename PushdownMachine_::StateType;
78 using typename PushdownMachine_::LetterType;
79 using typename PushdownMachine_::IsAccepting;
80 using typename PushdownMachine_::StorageType;
81 using typename PushdownMachine_::IsAlternating;
82 using typename PushdownMachine_::TransitionType;
83 using typename PushdownMachine_::ApplyHelperType;
84 using typename PushdownMachine_::IsDeterministic;
85 using typename PushdownMachine_::StackSymbolType;
86 using typename PushdownMachine_::TransitionContainer;
87 using typename PushdownMachine_::InitialStateContainer;
88 using typename PushdownMachine_::OptionalHelpedTransition;
90 static_assert(std::is_same_v<StateType, typename TransitionType::StateType>);
91 static_assert(std::is_same_v<StorageType, typename TransitionType::StorageType>);
92 static_assert(std::is_same_v<TransitionType, TransitionType_>);
93 static_assert(std::is_same_v<ApplyHelperType, typename TransitionType::ApplyHelperType>);
94 static_assert(std::is_same_v<ApplyHelperType, std::monostate>);
95 static_assert(std::is_same_v<IsDeterministic, std::integral_constant<bool, deterministic>>);
96 static_assert(std::is_same_v<TransitionContainer, TransitionContainer_<std::pair<const TransitionType&, ApplyHelperType>>>);
97 static_assert(std::is_same_v<InitialStateContainer, InitialStateContainer_<StateType>>);
98 static_assert(std::is_same_v<OptionalHelpedTransition, std::optional<std::pair<const TransitionType&, ApplyHelperType>>>);
101 "StorageType should be a word and a stack.");
102 static_assert(std::is_same_v<TransitionType_, TransitionType>,
103 "TransitionType must be SimplePushdownTransition");
105 "The only valid value for AcceptingConstructorArgs is the default parameter.");
132 #pragma clang diagnostic push
133 #pragma clang diagnostic ignored "-Wunused-parameter"
155 return storage.isEndOfWord();
157 #pragma clang diagnostic pop