Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
SinglePopNPDA.h
Go to the documentation of this file.
1
6/*
7 * This file is part of Algorithms library toolkit.
8 * Copyright (C) 2017 Jan Travnicek (jan.travnicek@fit.cvut.cz)
9
10 * Algorithms library toolkit is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14
15 * Algorithms library toolkit is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19
20 * You should have received a copy of the GNU General Public License
21 * along with Algorithms library toolkit. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#pragma once
25
26
27#include <ext/algorithm>
28
29#include <alib/set>
30#include <alib/multimap>
31#include <alib/vector>
32
33#include <core/components.hpp>
34
37
39
40#include <core/normalize.hpp>
43
44namespace automaton {
45
46class InputAlphabet;
47class PushdownStoreAlphabet;
48class InitialSymbol;
49class States;
50class FinalStates;
51class InitialState;
52
71template < class InputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType >
72class SinglePopNPDA final : public core::Components < SinglePopNPDA < InputSymbolTypeT, PushdownStoreSymbolTypeT, StateTypeT >, ext::set < InputSymbolTypeT >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolTypeT >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolTypeT, component::Value, InitialSymbol, ext::set < StateTypeT >, component::Set, std::tuple < States, FinalStates >, StateTypeT, component::Value, InitialState > {
73public:
74 typedef InputSymbolTypeT InputSymbolType;
75 typedef PushdownStoreSymbolTypeT PushdownStoreSymbolType;
76 typedef StateTypeT StateType;
77
78private:
83
84public:
95 explicit SinglePopNPDA ( ext::set < StateType > states, ext::set < InputSymbolType > inputAlphabet, ext::set < PushdownStoreSymbolType > pushdownStoreAlphabet, StateType initialState, PushdownStoreSymbolType initialSymbol, ext::set < StateType > finalStates );
96
103 explicit SinglePopNPDA ( StateType initialState, PushdownStoreSymbolType initialPushdownSymbol );
104
110 const StateType & getInitialState ( ) const & {
111 return this-> template accessComponent < InitialState > ( ).get ( );
112 }
113
120 return std::move ( this-> template accessComponent < InitialState > ( ).get ( ) );
121 }
122
130 bool setInitialState ( StateType state ) {
131 return this-> template accessComponent < InitialState > ( ).set ( std::move ( state ) );
132 }
133
139 const ext::set < StateType > & getStates ( ) const & {
140 return this-> template accessComponent < States > ( ).get ( );
141 }
142
149 return std::move ( this-> template accessComponent < States > ( ).get ( ) );
150 }
151
159 bool addState ( StateType state ) {
160 return this-> template accessComponent < States > ( ).add ( std::move ( state ) );
161 }
162
169 this-> template accessComponent < States > ( ).set ( std::move ( states ) );
170 }
171
179 void removeState ( const StateType & state ) {
180 this-> template accessComponent < States > ( ).remove ( state );
181 }
182
189 return this-> template accessComponent < FinalStates > ( ).get ( );
190 }
191
198 return std::move ( this-> template accessComponent < FinalStates > ( ).get ( ) );
199 }
200
208 bool addFinalState ( StateType state ) {
209 return this-> template accessComponent < FinalStates > ( ).add ( std::move ( state ) );
210 }
211
218 this-> template accessComponent < FinalStates > ( ).set ( std::move ( states ) );
219 }
220
228 void removeFinalState ( const StateType & state ) {
229 this-> template accessComponent < FinalStates > ( ).remove ( state );
230 }
231
238 return this->template accessComponent < PushdownStoreAlphabet > ( ).get ( );
239 }
240
247 return std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) );
248 }
249
258 return this->template accessComponent < PushdownStoreAlphabet > ( ).add ( std::move ( symbol ) );
259 }
260
267 this->template accessComponent < PushdownStoreAlphabet > ( ).add ( std::move ( symbols ) );
268 }
269
276 this->template accessComponent < PushdownStoreAlphabet > ( ).set ( std::move ( symbols ) );
277 }
278
287 this->template accessComponent < PushdownStoreAlphabet > ( ).remove ( symbol );
288 }
289
296 return this->template accessComponent < InitialSymbol > ( ).get ( );
297 }
298
305 return std::move ( this->template accessComponent < InitialSymbol > ( ).get ( ) );
306 }
307
316 return this->template accessComponent < InitialSymbol > ( ).set ( std::move ( symbol ) );
317 }
318
325 return this-> template accessComponent < InputAlphabet > ( ).get ( );
326 }
327
334 return std::move ( this-> template accessComponent < InputAlphabet > ( ).get ( ) );
335 }
336
345 return this-> template accessComponent < InputAlphabet > ( ).add ( std::move ( symbol ) );
346 }
347
354 this-> template accessComponent < InputAlphabet > ( ).add ( std::move ( symbols ) );
355 }
356
363 this-> template accessComponent < InputAlphabet > ( ).set ( std::move ( symbols ) );
364 }
365
373 void removeInputSymbol ( const InputSymbolType & symbol ) {
374 this-> template accessComponent < InputAlphabet > ( ).remove ( symbol );
375 }
376
393
410
426
443
459 bool removeTransition ( const StateType & from, const InputSymbolType & input, const PushdownStoreSymbolType & pop, const StateType & to, const ext::vector < PushdownStoreSymbolType > & push );
460
475 bool removeTransition ( const StateType & from, const PushdownStoreSymbolType & pop, const StateType & to, const ext::vector < PushdownStoreSymbolType > & push );
476
483
489 ext::multimap < ext::tuple < StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType >, ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > && getTransitions ( ) &&;
490
498 auto operator <=> ( const SinglePopNPDA & other ) const {
499 return std::tie(getStates(), getInputAlphabet(), getInitialState(), getFinalStates(), getPushdownStoreAlphabet(), getInitialSymbol(), transitions) <=> std::tie(other.getStates(), other.getInputAlphabet(), other.getInitialState(), other.getFinalStates(), other.getPushdownStoreAlphabet(), other.getInitialSymbol(), other.transitions);
500 }
501
509 bool operator == ( const SinglePopNPDA & other ) const {
511 }
512
521 friend ext::ostream & operator << ( ext::ostream & out, const SinglePopNPDA & instance ) {
522 return out << "(SinglePopNPDA"
523 << " states = " << instance.getStates ( )
524 << " inputAlphabet = " << instance.getInputAlphabet ( )
525 << " initialState = " << instance.getInitialState ( )
526 << " finalStates = " << instance.getFinalStates ( )
527 << " pushdownStoreAlphabet = " << instance.getPushdownStoreAlphabet ( )
528 << " initialSymbol = " << instance.getInitialSymbol ( )
529 << " transitions = " << instance.getTransitions ( )
530 << ")";
531 }
532};
533
534template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
535SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::SinglePopNPDA ( ext::set < StateType > states, ext::set < InputSymbolType > inputAlphabet, ext::set < PushdownStoreSymbolType > pushdownStoreAlphabet, StateType initialState, PushdownStoreSymbolType initialSymbol, ext::set < StateType > finalStates ) : core::Components < SinglePopNPDA, ext::set < InputSymbolType >, component::Set, InputAlphabet, ext::set < PushdownStoreSymbolType >, component::Set, PushdownStoreAlphabet, PushdownStoreSymbolType, component::Value, InitialSymbol, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > ( std::move ( inputAlphabet ), std::move ( pushdownStoreAlphabet ), std::move ( initialSymbol ), std::move ( states ), std::move ( finalStates ), std::move ( initialState ) ) {
536}
537
538template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
540}
541
542template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
544 if (! getStates().count(from)) {
545 throw AutomatonException("State \"" + ext::to_string ( from ) + "\" doesn't exist.");
546 }
547
548 if ( ! input.is_epsilon ( ) && ! getInputAlphabet().count(input.getSymbol ( ) ) ) {
549 throw AutomatonException("Input symbol \"" + ext::to_string ( input ) + "\" doesn't exist.");
550 }
551
552 if (! getStates().count(to)) {
553 throw AutomatonException("State \"" + ext::to_string ( to ) + "\" doesn't exist.");
554 }
555
556 if (! getPushdownStoreAlphabet().count(pop)) {
557 throw AutomatonException("Pushdown store symbol \"" + ext::to_string ( pop ) + "\" doesn't exist.");
558 }
559
560 for(const PushdownStoreSymbolType& pushSymbol : push) {
561 if (! getPushdownStoreAlphabet().count(pushSymbol)) {
562 throw AutomatonException("Pushdown store symbol \"" + ext::to_string ( pushSymbol ) + "\" doesn't exist.");
563 }
564 }
565
566 auto upper_bound = transitions.upper_bound ( ext::tie ( from, input, pop ) );
567 auto lower_bound = transitions.lower_bound ( ext::tie ( from, input, pop ) );
568
569 ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > value = ext::make_pair ( std::move ( to ), std::move ( push ) );
570
571 auto iter = std::lower_bound ( lower_bound, upper_bound, value, [ ] ( const auto & transition, const auto & target ) { return transition.second < target; } );
572 if ( iter != upper_bound && value >= iter->second )
573 return false;
574
575 ext::tuple < StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType> key ( std::move ( from ), std::move ( input ), std::move ( pop ) );
576 transitions.insert ( iter, std::make_pair ( std::move ( key ), std::move ( value ) ) );
577 return true;
578}
579
580template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
582 common::symbol_or_epsilon < InputSymbolType > inputVariant(std::move(input));
583 return addTransition(std::move(from), std::move(inputVariant), std::move(pop), std::move(to), std::move(push));
584}
585
586template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
588 auto inputVariant = common::symbol_or_epsilon < InputSymbolType > ( );
589 return addTransition(std::move(from), std::move(inputVariant), std::move(pop), std::move(to), std::move(push));
590}
591
592template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
594 auto upper_bound = transitions.upper_bound ( ext::tie ( from, input, pop ) );
595 auto lower_bound = transitions.lower_bound ( ext::tie ( from, input, pop ) );
596 auto iter = std::find_if ( lower_bound, upper_bound, [ & ] ( const auto & transition ) { return transition.second.first == to && transition.second.second == push; } );
597 if ( iter == upper_bound )
598 return false;
599
600 transitions.erase ( iter );
601 return true;
602}
603
604template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
607 return removeTransition(from, inputVariant, pop, to, push);
608}
609
610template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
612 auto inputVariant = common::symbol_or_epsilon < InputSymbolType > ( );
613 return removeTransition(from, inputVariant, pop, to, push);
614}
615
616template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
618 return transitions;
619}
620
621template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
623 return std::move ( transitions );
624}
625
626} /* namespace automaton */
627
628namespace core {
629
637template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
638class SetConstraint< automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, InputSymbolType, automaton::InputAlphabet > {
639public:
649 for ( const std::pair<const ext::tuple<StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType>, ext::pair<StateType, ext::vector<PushdownStoreSymbolType > > >& transition : automaton.getTransitions())
650 if ( ! std::get<1>(transition.first).is_epsilon ( ) && symbol == std::get<1>(transition.first).getSymbol ( ) )
651 return true;
652
653 return false;
654 }
655
665 return true;
666 }
667
675 }
676};
677
685template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
686class SetConstraint< automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, PushdownStoreSymbolType, automaton::PushdownStoreAlphabet > {
687public:
696 static bool used ( const automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & automaton, const PushdownStoreSymbolType & symbol ) {
697 if(automaton.getInitialSymbol() == symbol)
698 return true;
699
700 for ( const std::pair<const ext::tuple<StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType>, ext::pair<StateType, ext::vector<PushdownStoreSymbolType > > >& transition : automaton.getTransitions()) {
701 if (symbol == std::get<2>(transition.first))
702 return true;
703
704 if (std::find(transition.second.second.begin(), transition.second.second.end(), symbol) != transition.second.second.end())
705 return true;
706 }
707
708 return false;
709 }
710
720 return true;
721 }
722
729 static void valid ( const automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType & ) {
730 }
731};
732
740template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
741class ElementConstraint< automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, PushdownStoreSymbolType, automaton::InitialSymbol > {
742public:
751 static bool available ( const automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & automaton, const PushdownStoreSymbolType & symbol ) {
752 return automaton.template accessComponent < automaton::PushdownStoreAlphabet > ( ).get ( ).count ( symbol );
753 }
754
761 static void valid ( const automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType & ) {
762 }
763};
764
772template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
773class SetConstraint< automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, StateType, automaton::States > {
774public:
784 if ( automaton.getInitialState ( ) == state )
785 return true;
786
787 if ( automaton.getFinalStates ( ).count ( state ) )
788 return true;
789
790 for ( const std::pair<const ext::tuple<StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType>, ext::pair<StateType, ext::vector<PushdownStoreSymbolType > > >& transition : automaton.getTransitions()) {
791 if (state == std::get<0>(transition.first))
792 return true;
793
794 if(transition.second.first == state)
795 return true;
796 }
797
798 return false;
799 }
800
810 return true;
811 }
812
820 }
821};
822
830template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
831class SetConstraint< automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, StateType, automaton::FinalStates > {
832public:
842 return false;
843 }
844
854 return automaton.template accessComponent < automaton::States > ( ).get ( ).count ( state );
855 }
856
864 }
865};
866
874template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
875class ElementConstraint< automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, StateType, automaton::InitialState > {
876public:
886 return automaton.template accessComponent < automaton::States > ( ).get ( ).count ( state );
887 }
888
896 }
897};
898
904template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
905struct normalize < automaton::SinglePopNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > > {
907 ext::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getInputAlphabet ( ) );
908 ext::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getPushdownStoreAlphabet ( ) );
909 DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( value ).getInitialSymbol ( ) );
910 ext::set < DefaultStateType > states = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getStates ( ) );
911 DefaultStateType initialState = automaton::AutomatonNormalize::normalizeState ( std::move ( value ).getInitialState ( ) );
912 ext::set < DefaultStateType > finalStates = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getFinalStates ( ) );
913
914 automaton::SinglePopNPDA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( pushdownAlphabet ), std::move ( initialState ), std::move ( initialSymbol ), std::move ( finalStates ) );
915
916 for ( std::pair < ext::tuple < StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType >, ext::set < ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > > && transition : ext::make_mover ( std::move ( value ).getTransitions ( ) ) ) {
917 DefaultStateType to = automaton::AutomatonNormalize::normalizeState ( std::move ( transition.second.first ) );
918 ext::vector < DefaultSymbolType > push = alphabet::SymbolNormalize::normalizeSymbols ( std::move ( transition.second.second ) );
919
920 DefaultSymbolType pop = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( std::get < 2 > ( transition.first ) ) );
921 DefaultStateType from = automaton::AutomatonNormalize::normalizeState ( std::move ( std::get < 0 > ( transition.first ) ) );
922 common::symbol_or_epsilon < DefaultSymbolType > input = automaton::AutomatonNormalize::normalizeSymbolEpsilon ( std::move ( std::get < 1 > ( transition.first ) ) );
923
924 res.addTransition ( std::move ( from ), std::move ( input ), std::move ( pop ), std::move ( to ), std::move ( push ) );
925 }
926
927 return res;
928 }
929};
930
931} /* namespace core */
932
933extern template class automaton::SinglePopNPDA < >;
934
static ext::set< DefaultSymbolType > normalizeAlphabet(ext::set< SymbolType > &&symbols)
Definition: SymbolNormalize.h:50
static ext::vector< DefaultSymbolType > normalizeSymbols(ext::vector< SymbolType > &&symbols)
Definition: SymbolNormalize.h:86
static DefaultSymbolType normalizeSymbol(SymbolType &&symbol)
Definition: SymbolNormalize.h:68
Definition: AutomatonException.h:15
static common::symbol_or_epsilon< DefaultSymbolType > normalizeSymbolEpsilon(common::symbol_or_epsilon< SymbolType > &&symbol)
Definition: AutomatonNormalize.h:81
static DefaultStateType normalizeState(StateType &&state)
Definition: AutomatonNormalize.h:76
static ext::multiset< DefaultStateType > normalizeStates(ext::multiset< StateType > &&states)
Definition: AutomatonNormalize.h:49
Definition: SinglePopNPDA.h:72
const StateType & getInitialState() const &
Definition: SinglePopNPDA.h:110
void addInputSymbols(ext::set< InputSymbolType > symbols)
Definition: SinglePopNPDA.h:353
PushdownStoreSymbolTypeT PushdownStoreSymbolType
Definition: SinglePopNPDA.h:75
void removePushdownStoreSymbol(const PushdownStoreSymbolType &symbol)
Definition: SinglePopNPDA.h:286
void setFinalStates(ext::set< StateType > states)
Definition: SinglePopNPDA.h:217
const ext::set< InputSymbolType > & getInputAlphabet() const &
Definition: SinglePopNPDA.h:324
void removeInputSymbol(const InputSymbolType &symbol)
Definition: SinglePopNPDA.h:373
StateTypeT StateType
Definition: SinglePopNPDA.h:76
void setStates(ext::set< StateType > states)
Definition: SinglePopNPDA.h:168
bool setInitialSymbol(PushdownStoreSymbolType symbol)
Definition: SinglePopNPDA.h:315
const ext::set< PushdownStoreSymbolType > & getPushdownStoreAlphabet() const &
Definition: SinglePopNPDA.h:237
const PushdownStoreSymbolType & getInitialSymbol() const &
Definition: SinglePopNPDA.h:295
bool addTransition(StateType from, common::symbol_or_epsilon< InputSymbolType > input, PushdownStoreSymbolType pop, StateType to, ext::vector< PushdownStoreSymbolType > push)
Adds a transition to the automaton.
Definition: SinglePopNPDA.h:543
bool addPushdownStoreSymbol(PushdownStoreSymbolType symbol)
Definition: SinglePopNPDA.h:257
void removeFinalState(const StateType &state)
Definition: SinglePopNPDA.h:228
ext::set< StateType > && getStates() &&
Definition: SinglePopNPDA.h:148
void setInputAlphabet(ext::set< InputSymbolType > symbols)
Definition: SinglePopNPDA.h:362
SinglePopNPDA(ext::set< StateType > states, ext::set< InputSymbolType > inputAlphabet, ext::set< PushdownStoreSymbolType > pushdownStoreAlphabet, StateType initialState, PushdownStoreSymbolType initialSymbol, ext::set< StateType > finalStates)
Creates a new instance of the automaton with a concrete set of states, input alphabet,...
Definition: SinglePopNPDA.h:535
ext::set< PushdownStoreSymbolType > && getPushdownStoreAlphabet() &&
Definition: SinglePopNPDA.h:246
bool operator==(const SinglePopNPDA &other) const
Definition: SinglePopNPDA.h:509
bool addFinalState(StateType state)
Definition: SinglePopNPDA.h:208
bool removeTransition(const StateType &from, const common::symbol_or_epsilon< InputSymbolType > &input, const PushdownStoreSymbolType &pop, const StateType &to, const ext::vector< PushdownStoreSymbolType > &push)
Removes a transition from the automaton.
Definition: SinglePopNPDA.h:593
bool setInitialState(StateType state)
Definition: SinglePopNPDA.h:130
void addPushdownStoreSymbols(ext::set< PushdownStoreSymbolType > symbols)
Definition: SinglePopNPDA.h:266
const ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, PushdownStoreSymbolType >, ext::pair< StateType, ext::vector< PushdownStoreSymbolType > > > & getTransitions() const &
Definition: SinglePopNPDA.h:617
const ext::set< StateType > & getStates() const &
Definition: SinglePopNPDA.h:139
StateType && getInitialState() &&
Definition: SinglePopNPDA.h:119
ext::set< InputSymbolType > && getInputAlphabet() &&
Definition: SinglePopNPDA.h:333
friend ext::ostream & operator<<(ext::ostream &out, const SinglePopNPDA &instance)
Definition: SinglePopNPDA.h:521
bool addInputSymbol(InputSymbolType symbol)
Definition: SinglePopNPDA.h:344
const ext::set< StateType > & getFinalStates() const &
Definition: SinglePopNPDA.h:188
bool addState(StateType state)
Definition: SinglePopNPDA.h:159
ext::set< StateType > && getFinalStates() &&
Definition: SinglePopNPDA.h:197
void setPushdownStoreAlphabet(ext::set< PushdownStoreSymbolType > symbols)
Definition: SinglePopNPDA.h:275
PushdownStoreSymbolType && getInitialSymbol() &&
Definition: SinglePopNPDA.h:304
void removeState(const StateType &state)
Definition: SinglePopNPDA.h:179
InputSymbolTypeT InputSymbolType
Definition: SinglePopNPDA.h:74
Definition: symbol_or_epsilon.hpp:24
Definition: components.hpp:181
static void valid(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopNPDA.h:895
static bool available(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const StateType &state)
Definition: SinglePopNPDA.h:885
static bool available(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const PushdownStoreSymbolType &symbol)
Definition: SinglePopNPDA.h:751
static void valid(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType &)
Definition: SinglePopNPDA.h:761
Definition: components.hpp:25
static void valid(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopNPDA.h:819
static bool used(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const StateType &state)
Definition: SinglePopNPDA.h:783
static bool available(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopNPDA.h:809
static void valid(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType &)
Definition: SinglePopNPDA.h:729
static bool available(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType &)
Definition: SinglePopNPDA.h:719
static bool used(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const PushdownStoreSymbolType &symbol)
Definition: SinglePopNPDA.h:696
static bool used(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopNPDA.h:841
static bool available(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const StateType &state)
Definition: SinglePopNPDA.h:853
static void valid(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopNPDA.h:863
static bool available(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const InputSymbolType &)
Definition: SinglePopNPDA.h:664
static bool used(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const InputSymbolType &symbol)
Definition: SinglePopNPDA.h:648
static void valid(const automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const InputSymbolType &)
Definition: SinglePopNPDA.h:674
Definition: setComponents.hpp:26
Class extending the multimap class from the standard library. Original reason is to allow printing of...
Definition: multimap.hpp:48
Definition: ostream.h:14
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
Definition: set.hpp:44
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
Class extending the vector class from the standard library. Original reason is to allow printing of t...
Definition: vector.hpp:45
Definition: Object.h:16
Definition: BarSymbol.cpp:12
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
return res
Definition: MinimizeByPartitioning.h:145
Definition: ToGrammar.h:31
Definition: Permutation.hpp:18
Definition: normalize.hpp:10
Definition: sigHandler.cpp:20
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
reference_mover< T > make_mover(T &param)
Move adaptor construction function specialized to lvalue reference parameter.
Definition: iterator.hpp:468
std::string to_string(const T &value)
To string method designated for objects that can be casted to string.
Definition: string.hpp:131
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79
auto & get(ext::ptr_array< Type, N > &tpl)
Specialisation of get function for pointer arrays.
Definition: ptr_array.hpp:693
static automaton::SinglePopNPDA< > eval(automaton::SinglePopNPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &&value)
Definition: SinglePopNPDA.h:906
Definition: normalize.hpp:13