Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
EpsilonNFTA.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 <alib/multimap>
29#include <alib/set>
30#include <alib/vector>
31
32#include <core/components.hpp>
33
34#include <core/normalize.hpp>
35
38
40
41#include <core/normalize.hpp>
44
45#include "DFTA.h"
46#include "NFTA.h"
47
48namespace automaton {
49
50class InputAlphabet;
51class States;
52class FinalStates;
53
72template < class SymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType >
73class EpsilonNFTA final : public core::Components < EpsilonNFTA < SymbolTypeT, StateTypeT >, ext::set < common::ranked_symbol < SymbolTypeT > >, component::Set, InputAlphabet, ext::set < StateTypeT >, component::Set, std::tuple < States, FinalStates > > {
74public:
75 typedef SymbolTypeT SymbolType;
76 typedef StateTypeT StateType;
77
78private:
83
84public:
88 explicit EpsilonNFTA ( );
89
98
99 /*
100 * \brief Creates a new instance of the automaton based on the Deterministic finite tree automaton.
101 *
102 * \param other the Deterministic finite tree automaton
103 */
104 explicit EpsilonNFTA ( const NFTA < SymbolType, StateType > & other );
105
106 /*
107 * \brief Creates a new instance of the automaton based on the Deterministic finite tree automaton.
108 *
109 * \param other the Deterministic finite tree automaton
110 */
111 explicit EpsilonNFTA ( const DFTA < SymbolType, StateType > & other );
112
118 const ext::set < StateType > & getStates ( ) const & {
119 return this->template accessComponent < States > ( ).get ( );
120 }
121
128 return std::move ( this->template accessComponent < States > ( ).get ( ) );
129 }
130
138 bool addState ( StateType state ) {
139 return this->template accessComponent < States > ( ).add ( std::move ( state ) );
140 }
141
148 this->template accessComponent < States > ( ).set ( std::move ( states ) );
149 }
150
158 void removeState ( const StateType & state ) {
159 this->template accessComponent < States > ( ).remove ( state );
160 }
161
168 return this->template accessComponent < FinalStates > ( ).get ( );
169 }
170
177 return std::move ( this->template accessComponent < FinalStates > ( ).get ( ) );
178 }
179
187 bool addFinalState ( StateType state ) {
188 return this->template accessComponent < FinalStates > ( ).add ( std::move ( state ) );
189 }
190
197 this->template accessComponent < FinalStates > ( ).set ( std::move ( states ) );
198 }
199
207 void removeFinalState ( const StateType & state ) {
208 this->template accessComponent < FinalStates > ( ).remove ( state );
209 }
210
217 return this->template accessComponent < InputAlphabet > ( ).get ( );
218 }
219
226 return std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) );
227 }
228
237 return this->template accessComponent < InputAlphabet > ( ).add ( std::move ( symbol ) );
238 }
239
246 this->template accessComponent < InputAlphabet > ( ).add ( std::move ( symbols ) );
247 }
248
255 this->template accessComponent < InputAlphabet > ( ).set ( std::move ( symbols ) );
256 }
257
266 this->template accessComponent < InputAlphabet > ( ).remove ( symbol );
267 }
268
282
297
310 bool addTransition ( StateType from, StateType to );
311
323
335 bool removeTransition ( const common::ranked_symbol < SymbolType > & symbol, const ext::vector < StateType > & prevStates, const StateType & next );
336
347 bool removeTransition ( const StateType & from, const StateType & to );
348
355 return transitions;
356 }
357
364 return std::move ( transitions );
365 }
366
373
380
386
387 for ( const auto & transition : getTransitions ( ) )
388 if ( transition.second == q )
389 res.insert ( transition );
390
391 return res;
392 }
393
399
400 for ( const auto & transition : getTransitions ( ) ) {
401 if ( transition.first.template is < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( ) ) {
402 const ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > & source = transition.first.template get < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( );
403 if ( std::find ( source.second.begin ( ), source.second.end ( ), q ) != source.second.end ( ) ) {
404 res.insert ( transition );
405 }
406 }
407 if ( transition.first.template is < StateType > ( ) ) {
408 const StateType & source = transition.first.template get < StateType > ( );
409 if ( source == q ) {
410 res.insert ( transition );
411 }
412 }
413 }
414
415 return res;
416 }
417
426
435
441 bool isEpsilonFree ( ) const;
442
451 bool isDeterministic ( ) const;
452
460 auto operator <=> ( const EpsilonNFTA & other ) const {
461 return std::tie(getStates(), getInputAlphabet(), getFinalStates(), transitions) <=> std::tie(other.getStates(), other.getInputAlphabet(), other.getFinalStates(), other.transitions);
462 }
463
471 bool operator == ( const EpsilonNFTA & other ) const {
472 return std::tie(getStates(), getInputAlphabet(), getFinalStates(), transitions) == std::tie(other.getStates(), other.getInputAlphabet(), other.getFinalStates(), other.transitions);
473 }
474
483 friend ext::ostream & operator << ( ext::ostream & out, const EpsilonNFTA & instance ) {
484 return out << "(EpsilonNFTA "
485 << " states = " << instance.getStates ( )
486 << " inputAlphabet = " << instance.getInputAlphabet ( )
487 << " finalStates = " << instance.getFinalStates ( )
488 << " transitions = " << instance.getTransitions ( )
489 << ")";
490 }
491};
492
498template < class T >
499class isEpsilonNFTA_impl : public std::false_type {};
500
509template < class SymbolType, class StateType >
510class isEpsilonNFTA_impl < EpsilonNFTA < SymbolType, StateType > > : public std::true_type {};
511
517template < class T >
519
520template < class SymbolType, class StateType >
521EpsilonNFTA < SymbolType, StateType >::EpsilonNFTA ( ext::set < StateType > states, ext::set < common::ranked_symbol < SymbolType > > inputAlphabet, ext::set < StateType > finalStates ) : core::Components < EpsilonNFTA, ext::set < common::ranked_symbol < SymbolType > >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates > > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( finalStates ) ) {
522}
523
524template < class SymbolType, class StateType >
526}
527
528template < class SymbolType, class StateType >
529EpsilonNFTA < SymbolType, StateType >::EpsilonNFTA(const NFTA < SymbolType, StateType > & other) : EpsilonNFTA ( other.getStates(), other.getInputAlphabet(), other.getFinalStates() ) {
530 transitions.insert ( other.getTransitions ( ).begin ( ), other.getTransitions ( ).end ( ) );
531}
532
533template < class SymbolType, class StateType >
534EpsilonNFTA < SymbolType, StateType >::EpsilonNFTA(const DFTA < SymbolType, StateType > & other) : EpsilonNFTA ( other.getStates(), other.getInputAlphabet(), other.getFinalStates() ) {
535 transitions.insert ( other.getTransitions ( ).begin ( ), other.getTransitions ( ).end ( ) );
536}
537
538template < class SymbolType, class StateType >
540 if ( lhs.template is < StateType > ( ) ) {
541 const StateType & source = lhs.template get < StateType > ( );
542 if ( ! getStates().contains ( source ) )
543 throw AutomatonException("State \"" + ext::to_string ( source ) + "\" doesn't exist.");
544 } else {
545 const ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > & source = lhs.template get < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( );
546 if ( source.second.size ( ) != source.first.getRank ( ) )
547 throw AutomatonException("Number of states doesn't match rank of the symbol");
548
549 if ( ! getInputAlphabet ( ).contains ( source.first ) )
550 throw AutomatonException("Input symbol \"" + ext::to_string ( source.first ) + "\" doesn't exist.");
551
552 for ( const StateType & it : source.second ) {
553 if ( ! getStates ( ).contains ( it ) )
554 throw AutomatonException("State \"" + ext::to_string ( it ) + "\" doesn't exist.");
555 }
556 }
557
558 if ( ! getStates().contains ( rhs ) )
559 throw AutomatonException("State \"" + ext::to_string ( rhs ) + "\" doesn't exist.");
560
561 auto upper_bound = transitions.upper_bound ( lhs );
562 auto lower_bound = transitions.lower_bound ( lhs );
563 auto iter = std::lower_bound ( lower_bound, upper_bound, rhs, [ ] ( const auto & transition, const auto & target ) { return transition.second < target; } );
564 if ( iter != upper_bound && rhs >= iter->second )
565 return false;
566
567 transitions.insert ( iter, std::make_pair ( std::move ( lhs ), std::move ( rhs ) ) );
568 return true;
569}
570
571template < class SymbolType, class StateType >
573 return addTransition ( ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( ext::make_pair ( std::move ( symbol ), std::move ( prevStates ) ) ), std::move ( next ) );
574}
575
576template < class SymbolType, class StateType >
578 return addTransition ( ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( std::move ( from ) ), std::move ( to ) );
579}
580
581template < class SymbolType, class StateType >
583 auto upper_bound = transitions.upper_bound ( lhs );
584 auto lower_bound = transitions.lower_bound ( lhs );
585 auto iter = std::find_if ( lower_bound, upper_bound, [ & ] ( const auto & transition ) { return transition.second == rhs; } );
586 if ( iter == upper_bound )
587 return false;
588
589 transitions.erase ( iter );
590 return true;
591}
592
593template < class SymbolType, class StateType >
595 return removeTransition ( ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( ext::make_pair ( std::move ( symbol ), std::move ( prevStates ) ) ), std::move ( next ) );
596}
597
598template < class SymbolType, class StateType >
600 return removeTransition ( ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( std::move ( from ) ), std::move ( to ) );
601}
602
603template<class SymbolType, class StateType >
606
607 for ( const std::pair < const ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > >, StateType > & transition : transitions )
608 if ( transition.first.template is < StateType > ( ) )
609 result.insert ( transition.first.template get < StateType > ( ), transition.second );
610
611 return result;
612}
613
614template<class SymbolType, class StateType >
617
618 for ( const std::pair < const ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > >, StateType > & transition : transitions ) {
619 if ( transition.first.template is < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( ) ) {
620 const ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > & source = transition.first.template get < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( );
621 result.insert ( source, transition.second );
622 }
623 }
624
625 return result;
626}
627
628template<class SymbolType, class StateType >
630 if ( !getStates ( ).contains ( from ) )
631 throw AutomatonException ( "State \"" + ext::to_string ( from ) + "\" doesn't exist" );
632
634 for ( const auto & transition : transitions.equal_range ( from ) )
635 res.insert ( from, transition.second );
636
637 return res;
638}
639
640template<class SymbolType, class StateType >
642 if ( !getStates ( ).contains ( to ) )
643 throw AutomatonException ( "State \"" + ext::to_string ( to ) + "\" doesn't exist" );
644
646 for ( const auto & transition : transitions )
647 if ( transition.second == to && transition.first.template is < StateType > ( ) )
648 res.insert ( transition.first.template get < StateType > ( ), to );
649
650 return res;
651}
652
653template<class SymbolType, class StateType >
655 for ( const std::pair < const ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > >, StateType > & transition : transitions )
656 if ( transition.first.template is < StateType > ( ) )
657 return false;
658
659 return true;
660}
661
662template < class SymbolType, class StateType >
664 if ( transitions.empty ( ) )
665 return true;
666
667 for ( auto iter = transitions.begin ( ); std::next ( iter ) != transitions.end ( ); ++ iter )
668 if ( iter->first == std::next ( iter )->first )
669 return false;
670
671 return isEpsilonFree ( );
672}
673
674} /* namespace automaton */
675
676namespace core {
677
684template < class SymbolType, class StateType >
685class SetConstraint< automaton::EpsilonNFTA < SymbolType, StateType >, common::ranked_symbol < SymbolType >, automaton::InputAlphabet > {
686public:
696 for ( const std::pair < const ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > >, StateType > & t : automaton.getTransitions())
697 if ( t.first.template is < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( ) ) {
698 const ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > & source = t.first.template get < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( );
699 if ( source.first == symbol)
700 return true;
701 }
702
703 return false;
704 }
705
715 return true;
716 }
717
725 }
726};
727
734template < class SymbolType, class StateType >
735class SetConstraint< automaton::EpsilonNFTA < SymbolType, StateType >, StateType, automaton::States > {
736public:
746 if ( automaton.getFinalStates ( ).contains ( state ) )
747 return true;
748
749 for ( const std::pair < const ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > >, StateType > & t : automaton.getTransitions ( ) ) {
750 if ( t.first.template is < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( ) ) {
751 const ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > & source = t.first.template get < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( );
752 if ( ext::contains ( source.second.begin ( ), source.second.end ( ), state ) ) {
753 return true;
754 }
755 }
756 if ( t.first.template is < StateType > ( ) ) {
757 if ( t.first.template get < StateType > ( ) == state ) {
758 return true;
759 }
760 }
761 if ( t . second == state ) {
762 return true;
763 }
764 }
765
766 return false;
767 }
768
778 return true;
779 }
780
788 }
789};
790
797template < class SymbolType, class StateType >
798class SetConstraint< automaton::EpsilonNFTA < SymbolType, StateType >, StateType, automaton::FinalStates > {
799public:
809 return false;
810 }
811
821 return automaton.template accessComponent < automaton::States > ( ).get ( ).contains ( state );
822 }
823
831 }
832};
833
839template < class SymbolType, class StateType >
840struct normalize < automaton::EpsilonNFTA < SymbolType, StateType > > {
843 ext::set < DefaultStateType > states = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getStates ( ) );
844 ext::set < DefaultStateType > finalStates = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getFinalStates ( ) );
845
846 automaton::EpsilonNFTA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( finalStates ) );
847
848 for ( std::pair < ext::variant < StateType, ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > >, StateType > && transition : ext::make_mover ( std::move ( value ).getTransitions ( ) ) ) {
849 DefaultStateType to = automaton::AutomatonNormalize::normalizeState ( std::move ( transition.second ) );
850 if ( transition.first.template is < StateType > ( ) ) {
851 DefaultStateType from = automaton::AutomatonNormalize::normalizeState ( std::move ( transition.first.template get < StateType > ( ) ) );
852 res.addTransition ( from, to );
853 } else {
854 ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > & source = transition.first.template get < ext::pair < common::ranked_symbol < SymbolType >, ext::vector < StateType > > > ( );
855
858
859 res.addTransition ( std::move ( input ), std::move ( from ), std::move ( to ) );
860 }
861 }
862
863 return res;
864 }
865};
866
867} /* namespace core */
868
869extern template class automaton::EpsilonNFTA < >;
static common::ranked_symbol< DefaultSymbolType > normalizeRankedSymbol(common::ranked_symbol< SymbolType > &&symbol)
Definition: SymbolNormalize.h:81
static ext::set< common::ranked_symbol< DefaultSymbolType > > normalizeRankedAlphabet(ext::set< common::ranked_symbol< SymbolType > > &&symbols)
Definition: SymbolNormalize.h:59
Definition: AutomatonException.h:15
static DefaultStateType normalizeState(StateType &&state)
Definition: AutomatonNormalize.h:76
static ext::multiset< DefaultStateType > normalizeStates(ext::multiset< StateType > &&states)
Definition: AutomatonNormalize.h:49
Nondeterministic finite tree automaton without epsilon transitions. Accepts regular tree languages.
Definition: DFTA.h:74
Epsilon nondeterministic finite tree automaton. Accepts regular tree languages.
Definition: EpsilonNFTA.h:73
ext::multimap< ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > >, StateType > getSymbolTransitions() const
Definition: EpsilonNFTA.h:615
ext::multimap< ext::variant< StateType, ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > > >, StateType > && getTransitions() &&
Definition: EpsilonNFTA.h:363
StateTypeT StateType
Definition: EpsilonNFTA.h:76
friend ext::ostream & operator<<(ext::ostream &out, const EpsilonNFTA &instance)
Definition: EpsilonNFTA.h:483
void removeInputSymbol(const common::ranked_symbol< SymbolType > &symbol)
Definition: EpsilonNFTA.h:265
ext::multimap< StateType, StateType > getEpsilonTransitions() const
Definition: EpsilonNFTA.h:604
void removeState(const StateType &state)
Definition: EpsilonNFTA.h:158
bool addState(StateType state)
Definition: EpsilonNFTA.h:138
bool operator==(const EpsilonNFTA &other) const
Definition: EpsilonNFTA.h:471
ext::multimap< ext::variant< StateType, ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > > >, StateType > getTransitionsFromState(const StateType &q) const
Definition: EpsilonNFTA.h:397
bool isEpsilonFree() const
Determines whether the automaton is without epsilon transitions.
Definition: EpsilonNFTA.h:654
void addInputSymbols(ext::set< common::ranked_symbol< SymbolType > > symbols)
Definition: EpsilonNFTA.h:245
const ext::set< StateType > & getFinalStates() const &
Definition: EpsilonNFTA.h:167
void removeFinalState(const StateType &state)
Definition: EpsilonNFTA.h:207
SymbolTypeT SymbolType
Definition: EpsilonNFTA.h:75
const ext::set< StateType > & getStates() const &
Definition: EpsilonNFTA.h:118
void setStates(ext::set< StateType > states)
Definition: EpsilonNFTA.h:147
auto operator<=>(const EpsilonNFTA &other) const
Definition: EpsilonNFTA.h:460
void setFinalStates(ext::set< StateType > states)
Definition: EpsilonNFTA.h:196
bool addTransition(ext::variant< StateType, ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > > > lhs, StateType rhs)
Add a transition to the automaton.
Definition: EpsilonNFTA.h:539
bool removeTransition(const ext::variant< StateType, ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > > > &lhs, const StateType &rhs)
Removes a transition from the automaton.
Definition: EpsilonNFTA.h:582
bool isDeterministic() const
Determines whether the automaton is deterministic.
Definition: EpsilonNFTA.h:663
const ext::multimap< ext::variant< StateType, ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > > >, StateType > & getTransitions() const &
Definition: EpsilonNFTA.h:354
ext::multimap< StateType, StateType > getEpsilonTransitionsFromState(const StateType &from) const
Definition: EpsilonNFTA.h:629
EpsilonNFTA()
Creates a new instance of the automaton.
Definition: EpsilonNFTA.h:525
ext::set< StateType > && getStates() &&
Definition: EpsilonNFTA.h:127
bool addFinalState(StateType state)
Definition: EpsilonNFTA.h:187
const ext::set< common::ranked_symbol< SymbolType > > & getInputAlphabet() const &
Definition: EpsilonNFTA.h:216
void setInputAlphabet(ext::set< common::ranked_symbol< SymbolType > > symbols)
Definition: EpsilonNFTA.h:254
ext::set< StateType > && getFinalStates() &&
Definition: EpsilonNFTA.h:176
ext::multimap< ext::variant< StateType, ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > > >, StateType > getTransitionsToState(const StateType &q) const
Definition: EpsilonNFTA.h:384
bool addInputSymbol(common::ranked_symbol< SymbolType > symbol)
Definition: EpsilonNFTA.h:236
ext::set< common::ranked_symbol< SymbolType > > && getInputAlphabet() &&
Definition: EpsilonNFTA.h:225
ext::multimap< StateType, StateType > getEpsilonTransitionsToState(const StateType &to) const
Definition: EpsilonNFTA.h:641
Nondeterministic finite tree automaton without epsilon transitions. Accepts regular tree languages.
Definition: NFTA.h:72
Definition: EpsilonNFTA.h:499
Definition: ranked_symbol.hpp:20
Definition: components.hpp:181
static void valid(const automaton::EpsilonNFTA< SymbolType, StateType > &, const StateType &)
Definition: EpsilonNFTA.h:787
static bool available(const automaton::EpsilonNFTA< SymbolType, StateType > &, const StateType &)
Definition: EpsilonNFTA.h:777
static bool used(const automaton::EpsilonNFTA< SymbolType, StateType > &automaton, const StateType &state)
Definition: EpsilonNFTA.h:745
static bool used(const automaton::EpsilonNFTA< SymbolType, StateType > &, const StateType &)
Definition: EpsilonNFTA.h:808
static bool available(const automaton::EpsilonNFTA< SymbolType, StateType > &automaton, const StateType &state)
Definition: EpsilonNFTA.h:820
static void valid(const automaton::EpsilonNFTA< SymbolType, StateType > &, const StateType &)
Definition: EpsilonNFTA.h:830
static bool available(const automaton::EpsilonNFTA< SymbolType, StateType > &, const common::ranked_symbol< SymbolType > &)
Definition: EpsilonNFTA.h:714
static bool used(const automaton::EpsilonNFTA< SymbolType, StateType > &automaton, const common::ranked_symbol< SymbolType > &symbol)
Definition: EpsilonNFTA.h:695
static void valid(const automaton::EpsilonNFTA< SymbolType, StateType > &, const common::ranked_symbol< SymbolType > &)
Definition: EpsilonNFTA.h:724
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
Implementation of the variant class allowing to store any type of those listed in the template parame...
Definition: variant.hpp:98
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
p second
Definition: ToRegExpAlgebraic.h:126
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
return res
Definition: MinimizeByPartitioning.h:145
q
Definition: SingleInitialStateEpsilonTransition.h:85
for(const StateType &state :fsm.getStates()) renamingData.insert(std Rename::RenamedAutomaton< T > result(renamingData.at(fsm.getInitialState()))
Definition: Rename.h:253
Definition: ToGrammar.h:31
constexpr bool isEpsilonNFTA
Definition: EpsilonNFTA.h:518
Definition: normalize.hpp:10
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
bool contains(InputIt first, InputIt last, const Element &elem)
Linear version of search in a range of values.
Definition: algorithm.hpp:170
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::EpsilonNFTA< > eval(automaton::EpsilonNFTA< SymbolType, StateType > &&value)
Definition: EpsilonNFTA.h:841
Definition: normalize.hpp:13