Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Concepts
Result.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <string/LinearString.h>
11
12#include "Run.h"
13#include <automaton/FSM/DFA.h>
14#include <automaton/TA/DFTA.h>
18#include <automaton/PDA/DPDA.h>
19
20#include <alib/deque>
21
22namespace automaton {
23
24namespace run {
25
30class Result {
31public:
43 template < class SymbolType, class StateType >
45
58 template < class SymbolType, class StateType >
60
61 template < class SymbolType, class StateType >
63
76 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
78
91 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
93
106 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
108
121 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
123
136 template < class SymbolType, class StateType >
138
152 template < class SymbolType, class StateType >
154
155 template < class SymbolType, class StateType >
157
171 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
173
187 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
189
203 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
205
219 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
221};
222
223template < class SymbolType, class StateType >
225 return result ( automaton, string, label::FailStateLabel::instance < StateType > ( ) );
226}
227
228template < class SymbolType, class StateType >
230 return result ( automaton, tree, label::FailStateLabel::instance < StateType > ( ) );
231}
232
233template < class SymbolType, class StateType >
235 return result ( automaton, tree, label::FailStateLabel::instance < StateType> ( ) );
236}
237
238template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
240 return result ( automaton, string, label::FailStateLabel::instance < StateType > ( ) );
241}
242
243template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
245 return result ( automaton, string, label::FailStateLabel::instance < StateType > ( ) );
246}
247
248template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
250 return result ( automaton, string, label::FailStateLabel::instance < StateType > ( ) );
251}
252
253template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
255 return result ( automaton, string, label::FailStateLabel::instance < StateType > ( ) );
256}
257
258template < class SymbolType, class StateType >
260 ext::tuple < bool, StateType, ext::set < unsigned > > res = Run::calculateState ( automaton, string );
261
262 if ( std::get < 0 > ( res ) ) return std::get < 1 > ( res );
263
264 return failLabel;
265}
266
267template < class SymbolType, class StateType >
270
271 if ( std::get < 0 > ( res ) ) return std::get < 1 > ( res );
272
273 return failLabel;
274}
275
276template < class SymbolType, class StateType >
279
280 if ( std::get < 0 > ( res ) ) return std::get < 1 > ( res );
281
282 return failLabel;
283}
284
285template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
288
289 if ( std::get < 0 > ( res ) ) return std::get < 1 > ( res );
290
291 return failLabel;
292}
293
294template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
297
298 if ( std::get < 0 > ( res ) ) return std::get < 1 > ( res );
299
300 return failLabel;
301}
302
303template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
306
307 if ( std::get < 0 > ( res ) ) return std::get < 1 > ( res );
308
309 return failLabel;
310}
311
312template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
315
316 if ( std::get < 0 > ( res ) ) return std::get < 1 > ( res );
317
318 return failLabel;
319}
320
321} /* namespace run */
322
323} /* namespace automaton */
324
Deterministic Z-Automaton in Arc-Factored Normal Form. Computation model for unranked regular tree la...
Definition: ArcFactoredDeterministicZAutomaton.h:65
Deterministic finite automaton. Accepts regular languages.
Definition: DFA.h:71
Nondeterministic finite tree automaton without epsilon transitions. Accepts regular tree languages.
Definition: DFTA.h:74
Deterministic pushdown automaton. Accepts subset of context free languages.
Definition: DPDA.h:78
Deterministic input driven pushdown automaton. Accepts subset of context free languages.
Definition: InputDrivenDPDA.h:79
Deterministic real time height deterministic pushdown automaton. Accepts subset of context free langu...
Definition: RealTimeHeightDeterministicDPDA.h:89
Deterministic visibly pushdown automaton. Accepts subset of context free languages.
Definition: VisiblyPushdownDPDA.h:86
Implementation of automaton run over its input returning the reached state.
Definition: Result.h:30
static StateType result(const automaton::DFA< SymbolType, StateType > &automaton, const string::LinearString< SymbolType > &string)
Definition: Result.h:224
Class extending the deque class from the standard library. Original reason is to allow printing of th...
Definition: deque.hpp:44
Class extending the tuple class from the standard library. Original reason is to allow printing of th...
Definition: tuple.hpp:42
Linear string.
Definition: LinearString.h:57
Tree structure represented in its natural representation. The representation is so called ranked,...
Definition: RankedTree.h:72
Tree represented in its natural representation. The representation is so called unranked,...
Definition: UnrankedTree.h:69
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
return res
Definition: MinimizeByPartitioning.h:145
Definition: ToGrammar.h:31
Definition: BackwardOccurrenceTest.h:17