Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
SinglePopDPDA.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#include <ostream>
27
28#include <ext/algorithm>
29
30#include <alib/set>
31#include <alib/map>
32#include <alib/vector>
33
34#include <core/components.hpp>
35
38
40
41#include <core/normalize.hpp>
44
45namespace automaton {
46
47class InputAlphabet;
48class PushdownStoreAlphabet;
49class InitialSymbol;
50class States;
51class FinalStates;
52class InitialState;
53
77template < class InputSymbolTypeT = DefaultSymbolType, class PushdownStoreSymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType >
78class SinglePopDPDA final : public core::Components < SinglePopDPDA < 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 > {
79public:
80 typedef InputSymbolTypeT InputSymbolType;
81 typedef PushdownStoreSymbolTypeT PushdownStoreSymbolType;
82 typedef StateTypeT StateType;
83
84private:
89
90public:
101 explicit SinglePopDPDA ( ext::set < StateType > states, ext::set < InputSymbolType > inputAlphabet, ext::set < PushdownStoreSymbolType > pushdownStoreAlphabet, StateType initialState, PushdownStoreSymbolType initialSymbol, ext::set < StateType > finalStates );
102
109 explicit SinglePopDPDA ( StateType initialState, PushdownStoreSymbolType initialPushdownSymbol );
110
116 const StateType & getInitialState ( ) const & {
117 return this-> template accessComponent < InitialState > ( ).get ( );
118 }
119
126 return std::move ( this-> template accessComponent < InitialState > ( ).get ( ) );
127 }
128
136 bool setInitialState ( StateType state ) {
137 return this-> template accessComponent < InitialState > ( ).set ( std::move ( state ) );
138 }
139
145 const ext::set < StateType > & getStates ( ) const & {
146 return this-> template accessComponent < States > ( ).get ( );
147 }
148
155 return std::move ( this-> template accessComponent < States > ( ).get ( ) );
156 }
157
165 bool addState ( StateType state ) {
166 return this-> template accessComponent < States > ( ).add ( std::move ( state ) );
167 }
168
175 this-> template accessComponent < States > ( ).set ( std::move ( states ) );
176 }
177
185 void removeState ( const StateType & state ) {
186 this-> template accessComponent < States > ( ).remove ( state );
187 }
188
195 return this-> template accessComponent < FinalStates > ( ).get ( );
196 }
197
204 return std::move ( this-> template accessComponent < FinalStates > ( ).get ( ) );
205 }
206
214 bool addFinalState ( StateType state ) {
215 return this-> template accessComponent < FinalStates > ( ).add ( std::move ( state ) );
216 }
217
224 this-> template accessComponent < FinalStates > ( ).set ( std::move ( states ) );
225 }
226
234 void removeFinalState ( const StateType & state ) {
235 this-> template accessComponent < FinalStates > ( ).remove ( state );
236 }
237
244 return this->template accessComponent < PushdownStoreAlphabet > ( ).get ( );
245 }
246
253 return std::move ( this->template accessComponent < PushdownStoreAlphabet > ( ).get ( ) );
254 }
255
264 return this->template accessComponent < PushdownStoreAlphabet > ( ).add ( std::move ( symbol ) );
265 }
266
273 this->template accessComponent < PushdownStoreAlphabet > ( ).add ( std::move ( symbols ) );
274 }
275
282 this->template accessComponent < PushdownStoreAlphabet > ( ).set ( std::move ( symbols ) );
283 }
284
293 this->template accessComponent < PushdownStoreAlphabet > ( ).remove ( symbol );
294 }
295
302 return this->template accessComponent < InitialSymbol > ( ).get ( );
303 }
304
311 return std::move ( this->template accessComponent < InitialSymbol > ( ).get ( ) );
312 }
313
322 return this->template accessComponent < InitialSymbol > ( ).set ( std::move ( symbol ) );
323 }
324
331 return this-> template accessComponent < InputAlphabet > ( ).get ( );
332 }
333
340 return std::move ( this-> template accessComponent < InputAlphabet > ( ).get ( ) );
341 }
342
351 return this-> template accessComponent < InputAlphabet > ( ).add ( std::move ( symbol ) );
352 }
353
360 this-> template accessComponent < InputAlphabet > ( ).add ( std::move ( symbols ) );
361 }
362
369 this-> template accessComponent < InputAlphabet > ( ).set ( std::move ( symbols ) );
370 }
371
379 void removeInputSymbol ( const InputSymbolType & symbol ) {
380 this-> template accessComponent < InputAlphabet > ( ).remove ( symbol );
381 }
382
399
416
432
449
465 bool removeTransition ( const StateType & from, const InputSymbolType & input, const PushdownStoreSymbolType & pop, const StateType & to, const ext::vector < PushdownStoreSymbolType > & push );
466
481 bool removeTransition ( const StateType & from, const PushdownStoreSymbolType & pop, const StateType & to, const ext::vector < PushdownStoreSymbolType > & push );
482
489
495 ext::map < ext::tuple < StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType >, ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > && getTransitions ( ) &&;
496
504 auto operator <=> ( const SinglePopDPDA & other ) const {
505 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);
506 }
507
515 bool operator == ( const SinglePopDPDA & other ) const {
517 }
518
527 friend ext::ostream & operator << ( ext::ostream & out, const SinglePopDPDA & instance ) {
528 return out << "(SinglePopDPDA"
529 << " states = " << instance.getStates ( )
530 << " inputAlphabet = " << instance.getInputAlphabet ( )
531 << " initialState = " << instance.getInitialState ( )
532 << " finalStates = " << instance.getFinalStates ( )
533 << " pushdownStoreAlphabet = " << instance.getPushdownStoreAlphabet ( )
534 << " initialSymbol = " << instance.getInitialSymbol ( )
535 << " transitions = " << instance.getTransitions ( )
536 << ")";
537 }
538};
539
540template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
541SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >::SinglePopDPDA ( ext::set < StateType > states, ext::set < InputSymbolType > inputAlphabet, ext::set < PushdownStoreSymbolType > pushdownStoreAlphabet, StateType initialState, PushdownStoreSymbolType initialSymbol, ext::set < StateType > finalStates ) : core::Components < SinglePopDPDA, 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 ) ) {
542}
543
544template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
546}
547
548template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
550 if (!getStates().count(from)) {
551 throw AutomatonException("State \"" + ext::to_string ( from ) + "\" doesn't exist.");
552 }
553
554 if ( ! input.is_epsilon ( ) && ! getInputAlphabet().count(input.getSymbol ( ) ) ) {
555 throw AutomatonException("Input symbol \"" + ext::to_string ( input ) + "\" doesn't exist.");
556 }
557
558 if (!getStates().count(to)) {
559 throw AutomatonException("State \"" + ext::to_string ( to ) + "\" doesn't exist.");
560 }
561
562 if (!getPushdownStoreAlphabet().count(pop)) {
563 throw AutomatonException("Pushdown store symbol \"" + ext::to_string ( pop ) + "\" doesn't exist.");
564 }
565
566 for(const PushdownStoreSymbolType& pushSymbol : push) {
567 if (!getPushdownStoreAlphabet().count(pushSymbol)) {
568 throw AutomatonException("Pushdown store symbol \"" + ext::to_string ( pushSymbol ) + "\" doesn't exist.");
569 }
570 }
571
572 ext::tuple<StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType> key(std::move(from), std::move(input), std::move(pop));
573 ext::pair<StateType, ext::vector<PushdownStoreSymbolType> > value = ext::make_pair(std::move(to), std::move(push));
574
575 if (transitions.find(key) != transitions.end()) {
576 if(transitions.find(key)->second == value)
577 return false;
578 else
579 throw AutomatonException("Transition (\"" + ext::to_string ( std::get<0>(key) ) + "\", \"" + ext::to_string ( std::get<1>(key) ) + "\", \"" + ext::to_string ( std::get<2>(key) ) + "\") -> ?? already exists.");
580 }
581
582 if ( std::get < 1 > ( key ).is_epsilon ( ) ) {
584 if(std::get<0>(transition.first) == std::get<0>(key) && std::get<2>(transition.first) == std::get<2>(key)) return true;
585 return false;
586 }))
587 throw AutomatonException("Conflicting transition");
588 } else {
590 if(transitions.find(key2) != transitions.end())
591 throw AutomatonException("Conflicting transition");
592 }
593
594 transitions.insert ( std::move(key), std::move(value) );
595 return true;
596}
597
598template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
600 common::symbol_or_epsilon < InputSymbolType > inputVariant(std::move(input));
601 return addTransition(std::move(from), std::move(inputVariant), std::move(pop), std::move(to), std::move(push));
602}
603
604template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
606 auto inputVariant = common::symbol_or_epsilon < InputSymbolType > ( );
607 return addTransition(std::move(from), std::move(inputVariant), std::move(pop), std::move(to), std::move(push));
608}
609
610template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
614
615 if (transitions.find(key) == transitions.end())
616 return false;
617
618 if(transitions.find(key)->second != value) {
619 throw AutomatonException("Transition (\"" + ext::to_string ( from ) + "\", \"" + ext::to_string ( input ) + "\") -> \"" + ext::to_string ( to ) + "\" doesn't exist.");
620 }
621
622 transitions.erase(key);
623 return true;
624}
625
626template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
629 return removeTransition(from, inputVariant, pop, to, push);
630}
631
632template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
634 auto inputVariant = common::symbol_or_epsilon < InputSymbolType > ( );
635 return removeTransition(from, inputVariant, pop, to, push);
636}
637
638template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
640 return transitions;
641}
642
643template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
645 return std::move ( transitions );
646}
647
648} /* namespace automaton */
649
650namespace core {
651
659template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
660class SetConstraint< automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, InputSymbolType, automaton::InputAlphabet > {
661public:
671 for ( const std::pair<const ext::tuple<StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType>, ext::pair<StateType, ext::vector<PushdownStoreSymbolType> > >& transition : automaton.getTransitions())
672 if ( ! std::get<1>(transition.first).is_epsilon ( ) && symbol == std::get<1>(transition.first).getSymbol ( ) )
673 return true;
674
675 return false;
676 }
677
687 return true;
688 }
689
697 }
698};
699
707template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
708class SetConstraint< automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, PushdownStoreSymbolType, automaton::PushdownStoreAlphabet > {
709public:
718 static bool used ( const automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & automaton, const PushdownStoreSymbolType & symbol ) {
719 for ( const std::pair<const ext::tuple<StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType>, ext::pair<StateType, ext::vector<PushdownStoreSymbolType> > >& transition : automaton.getTransitions())
720 if (symbol == std::get<2>(transition.first) || std::find(transition.second.second.begin(), transition.second.second.end(), symbol) != transition.second.second.end())
721 return true;
722
723 if(automaton.getInitialSymbol() == symbol)
724 return true;
725
726 return false;
727 }
728
738 return true;
739 }
740
747 static void valid ( const automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType & ) {
748 }
749};
750
758template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
759class ElementConstraint< automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, PushdownStoreSymbolType, automaton::InitialSymbol > {
760public:
769 static bool available ( const automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & automaton, const PushdownStoreSymbolType & symbol ) {
770 return automaton.template accessComponent < automaton::PushdownStoreAlphabet > ( ).get ( ).count ( symbol );
771 }
772
779 static void valid ( const automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType & ) {
780 }
781};
782
790template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
791class SetConstraint< automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, StateType, automaton::States > {
792public:
802 if ( automaton.getInitialState ( ) == state )
803 return true;
804
805 if ( automaton.getFinalStates ( ).count ( state ) )
806 return true;
807
808 for ( const std::pair<const ext::tuple<StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType>, ext::pair<StateType, ext::vector<PushdownStoreSymbolType> > >& transition : automaton.getTransitions())
809 if (state == std::get<0>(transition.first) || transition.second.first == state)
810 return true;
811
812 return false;
813 }
814
824 return true;
825 }
826
834 }
835};
836
844template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
845class SetConstraint< automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, StateType, automaton::FinalStates > {
846public:
856 return false;
857 }
858
868 return automaton.template accessComponent < automaton::States > ( ).get ( ).count ( state );
869 }
870
878 }
879};
880
888template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
889class ElementConstraint< automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType >, StateType, automaton::InitialState > {
890public:
900 return automaton.template accessComponent < automaton::States > ( ).get ( ).count ( state );
901 }
902
910 }
911};
912
918template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
919struct normalize < automaton::SinglePopDPDA < InputSymbolType, PushdownStoreSymbolType, StateType > > {
921 ext::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getInputAlphabet ( ) );
922 ext::set < DefaultSymbolType > pushdownAlphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getPushdownStoreAlphabet ( ) );
923 DefaultSymbolType initialSymbol = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( value ).getInitialSymbol ( ) );
924 ext::set < DefaultStateType > states = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getStates ( ) );
925 DefaultStateType initialState = automaton::AutomatonNormalize::normalizeState ( std::move ( value ).getInitialState ( ) );
926 ext::set < DefaultStateType > finalStates = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getFinalStates ( ) );
927
928 automaton::SinglePopDPDA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( pushdownAlphabet ), std::move ( initialState ), std::move ( initialSymbol ), std::move ( finalStates ) );
929
930 for ( std::pair < ext::tuple < StateType, common::symbol_or_epsilon < InputSymbolType >, PushdownStoreSymbolType >, ext::pair < StateType, ext::vector < PushdownStoreSymbolType > > > && transition : ext::make_mover ( std::move ( value ).getTransitions ( ) ) ) {
931 DefaultStateType to = automaton::AutomatonNormalize::normalizeState ( std::move ( transition.second.first ) );
932 ext::vector < DefaultSymbolType > push = alphabet::SymbolNormalize::normalizeSymbols ( std::move ( transition.second.second ) );
933
934 DefaultSymbolType pop = alphabet::SymbolNormalize::normalizeSymbol ( std::move ( std::get < 2 > ( transition.first ) ) );
935 DefaultStateType from = automaton::AutomatonNormalize::normalizeState ( std::move ( std::get < 0 > ( transition.first ) ) );
936 common::symbol_or_epsilon < DefaultSymbolType > input = automaton::AutomatonNormalize::normalizeSymbolEpsilon ( std::move ( std::get < 1 > ( transition.first ) ) );
937
938 res.addTransition ( std::move ( from ), std::move ( input ), std::move ( pop ), std::move ( to ), std::move ( push ) );
939 }
940
941 return res;
942 }
943};
944
945} /* namespace core */
946
947extern template class automaton::SinglePopDPDA < >;
948
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
Deterministic pushdown automaton requiring a symbol pop from pushdown store on each transition use....
Definition: SinglePopDPDA.h:78
StateTypeT StateType
Definition: SinglePopDPDA.h:82
PushdownStoreSymbolTypeT PushdownStoreSymbolType
Definition: SinglePopDPDA.h:81
void removeInputSymbol(const InputSymbolType &symbol)
Definition: SinglePopDPDA.h:379
StateType && getInitialState() &&
Definition: SinglePopDPDA.h:125
const ext::set< PushdownStoreSymbolType > & getPushdownStoreAlphabet() const &
Definition: SinglePopDPDA.h:243
const StateType & getInitialState() const &
Definition: SinglePopDPDA.h:116
bool setInitialState(StateType state)
Definition: SinglePopDPDA.h:136
ext::set< StateType > && getStates() &&
Definition: SinglePopDPDA.h:154
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: SinglePopDPDA.h:611
ext::set< PushdownStoreSymbolType > && getPushdownStoreAlphabet() &&
Definition: SinglePopDPDA.h:252
ext::set< InputSymbolType > && getInputAlphabet() &&
Definition: SinglePopDPDA.h:339
void addInputSymbols(ext::set< InputSymbolType > symbols)
Definition: SinglePopDPDA.h:359
void removeState(const StateType &state)
Definition: SinglePopDPDA.h:185
const ext::set< InputSymbolType > & getInputAlphabet() const &
Definition: SinglePopDPDA.h:330
void addPushdownStoreSymbols(ext::set< PushdownStoreSymbolType > symbols)
Definition: SinglePopDPDA.h:272
void removeFinalState(const StateType &state)
Definition: SinglePopDPDA.h:234
const ext::set< StateType > & getFinalStates() const &
Definition: SinglePopDPDA.h:194
void setFinalStates(ext::set< StateType > states)
Definition: SinglePopDPDA.h:223
PushdownStoreSymbolType && getInitialSymbol() &&
Definition: SinglePopDPDA.h:310
InputSymbolTypeT InputSymbolType
Definition: SinglePopDPDA.h:80
bool operator==(const SinglePopDPDA &other) const
Definition: SinglePopDPDA.h:515
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: SinglePopDPDA.h:549
SinglePopDPDA(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: SinglePopDPDA.h:541
bool addState(StateType state)
Definition: SinglePopDPDA.h:165
bool addPushdownStoreSymbol(PushdownStoreSymbolType symbol)
Definition: SinglePopDPDA.h:263
void removePushdownStoreSymbol(const PushdownStoreSymbolType &symbol)
Definition: SinglePopDPDA.h:292
void setInputAlphabet(ext::set< InputSymbolType > symbols)
Definition: SinglePopDPDA.h:368
const ext::set< StateType > & getStates() const &
Definition: SinglePopDPDA.h:145
bool addFinalState(StateType state)
Definition: SinglePopDPDA.h:214
friend ext::ostream & operator<<(ext::ostream &out, const SinglePopDPDA &instance)
Definition: SinglePopDPDA.h:527
void setStates(ext::set< StateType > states)
Definition: SinglePopDPDA.h:174
bool addInputSymbol(InputSymbolType symbol)
Definition: SinglePopDPDA.h:350
ext::set< StateType > && getFinalStates() &&
Definition: SinglePopDPDA.h:203
const PushdownStoreSymbolType & getInitialSymbol() const &
Definition: SinglePopDPDA.h:301
void setPushdownStoreAlphabet(ext::set< PushdownStoreSymbolType > symbols)
Definition: SinglePopDPDA.h:281
bool setInitialSymbol(PushdownStoreSymbolType symbol)
Definition: SinglePopDPDA.h:321
const ext::map< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, PushdownStoreSymbolType >, ext::pair< StateType, ext::vector< PushdownStoreSymbolType > > > & getTransitions() const &
Definition: SinglePopDPDA.h:639
Definition: symbol_or_epsilon.hpp:24
Definition: components.hpp:181
static void valid(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType &)
Definition: SinglePopDPDA.h:779
static bool available(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const PushdownStoreSymbolType &symbol)
Definition: SinglePopDPDA.h:769
static bool available(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const StateType &state)
Definition: SinglePopDPDA.h:899
static void valid(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopDPDA.h:909
Definition: components.hpp:25
static void valid(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopDPDA.h:833
static bool used(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const StateType &state)
Definition: SinglePopDPDA.h:801
static bool available(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopDPDA.h:823
static void valid(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopDPDA.h:877
static bool used(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const StateType &)
Definition: SinglePopDPDA.h:855
static bool available(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const StateType &state)
Definition: SinglePopDPDA.h:867
static void valid(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const InputSymbolType &)
Definition: SinglePopDPDA.h:696
static bool available(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const InputSymbolType &)
Definition: SinglePopDPDA.h:686
static bool used(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const InputSymbolType &symbol)
Definition: SinglePopDPDA.h:670
static bool used(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &automaton, const PushdownStoreSymbolType &symbol)
Definition: SinglePopDPDA.h:718
static bool available(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType &)
Definition: SinglePopDPDA.h:737
static void valid(const automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &, const PushdownStoreSymbolType &)
Definition: SinglePopDPDA.h:747
Definition: setComponents.hpp:26
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.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
any_of(T &&...) -> any_of< T... >
auto & get(ext::ptr_array< Type, N > &tpl)
Specialisation of get function for pointer arrays.
Definition: ptr_array.hpp:693
static automaton::SinglePopDPDA< > eval(automaton::SinglePopDPDA< InputSymbolType, PushdownStoreSymbolType, StateType > &&value)
Definition: SinglePopDPDA.h:920
Definition: normalize.hpp:13