Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
ExtendedNFA.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
31#include <ext/algorithm>
32
33#include <core/components.hpp>
35
38
43
45
46#include <core/normalize.hpp>
49
50#include "DFA.h"
51#include "NFA.h"
52#include "CompactNFA.h"
53#include "EpsilonNFA.h"
55
56namespace automaton {
57
58class InputAlphabet;
59class States;
60class FinalStates;
61class InitialState;
62
79template < class SymbolTypeT = DefaultSymbolType, class StateTypeT = DefaultStateType >
80class ExtendedNFA final : public core::Components < ExtendedNFA < SymbolTypeT, StateTypeT >, ext::set < SymbolTypeT >, component::Set, InputAlphabet, ext::set < StateTypeT >, component::Set, std::tuple < States, FinalStates >, StateTypeT, component::Value, InitialState > {
81public:
82 typedef SymbolTypeT SymbolType;
83 typedef StateTypeT StateType;
84
85private:
90
91public:
97 explicit ExtendedNFA ( StateType initialState );
98
107 explicit ExtendedNFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, StateType initialState, ext::set < StateType > finalStates );
108
109 /*
110 * \brief Creates a new instance of the automaton based on the Compact nondeterministic finite automaton.
111 *
112 * \param other the Compact nondeterministic finite automaton
113 */
114 explicit ExtendedNFA ( const CompactNFA < SymbolType, StateType > & other );
115
116 /*
117 * \brief Creates a new instance of the automaton based on the Multi Initial State Epsilon Nondeterministic finite automaton.
118 *
119 * \param other the Multi Initial State Epsilon Nondeterministic finite automaton
120 */
122
123 /*
124 * \brief Creates a new instance of the automaton based on the Epsilon Nondeterministic finite automaton.
125 *
126 * \param other the Epsilon nondeterministic finite automaton
127 */
128 explicit ExtendedNFA ( const EpsilonNFA < SymbolType, StateType > & other );
129
130 /*
131 * \brief Creates a new instance of the automaton based on the Nondeterministic finite automaton with multiple initial states.
132 *
133 * \param other the Nondeterministic finite automaton with multiple initial states
134 */
136
137 /*
138 * \brief Creates a new instance of the automaton based on the Nondeterministic finite automaton.
139 *
140 * \param other the Nondeterministic finite automaton
141 */
142 explicit ExtendedNFA ( const NFA < SymbolType, StateType > & other );
143
144 /*
145 * \brief Creates a new instance of the automaton based on the Deterministic finite automaton.
146 *
147 * \param other the Deterministic finite automaton
148 */
149 explicit ExtendedNFA ( const DFA < SymbolType, StateType > & other );
150
156 const StateType & getInitialState ( ) const & {
157 return this->template accessComponent < InitialState > ( ).get ( );
158 }
159
166 return std::move ( this->template accessComponent < InitialState > ( ).get ( ) );
167 }
168
176 bool setInitialState ( StateType state ) {
177 return this->template accessComponent < InitialState > ( ).set ( std::move ( state ) );
178 }
179
185 const ext::set < StateType > & getStates ( ) const & {
186 return this->template accessComponent < States > ( ).get ( );
187 }
188
195 return std::move ( this->template accessComponent < States > ( ).get ( ) );
196 }
197
205 bool addState ( StateType state ) {
206 return this->template accessComponent < States > ( ).add ( std::move ( state ) );
207 }
208
215 this->template accessComponent < States > ( ).set ( std::move ( states ) );
216 }
217
225 void removeState ( const StateType & state ) {
226 this->template accessComponent < States > ( ).remove ( state );
227 }
228
235 return this->template accessComponent < FinalStates > ( ).get ( );
236 }
237
244 return std::move ( this->template accessComponent < FinalStates > ( ).get ( ) );
245 }
246
254 bool addFinalState ( StateType state ) {
255 return this->template accessComponent < FinalStates > ( ).add ( std::move ( state ) );
256 }
257
264 this->template accessComponent < FinalStates > ( ).set ( std::move ( states ) );
265 }
266
274 void removeFinalState ( const StateType & state ) {
275 this->template accessComponent < FinalStates > ( ).remove ( state );
276 }
277
284 return this->template accessComponent < InputAlphabet > ( ).get ( );
285 }
286
293 return std::move ( this->template accessComponent < InputAlphabet > ( ).get ( ) );
294 }
295
303 bool addInputSymbol ( SymbolType symbol ) {
304 return this->template accessComponent < InputAlphabet > ( ).add ( std::move ( symbol ) );
305 }
306
313 this->template accessComponent < InputAlphabet > ( ).add ( std::move ( symbols ) );
314 }
315
322 this->template accessComponent < InputAlphabet > ( ).set ( std::move ( symbols ) );
323 }
324
332 void removeInputSymbol ( const SymbolType & symbol ) {
333 this->template accessComponent < InputAlphabet > ( ).remove ( symbol );
334 }
335
350
362 bool removeTransition ( const StateType & from, const regexp::UnboundedRegExpStructure < SymbolType > & input, const StateType & to );
363
370
376 ext::multimap < ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > && getTransitions ( ) &&;
377
385 ext::multimap < ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > getTransitionsFromState ( const StateType & from ) const;
386
394 ext::multimap < ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > getTransitionsToState ( const StateType & to ) const;
395
403 auto operator <=> ( const ExtendedNFA & other ) const {
404 return std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions ) <=> std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
405 }
406
414 bool operator == ( const ExtendedNFA & other ) const {
415 return std::tie ( getStates ( ), getInputAlphabet ( ), getInitialState ( ), getFinalStates ( ), transitions ) == std::tie ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ), other.getTransitions ( ) );
416 }
417
426 friend ext::ostream & operator << ( ext::ostream & out, const ExtendedNFA & instance ) {
427 return out << "(ExtendedNFA"
428 << " states = " << instance.getStates ( )
429 << " inputAlphabet = " << instance.getInputAlphabet ( )
430 << " initialState = " << instance.getInitialState ( )
431 << " finalStates = " << instance.getFinalStates ( )
432 << " transitions = " << instance.getTransitions ( )
433 << ")";
434 }
435};
436
442template < class T >
443class isExtendedNFA_impl : public std::false_type {};
444
453template < class SymbolType, class StateType >
454class isExtendedNFA_impl < ExtendedNFA < SymbolType, StateType > > : public std::true_type {};
455
461template < class T >
463
464template<class SymbolType, class StateType >
465ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( ext::set < StateType > states, ext::set < SymbolType > inputAlphabet, StateType initialState, ext::set < StateType > finalStates ) : core::Components < ExtendedNFA, ext::set < SymbolType >, component::Set, InputAlphabet, ext::set < StateType >, component::Set, std::tuple < States, FinalStates >, StateType, component::Value, InitialState > ( std::move ( inputAlphabet ), std::move ( states ), std::move ( finalStates ), std::move ( initialState ) ) {
466}
467
468template<class SymbolType, class StateType >
470}
471
472template<class SymbolType, class StateType >
473ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( const CompactNFA < SymbolType, StateType > & other ) : ExtendedNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) {
474 for ( const auto & transition : other.getTransitions ( ) ) {
476
477 for ( auto & symbol : transition.first.second )
479
481 transitions.insert ( key, transition.second );
482 }
483}
484
485template < class SymbolType, class StateType >
486ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( const MultiInitialStateEpsilonNFA < SymbolType, StateType > & other ) : ExtendedNFA ( other.getStates ( ) + ext::set < StateType > { common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ) }, other.getInputAlphabet ( ), common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ), other.getFinalStates ( ) ) {
487 for ( const auto & transition : other.getTransitions ( ) ) {
488 if ( transition.first.second.is_epsilon ( ) ) {
490 transitions.insert ( key, transition.second );
491 } else {
493 transitions.insert ( key, transition.second );
494 }
495 }
496
498 for ( const StateType & to : other.getInitialStates ( ) )
499 transitions.insert ( key, to );
500}
501
502template < class SymbolType, class StateType >
503ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( const EpsilonNFA < SymbolType, StateType > & other ) : ExtendedNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) {
504 for ( const auto & transition : other.getTransitions ( ) ) {
505 if ( transition.first.second.is_epsilon ( ) ) {
507 transitions.insert ( key, transition.second );
508 } else {
510 transitions.insert ( key, transition.second );
511 }
512 }
513}
514
515template<class SymbolType, class StateType >
516ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( const MultiInitialStateNFA < SymbolType, StateType > & other ) : ExtendedNFA ( other.getStates ( ) + ext::set < StateType > { common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ) }, other.getInputAlphabet ( ), common::createUnique ( label::InitialStateLabel::instance < StateType > ( ), other.getStates ( ) ), other.getFinalStates ( ) ) {
517 for ( const auto & transition : other.getTransitions ( ) ) {
519 transitions.insert ( key, transition.second );
520 }
521
523 for ( const StateType & state : other.getInitialStates ( ) )
524 transitions.insert ( key, state );
525}
526
527template<class SymbolType, class StateType >
528ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( const NFA < SymbolType, StateType > & other ) : ExtendedNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) {
529 for ( const auto & transition : other.getTransitions ( ) ) {
531 transitions.insert ( key, transition.second );
532 }
533}
534
535template<class SymbolType, class StateType >
536ExtendedNFA < SymbolType, StateType >::ExtendedNFA ( const DFA < SymbolType, StateType > & other ) : ExtendedNFA ( other.getStates ( ), other.getInputAlphabet ( ), other.getInitialState ( ), other.getFinalStates ( ) ) {
537 for ( const auto & transition : other.getTransitions ( ) ) {
539 transitions.insert ( key, transition.second );
540 }
541}
542
543template<class SymbolType, class StateType >
545 if ( ! getStates ( ).contains ( from ) )
546 throw AutomatonException ( "State \"" + ext::to_string ( from ) + "\" doesn't exist." );
547
548 ext::set < SymbolType > inputRegExpAlphabet = input.getStructure ( ).computeMinimalAlphabet ( );
549
550 // Transition regexp's alphabet must be subset of automaton's alphabet
551 if ( ! std::includes ( getInputAlphabet ( ).begin ( ), getInputAlphabet ( ).end ( ), inputRegExpAlphabet.begin ( ), inputRegExpAlphabet.end ( ) ) )
552 throw AutomatonException ( "Input string is over different alphabet than automaton" );
553
554 if ( ! getStates ( ).contains ( to ) )
555 throw AutomatonException ( "State \"" + ext::to_string ( to ) + "\" doesn't exist." );
556
557 auto upper_bound = transitions.upper_bound ( ext::tie ( from, input ) );
558 auto lower_bound = transitions.lower_bound ( ext::tie ( from, input ) );
559 auto iter = std::lower_bound ( lower_bound, upper_bound, to, [ ] ( const auto & transition, const auto & target ) { return transition.second < target; } );
560 if ( iter != upper_bound && to >= iter->second )
561 return false;
562
563 ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > > key = ext::make_pair ( std::move ( from ), std::move ( input ) );
564 transitions.insert ( iter, std::make_pair ( std::move ( key ), std::move ( to ) ) );
565 return true;
566}
567
568template<class SymbolType, class StateType >
570 auto upper_bound = transitions.upper_bound ( ext::tie ( from, input ) );
571 auto lower_bound = transitions.lower_bound ( ext::tie ( from, input ) );
572 auto iter = std::find_if ( lower_bound, upper_bound, [ & ] ( const auto & transition ) { return transition.second == to; } );
573 if ( iter == upper_bound )
574 return false;
575
576 transitions.erase ( iter );
577 return true;
578}
579
580template<class SymbolType, class StateType >
582 return transitions;
583}
584
585template<class SymbolType, class StateType >
587 return std::move ( transitions );
588}
589
590template<class SymbolType, class StateType >
592 if ( ! getStates ( ).contains ( from ) )
593 throw AutomatonException ( "State \"" + ext::to_string ( from ) + "\" doesn't exist" );
594
596
597 for ( const std::pair < const ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > & transition : transitions )
598 if ( transition.first.first == from )
599 transitionsFromState.insert ( transition );
600
601 return transitionsFromState;
602}
603
604template<class SymbolType, class StateType >
606 if ( ! getStates ( ).contains ( to ) )
607 throw AutomatonException ( "State \"" + ext::to_string ( to ) + "\" doesn't exist" );
608
610
611 for ( const std::pair < const ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > & transition : transitions )
612 if ( transition.second == to )
613 transitionsToState.insert ( transition );
614
615 return transitionsToState;
616}
617
618} /* namespace automaton */
619
620namespace core {
621
628template<class SymbolType, class StateType >
629class SetConstraint< automaton::ExtendedNFA < SymbolType, StateType >, SymbolType, automaton::InputAlphabet > {
630public:
640 for ( const std::pair < const ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > & transition : automaton.getTransitions ( ) ) {
641 ext::set < SymbolType > alphabet = transition.first.second.getStructure ( ).computeMinimalAlphabet ( );
642 if ( alphabet.contains ( symbol ) )
643 return true;
644 }
645
646 return false;
647 }
648
658 return true;
659 }
660
668 }
669};
670
677template<class SymbolType, class StateType >
678class SetConstraint< automaton::ExtendedNFA < SymbolType, StateType >, StateType, automaton::States > {
679public:
689 if ( automaton.getInitialState ( ) == state )
690 return true;
691
692 if ( automaton.getFinalStates ( ).contains ( state ) )
693 return true;
694
695 for ( const std::pair < const ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > & transition : automaton.getTransitions ( ) )
696 if ( transition.first.first == state || transition.second == state )
697 return true;
698
699 return false;
700 }
701
711 return true;
712 }
713
721 }
722};
723
730template<class SymbolType, class StateType >
731class SetConstraint< automaton::ExtendedNFA < SymbolType, StateType >, StateType, automaton::FinalStates > {
732public:
742 return false;
743}
744
754 return automaton.template accessComponent < automaton::States > ( ).get ( ).contains ( state );
755 }
756
764 }
765};
766
773template<class SymbolType, class StateType >
774class ElementConstraint< automaton::ExtendedNFA < SymbolType, StateType >, StateType, automaton::InitialState > {
775public:
785 return automaton.template accessComponent < automaton::States > ( ).get ( ).contains ( state );
786 }
787
795 }
796};
797
803template < class SymbolType, class StateType >
804struct normalize < automaton::ExtendedNFA < SymbolType, StateType > > {
806 ext::set < DefaultSymbolType > alphabet = alphabet::SymbolNormalize::normalizeAlphabet ( std::move ( value ).getInputAlphabet ( ) );
807 ext::set < DefaultStateType > states = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getStates ( ) );
808 DefaultStateType initialState = automaton::AutomatonNormalize::normalizeState ( std::move ( value ).getInitialState ( ) );
809 ext::set < DefaultStateType > finalStates = automaton::AutomatonNormalize::normalizeStates ( std::move ( value ).getFinalStates ( ) );
810
811 automaton::ExtendedNFA < > res ( std::move ( states ), std::move ( alphabet ), std::move ( initialState ), std::move ( finalStates ) );
812
813 for ( std::pair < ext::pair < StateType, regexp::UnboundedRegExpStructure < SymbolType > >, StateType > && transition : ext::make_mover ( std::move ( value ).getTransitions ( ) ) ) {
814 DefaultStateType from = automaton::AutomatonNormalize::normalizeState ( std::move ( transition.first.first ) );
816 DefaultStateType target = automaton::AutomatonNormalize::normalizeState ( std::move ( transition.second ) );
817
818 res.addTransition ( std::move ( from ), std::move ( input ), std::move ( target ) );
819 }
820
821 return res;
822 }
823};
824
825} /* namespace core */
826
827extern template class automaton::ExtendedNFA < >;
828
static ext::set< DefaultSymbolType > normalizeAlphabet(ext::set< SymbolType > &&symbols)
Definition: SymbolNormalize.h:50
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
static regexp::UnboundedRegExpStructure< DefaultSymbolType > normalizeRegExp(regexp::UnboundedRegExpStructure< SymbolType > &&regexp)
Definition: AutomatonNormalize.h:89
Compact nondeterministic finite automaton. Accepts regular languages. The automaton has a list of sym...
Definition: CompactNFA.h:78
Deterministic finite automaton. Accepts regular languages.
Definition: DFA.h:71
Epsilon nondeterministic finite automaton. Accepts regular languages.
Definition: EpsilonNFA.h:74
Extended nondeterministic finite automaton. Accepts regular languages. The automaton has a regular ex...
Definition: ExtendedNFA.h:80
SymbolTypeT SymbolType
Definition: ExtendedNFA.h:82
bool addTransition(StateType from, regexp::UnboundedRegExpStructure< SymbolType > input, StateType to)
Add a transition to the automaton.
Definition: ExtendedNFA.h:544
void setStates(ext::set< StateType > states)
Definition: ExtendedNFA.h:214
friend ext::ostream & operator<<(ext::ostream &out, const ExtendedNFA &instance)
Definition: ExtendedNFA.h:426
StateTypeT StateType
Definition: ExtendedNFA.h:83
const StateType & getInitialState() const &
Definition: ExtendedNFA.h:156
const ext::set< SymbolType > & getInputAlphabet() const &
Definition: ExtendedNFA.h:283
ext::set< StateType > && getStates() &&
Definition: ExtendedNFA.h:194
void removeInputSymbol(const SymbolType &symbol)
Definition: ExtendedNFA.h:332
void setFinalStates(ext::set< StateType > states)
Definition: ExtendedNFA.h:263
ext::set< SymbolType > && getInputAlphabet() &&
Definition: ExtendedNFA.h:292
ext::multimap< ext::pair< StateType, regexp::UnboundedRegExpStructure< SymbolType > >, StateType > getTransitionsToState(const StateType &to) const
Definition: ExtendedNFA.h:605
const ext::multimap< ext::pair< StateType, regexp::UnboundedRegExpStructure< SymbolType > >, StateType > & getTransitions() const &
Definition: ExtendedNFA.h:581
StateType && getInitialState() &&
Definition: ExtendedNFA.h:165
void removeFinalState(const StateType &state)
Definition: ExtendedNFA.h:274
bool operator==(const ExtendedNFA &other) const
Definition: ExtendedNFA.h:414
const ext::set< StateType > & getStates() const &
Definition: ExtendedNFA.h:185
void removeState(const StateType &state)
Definition: ExtendedNFA.h:225
ext::set< StateType > && getFinalStates() &&
Definition: ExtendedNFA.h:243
void setInputAlphabet(ext::set< SymbolType > symbols)
Definition: ExtendedNFA.h:321
bool removeTransition(const StateType &from, const regexp::UnboundedRegExpStructure< SymbolType > &input, const StateType &to)
Removes a transition from the automaton.
Definition: ExtendedNFA.h:569
bool addState(StateType state)
Definition: ExtendedNFA.h:205
const ext::set< StateType > & getFinalStates() const &
Definition: ExtendedNFA.h:234
ext::multimap< ext::pair< StateType, regexp::UnboundedRegExpStructure< SymbolType > >, StateType > getTransitionsFromState(const StateType &from) const
Definition: ExtendedNFA.h:591
bool setInitialState(StateType state)
Definition: ExtendedNFA.h:176
void addInputSymbols(ext::set< SymbolType > symbols)
Definition: ExtendedNFA.h:312
ExtendedNFA(StateType initialState)
Creates a new instance of the automaton with a concrete initial state.
Definition: ExtendedNFA.h:469
bool addFinalState(StateType state)
Definition: ExtendedNFA.h:254
bool addInputSymbol(SymbolType symbol)
Definition: ExtendedNFA.h:303
Epsilon nondeterministic finite automaton. Accepts regular languages.
Definition: MultiInitialStateEpsilonNFA.h:75
Nondeterministic finite automaton with multiple initial states. Accepts regular languages.
Definition: MultiInitialStateNFA.h:69
Nondeterministic finite automaton. Accepts regular languages.
Definition: NFA.h:66
Definition: ExtendedNFA.h:443
Definition: components.hpp:181
static void valid(const automaton::ExtendedNFA< SymbolType, StateType > &, const StateType &)
Definition: ExtendedNFA.h:794
static bool available(const automaton::ExtendedNFA< SymbolType, StateType > &automaton, const StateType &state)
Definition: ExtendedNFA.h:784
Definition: components.hpp:25
static bool used(const automaton::ExtendedNFA< SymbolType, StateType > &automaton, const SymbolType &symbol)
Definition: ExtendedNFA.h:639
static void valid(const automaton::ExtendedNFA< SymbolType, StateType > &, const SymbolType &)
Definition: ExtendedNFA.h:667
static bool available(const automaton::ExtendedNFA< SymbolType, StateType > &, const SymbolType &)
Definition: ExtendedNFA.h:657
static bool available(const automaton::ExtendedNFA< SymbolType, StateType > &, const StateType &)
Definition: ExtendedNFA.h:710
static void valid(const automaton::ExtendedNFA< SymbolType, StateType > &, const StateType &)
Definition: ExtendedNFA.h:720
static bool used(const automaton::ExtendedNFA< SymbolType, StateType > &automaton, const StateType &state)
Definition: ExtendedNFA.h:688
static bool available(const automaton::ExtendedNFA< SymbolType, StateType > &automaton, const StateType &state)
Definition: ExtendedNFA.h:753
static void valid(const automaton::ExtendedNFA< SymbolType, StateType > &, const StateType &)
Definition: ExtendedNFA.h:763
static bool used(const automaton::ExtendedNFA< SymbolType, StateType > &, const StateType &)
Definition: ExtendedNFA.h:741
Definition: setComponents.hpp:26
Class extending the multimap class from the standard library. Original reason is to allow printing of...
Definition: multimap.hpp:48
iterator insert(const T &key, const R &value)
Insert variant with explicit key and value parameters.
Definition: multimap.hpp:118
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
auto begin() &
Inherited behavior of begin for non-const instance.
Definition: set.hpp:99
auto end() &
Inherited behavior of end for non-const instance.
Definition: set.hpp:129
Definition: Object.h:16
Represents the concatenation operator in the regular expression. The node can have 0 to n children in...
Definition: UnboundedRegExpConcatenation.h:44
void appendElement(UnboundedRegExpElement< SymbolType > &&element)
Definition: UnboundedRegExpConcatenation.h:195
Represents the epsilon expression in the regular expression. The node can't have any children.
Definition: UnboundedRegExpEpsilon.h:41
Represents unbounded regular expression structure. Regular expression is stored as a tree of Unbounde...
Definition: UnboundedRegExpStructure.h:47
Represents the symbol in the regular expression. The can't have any children.
Definition: UnboundedRegExpSymbol.h:42
Definition: BarSymbol.cpp:12
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
return res
Definition: MinimizeByPartitioning.h:145
Definition: ToGrammar.h:31
constexpr bool isExtendedNFA
Definition: ExtendedNFA.h:462
T createUnique(T object, const Alphabets &... alphabets)
Definition: createUnique.hpp:46
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 begin(Container &&cont) -> decltype(std::forward(cont).begin())
Definition: iterator.hpp:900
void end()
Definition: measurements.cpp:19
Definition: ToAutomaton.h:15
auto & get(ext::ptr_array< Type, N > &tpl)
Specialisation of get function for pointer arrays.
Definition: ptr_array.hpp:693
static automaton::ExtendedNFA< > eval(automaton::ExtendedNFA< SymbolType, StateType > &&value)
Definition: ExtendedNFA.h:805
Definition: normalize.hpp:13