12#include <ext/typeinfo>
20#include <string/String.h>
59 static constexpr const size_t CAPTION_LENGTH_LIMIT = 100;
61 template <
class SymbolType,
class StateType >
64 template <
class SymbolType,
class StateType >
67 template <
class SymbolType,
class StateType >
70 template <
class SymbolType,
class StateType >
73 template <
class SymbolType,
class StateType >
76 template <
class SymbolType,
class StateType >
79 template <
class SymbolType,
class StateType >
82 template <
class SymbolType,
class StateType >
85 template <
class SymbolType,
class StateType >
88 template <
class SymbolType,
class StateType >
91 template <
class SymbolType,
class StateType >
94 template <
class SymbolType,
class StateType >
97 template <
class SymbolType,
class StateType >
100 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
103 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
106 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
109 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
112 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
115 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
118 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
121 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
124 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
127 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
130 template <
class SymbolType,
class StateType >
133 template <
class SymbolType,
class StateType >
136 template <
class SymbolType,
class StateType >
139 template <
class SymbolType,
class StateType >
142 template <
class SymbolType,
class StateType >
145 template <
class SymbolType,
class StateType >
148 template <
class SymbolType,
class StateType >
151 template <
class SymbolType,
class StateType >
154 template <
class SymbolType,
class StateType >
157 template <
class SymbolType,
class StateType >
160 template <
class SymbolType,
class StateType >
163 template <
class SymbolType,
class StateType >
166 template <
class SymbolType,
class StateType >
169 template <
class SymbolType,
class StateType >
172 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
175 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
178 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
181 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
184 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
187 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
190 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
193 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
196 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
199 template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
202 template <
class SymbolType,
class StateType >
205 template <
class SymbolType >
208 template <
class SymbolType >
219template <
class SymbolType,
class StateType >
221 out <<
"digraph automaton {\n";
222 out <<
"rankdir=LR;\n";
237 for (
const auto& state : states) {
244 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
247 transitions(a, states, out);
251template <
class SymbolType,
class StateType >
253 out <<
"digraph automaton {\n";
254 out <<
"rankdir=LR;\n";
269 for (
const auto& state : states) {
276 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
278 out <<
"0 -> " << states.find(state)->second <<
";\n";
281 transitions(a, states, out);
285template <
class SymbolType,
class StateType >
287 out <<
"digraph automaton {\n";
288 out <<
"rankdir=LR;\n";
303 for (
const auto& state : states) {
310 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
313 transitions(a, states, out);
317template <
class SymbolType,
class StateType >
319 out <<
"digraph automaton {\n";
320 out <<
"rankdir=LR;\n";
335 for (
const auto& state : states) {
342 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
345 transitions(a, states, out);
349template <
class SymbolType,
class StateType >
351 out <<
"digraph automaton {\n";
352 out <<
"rankdir=LR;\n";
367 for (
const auto& state : states) {
374 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
377 transitions(a, states, out);
381template <
class SymbolType,
class StateType >
383 out <<
"digraph automaton {\n";
384 out <<
"rankdir=LR;\n";
399 for (
const auto& state : states) {
406 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
409 transitions(a, states, out);
413template <
class SymbolType,
class StateType >
415 out <<
"digraph automaton {\n";
416 out <<
"rankdir=LR;\n";
431 for (
const auto& state : states) {
437 transitions(a, states, out);
441template <
class SymbolType,
class StateType >
443 out <<
"digraph automaton {\n";
444 out <<
"rankdir=LR;\n";
459 for (
const auto& state : states) {
465 transitions(a, states, out);
469template <
class SymbolType,
class StateType >
471 out <<
"digraph automaton {\n";
472 out <<
"rankdir=LR;\n";
487 for (
const auto& state : states) {
493 transitions(a, states, out);
497template <
class SymbolType,
class StateType >
499 out <<
"digraph automaton {\n";
500 out <<
"rankdir=TD;\n";
515 for (
const auto& state : states) {
521 transitions(a, states, out);
525template <
class SymbolType,
class StateType >
527 out <<
"digraph automaton {\n";
528 out <<
"rankdir=LR;\n";
543 for (
const auto& state : states) {
549 transitions(a, states, out);
553template <
class SymbolType,
class StateType >
555 out <<
"digraph automaton {\n";
556 out <<
"rankdir=LR;\n";
571 for (
const auto& state : states) {
577 transitions(a, states, out);
581template <
class SymbolType,
class StateType >
583 out <<
"digraph automaton {\n";
584 out <<
"rankdir=LR;\n";
599 for (
const auto& state : states) {
605 transitions(a, states, out);
609template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
611 out <<
"digraph automaton {\n";
612 out <<
"rankdir=LR;\n";
627 for (
const auto& state : states) {
634 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
637 transitions(a, states, out);
641template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
643 out <<
"digraph automaton {\n";
644 out <<
"rankdir=LR;\n";
659 for (
const auto& state : states) {
666 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
669 transitions(a, states, out);
673template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
675 out <<
"digraph automaton {\n";
676 out <<
"rankdir=LR;\n";
691 for (
const auto& state : states) {
698 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
701 transitions(a, states, out);
705template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
707 out <<
"digraph automaton {\n";
708 out <<
"rankdir=LR;\n";
723 for (
const auto& state : states) {
730 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
733 transitions(a, states, out);
737template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
739 out <<
"digraph automaton {\n";
740 out <<
"rankdir=LR;\n";
755 for (
const auto& state : states) {
762 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
765 transitions(a, states, out);
769template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
771 out <<
"digraph automaton {\n";
772 out <<
"rankdir=LR;\n";
787 for (
const auto& state : states) {
794 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
796 out <<
"0 -> " << states.find(state)->second <<
";\n";
799 transitions(a, states, out);
803template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
805 out <<
"digraph automaton {\n";
806 out <<
"rankdir=LR;\n";
821 for (
const auto& state : states) {
828 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
831 transitions(a, states, out);
835template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
837 out <<
"digraph automaton {\n";
838 out <<
"rankdir=LR;\n";
853 for (
const auto& state : states) {
860 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
862 out <<
"0 -> " << states.find(state)->second <<
";\n";
865 transitions(a, states, out);
869template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
871 out <<
"digraph automaton {\n";
872 out <<
"rankdir=LR;\n";
887 for (
const auto& state : states) {
894 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
897 transitions(a, states, out);
901template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
903 out <<
"digraph automaton {\n";
904 out <<
"rankdir=LR;\n";
919 for (
const auto& state : states) {
926 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
929 transitions(a, states, out);
933template <
class SymbolType,
class StateType >
935 out <<
"digraph automaton {\n";
936 out <<
"rankdir=LR;\n";
951 for (
const auto& state : states) {
958 out <<
"node [shape = plaintext, label=\"start\"]; 0; \n";
961 transitions(a, states, out);
965template <
class SymbolType,
class StateType >
972 if (transition.first.second.is_epsilon()) {
973 symbol =
"ε";
978 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
981 if (mapit == transitions.
end()) {
984 mapit->second +=
",";
986 size_t pos = mapit->second.find_last_of(
"\n");
987 if(pos == std::string::npos) pos = 0;
988 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
989 else mapit->second +=
" ";
991 mapit->second += symbol;
996 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
997 out << transition.first.first <<
" -> " << transition.first.second;
999 out <<
"[label=\"" << transition.second <<
"\"]\n";
1003template <
class SymbolType >
1005 out <<
"digraph rte {\n";
1007 out <<
'\n' <<
"}" << std::endl;
1010template <
class SymbolType >
1012 out <<
"digraph tree {\n";
1014 out <<
'\n' <<
"}" << std::endl;
1017template <
class SymbolType,
class StateType >
1025 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
1028 if (mapit == transitions.
end()) {
1031 mapit->second +=
",";
1033 size_t pos = mapit->second.find_last_of(
"\n");
1034 if(pos == std::string::npos) pos = 0;
1035 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1036 else mapit->second +=
" ";
1038 mapit->second += symbol;
1043 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1044 out << transition.first.first <<
" -> " << transition.first.second;
1046 out <<
"[label=\"" << transition.second <<
"\"]\n";
1050template <
class SymbolType,
class StateType >
1058 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
1061 if (mapit == transitions.
end()) {
1064 mapit->second +=
",";
1066 size_t pos = mapit->second.find_last_of(
"\n");
1067 if(pos == std::string::npos) pos = 0;
1068 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1069 else mapit->second +=
" ";
1071 mapit->second += symbol;
1076 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1077 out << transition.first.first <<
" -> " << transition.first.second;
1079 out <<
"[label=\"" << transition.second <<
"\"]\n";
1083template <
class SymbolType,
class StateType >
1091 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
1094 if (mapit == transitions.
end()) {
1097 mapit->second +=
",";
1099 size_t pos = mapit->second.find_last_of(
"\n");
1100 if(pos == std::string::npos) pos = 0;
1101 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1102 else mapit->second +=
" ";
1104 mapit->second += symbol;
1109 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1110 out << transition.first.first <<
" -> " << transition.first.second;
1112 out <<
"[label=\"" << transition.second <<
"\"]\n";
1116template <
class SymbolType,
class StateType >
1124 std::pair<int, int> key(states.find(transition.first.first)->second, states.find ( transition.second )->second);
1127 if (mapit == transitions.
end()) {
1130 mapit->second +=
",";
1132 size_t pos = mapit->second.find_last_of(
"\n");
1133 if(pos == std::string::npos) pos = 0;
1134 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1135 else mapit->second +=
" ";
1137 mapit->second += symbol;
1142 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1143 out << transition.first.first <<
" -> " << transition.first.second;
1145 out <<
"[label=\"" << transition.second <<
"\"]\n";
1149template <
class SymbolType,
class StateType >
1157 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
1160 if (mapit == transitions.
end()) {
1163 mapit->second +=
",";
1165 size_t pos = mapit->second.find_last_of(
"\n");
1166 if(pos == std::string::npos) pos = 0;
1167 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1168 else mapit->second +=
" ";
1170 mapit->second += symbol;
1175 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1176 out << transition.first.first <<
" -> " << transition.first.second;
1178 out <<
"[label=\"" << transition.second <<
"\"]\n";
1182template <
class SymbolType,
class StateType >
1185 unsigned auxNodeCnt = 1;
1189 out <<
"subgraph cluster_rte_" << auxNodeCnt <<
"{" <<
'\n';
1190 out <<
"label=\"rte_" << auxNodeCnt <<
"\"\n";
1191 out <<
"color = blue;\n";
1193 out <<
"}\n" << std::endl;
1195 out <<
"node [shape = point, label=\"\"]; Aux" << auxNodeCnt <<
";\n";
1197 for(
const auto & state : transition.first.second)
1198 out <<
"State" << states.
at ( state ) <<
" -> " <<
"Aux" << auxNodeCnt <<
"[label=\"" << j++ <<
"\"];\n";
1199 for (
const auto & target : transition.second )
1200 out <<
"Aux" << auxNodeCnt <<
" -> State" << states.
at ( target ) <<
"[label=\"" <<
"rte_" << auxNodeCnt <<
"\"];\n";
1206template <
class SymbolType,
class StateType >
1215 std::pair<int, ext::vector<int>> key(states.find(transition.second)->second, {});
1216 for(
const StateType& state : transition.first.second) {
1217 key.second.push_back(states.find(state)->second);
1221 if (mapit == transitions.
end()) {
1224 mapit->second +=
",";
1226 size_t pos = mapit->second.find_last_of(
"\n");
1227 if(pos == std::string::npos) pos = 0;
1228 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1229 else mapit->second +=
" ";
1231 mapit->second += symbol;
1236 for (
unsigned i = 1;
i <= transitions.size();
i++) {
1237 out <<
"node [shape = point, label=\"\"]; " << states.size() +
i <<
";\n";
1241 unsigned i = states.size() + 1;
1242 for (std::pair<
const std::pair<
int,
ext::vector<int>>, std::string>& transition : transitions) {
1243 out <<
i <<
" -> " << transition.first.first;
1245 out <<
"[label=\"" << transition.second <<
"\"]\n";
1247 for(
int from : transition.first.second) {
1248 out << from <<
" -> " <<
i;
1249 out <<
"[label=\"" << j <<
"\"]\n";
1256template <
class SymbolType,
class StateType >
1263 if ( transition.first.template is < StateType > ( ) ) {
1264 const StateType & source = transition.first.template get < StateType > ( );
1265 epsilonTransitions.
insert ( states.find ( source )->second, states.find ( transition.second )->second );
1271 std::pair<int, ext::vector<int>> key(states.find(transition.second)->second, {});
1272 for(
const StateType& state : source.second) {
1273 key.second.push_back(states.find(state)->second);
1277 if (mapit == transitions.
end()) {
1280 mapit->second +=
",";
1282 size_t pos = mapit->second.find_last_of(
"\n");
1283 if(pos == std::string::npos) pos = 0;
1284 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1285 else mapit->second +=
" ";
1287 mapit->second += symbol;
1293 for (
unsigned i = 1;
i <= transitions.size();
i++) {
1294 out <<
"node [shape = point, label=\"\"]; " << states.size() +
i <<
";\n";
1298 unsigned i = states.size() + 1;
1299 for (std::pair<
const std::pair<
int,
ext::vector<int>>, std::string>& transition : transitions) {
1300 out <<
i <<
" -> " << transition.first.first;
1302 out <<
"[label=\"" << transition.second <<
"\"]\n";
1304 for(
int from : transition.first.second) {
1305 out << from <<
" -> " <<
i;
1306 out <<
"[label=\"" << j <<
"\"]\n";
1312 for (
const std::pair < const int, int > epsilonTransition : epsilonTransitions ) {
1313 out << epsilonTransition.first <<
" -> " << epsilonTransition.second;
1314 out <<
"[label=\"ε\"]\n";
1318template <
class SymbolType,
class StateType >
1327 std::pair<int, ext::vector<int>> key(states.find(transition.second)->second, {});
1328 for(
const StateType& state : transition.first.second) {
1329 key.second.push_back(states.find(state)->second);
1333 if (mapit == transitions.
end()) {
1336 mapit->second +=
",";
1338 size_t pos = mapit->second.find_last_of(
"\n");
1339 if(pos == std::string::npos) pos = 0;
1340 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1341 else mapit->second +=
" ";
1343 mapit->second += symbol;
1348 for (
unsigned i = 1;
i <= transitions.size();
i++) {
1349 out <<
"node [shape = point, label=\"\"]; " << states.size() +
i <<
";\n";
1353 unsigned i = states.size() + 1;
1354 for (std::pair<
const std::pair<
int,
ext::vector<int>>, std::string>& transition : transitions) {
1355 out <<
i <<
" -> " << transition.first.first;
1357 out <<
"[label=\"" << transition.second <<
"\"]\n";
1359 for(
int from : transition.first.second) {
1360 out << from <<
" -> " <<
i <<
"\n";
1367template <
class SymbolType,
class StateType >
1376 std::pair<int, ext::vector<int>> key(states.find(transition.second)->second, {});
1377 for(
const StateType& state : transition.first.second) {
1378 key.second.push_back(states.find(state)->second);
1382 if (mapit == transitions.
end()) {
1385 mapit->second +=
",";
1387 size_t pos = mapit->second.find_last_of(
"\n");
1388 if(pos == std::string::npos) pos = 0;
1389 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1390 else mapit->second +=
" ";
1392 mapit->second += symbol;
1397 for (
unsigned i = 1;
i <= transitions.size();
i++) {
1398 out <<
"node [shape = point, label=\"\"]; " << states.size() +
i <<
";\n";
1402 unsigned i = states.size() + 1;
1403 for (std::pair<
const std::pair<
int,
ext::vector<int>>, std::string>& transition : transitions) {
1404 out <<
i <<
" -> " << transition.first.first;
1406 out <<
"[label=\"" << transition.second <<
"\"]\n";
1408 for(
int from : transition.first.second) {
1409 out << from <<
" -> " <<
i;
1410 out <<
"[label=\"" << j <<
"\"]\n";
1417template <
class SymbolType,
class StateType >
1426 std::tuple < int, int, int > key ( states.find ( trans.first )->second, states.find ( trans.second )->second, states.find ( transition.second )->second );
1427 stateTransitions.insert ( std::move ( key ) );
1434 if ( transition.first.template is < SymbolType > ( ) ) {
1435 int key = states.find ( transition.second )->second;
1437 const SymbolType & trans = transition.first.template get < SymbolType > ( );
1442 if (mapit == symbolTransitions.
end()) {
1445 mapit->second +=
",";
1447 size_t pos = mapit->second.find_last_of(
"\n");
1448 if(pos == std::string::npos) pos = 0;
1449 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1450 else mapit->second +=
" ";
1452 mapit->second += symbol;
1458 for (
unsigned i = 1;
i <= symbolTransitions.size();
i++) {
1459 out <<
"node [shape = point, label=\"\"]; " << states.size ( ) +
i <<
";\n";
1464 unsigned i = states.size ( ) + 1;
1465 for ( std::pair < const int, std::string > & transition : symbolTransitions ) {
1466 out <<
i <<
" -> " << transition.first;
1468 out <<
"[label=\"" << transition.second <<
"\"]\n";
1474 for (
unsigned i = 1;
i <= stateTransitions.size();
i++) {
1475 out <<
"node [shape = point, label=\"\"]; " << states.size ( ) + symbolTransitions.size ( ) +
i <<
";\n";
1480 unsigned i = states.size ( ) + symbolTransitions.size ( ) + 1;
1481 for (
const std::tuple < int, int, int > & transition : stateTransitions ) {
1482 out <<
i <<
" -> " << std::get < 2 > ( transition ) <<
"\n";
1483 out << std::get < 0 > ( transition ) <<
" -> " <<
i;
1484 out <<
"[label=\"" << 0 <<
"\"]\n";
1485 out << std::get < 1 > ( transition ) <<
" -> " <<
i;
1486 out <<
"[label=\"" << 1 <<
"\"]\n";
1492template <
class SymbolType,
class StateType >
1500 return states.find ( param.template get < StateType > ( ) )->second;
1506 std::variant < int, std::string > sourcesFirst =
transform ( transition.first.first );
1507 std::vector < std::variant < int, std::string > > sourcesSecond;
1509 sourcesSecond.push_back (
transform ( from ) );
1511 int destination = states.find ( transition.second )->second;
1513 transitions.insert (
std::make_tuple ( sourcesFirst, sourcesSecond, destination ) );
1518 out <<
"node[shape=record];\n";
1519 unsigned i = states.size ( ) + 1;
1520 for (
const std::tuple < std::variant < int, std::string >, std::vector < std::variant < int, std::string > >,
int > & transition : transitions ) {
1521 const auto & firstSource = std::get < 0 > ( transition );
1522 out <<
"struct" <<
i<<
"[ label =\"<head> " << ( std::holds_alternative < std::string > ( firstSource ) ? std::get < std::string > ( firstSource ) :
"" );
1523 const auto & secondSource = std::get < 1 > ( transition );
1524 if ( ! secondSource.empty ( ) ) {
1526 for (
unsigned j = 0; j < secondSource.size ( ); ++ j ) {
1530 out <<
"<" << j <<
"> " << ( std::holds_alternative < std::string > ( firstSource ) ? std::get < std::string > ( firstSource ) :
"" );
1541 unsigned i = states.size ( ) + 1;
1542 for (
const std::tuple < std::variant < int, std::string >, std::vector < std::variant < int, std::string > >,
int > & transition : transitions ) {
1543 out <<
"struct" <<
i <<
":head:e -> " << std::get < 2 > ( transition ) <<
"\n";
1544 const auto & firstSource = std::get < 0 > ( transition );
1545 if ( std::holds_alternative < int > ( firstSource ) ) {
1546 out << std::get < int > ( firstSource ) <<
" -> struct" <<
i <<
":head:w\n";
1548 const auto & secondSource = std::get < 1 > ( transition );
1549 for (
unsigned j = 0; j < secondSource.size ( ); ++ j ) {
1550 if ( std::holds_alternative < int > ( secondSource [ j ] ) ) {
1551 out << std::get < int > ( secondSource [ j ] ) <<
" -> struct" <<
i <<
":" << j <<
"\n";
1559template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
1567 if (std::get<1>(transition.first).is_epsilon ( ) ) {
1568 symbol =
"ε";
1576 if (std::get<2>(transition.first).empty ( )) {
1577 symbol +=
" ε";
1579 for (
const PushdownStoreSymbolType & symb : std::get<2>(transition.first)) {
1588 if (transition.second.second.empty ( )) {
1589 symbol +=
" ε";
1591 for (
const PushdownStoreSymbolType & symb : transition.second.second) {
1598 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second.first)->second);
1601 if (mapit == transitions.
end()) {
1604 mapit->second +=
",";
1606 size_t pos = mapit->second.find_last_of(
"\n");
1607 if(pos == std::string::npos) pos = 0;
1608 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1609 else mapit->second +=
" ";
1611 mapit->second += symbol;
1616 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1617 out << transition.first.first <<
" -> " << transition.first.second;
1619 out <<
"[label=\"" << transition.second <<
"\"]\n";
1623template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
1631 if (std::get<1>(transition.first).is_epsilon ( )) {
1632 symbol =
"ε";
1645 if (transition.second.second.empty ( )) {
1646 symbol +=
" ε";
1648 for (
const PushdownStoreSymbolType & symb : transition.second.second) {
1655 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second.first)->second);
1658 if (mapit == transitions.
end()) {
1661 mapit->second +=
",";
1663 size_t pos = mapit->second.find_last_of(
"\n");
1664 if(pos == std::string::npos) pos = 0;
1665 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1666 else mapit->second +=
" ";
1668 mapit->second += symbol;
1673 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1674 out << transition.first.first <<
" -> " << transition.first.second;
1676 out <<
"[label=\"" << transition.second <<
"\"]\n";
1680template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
1686 const auto& pop = symbolToPDSOperation.find(transition.first.second)->second.first;
1687 const auto& push = symbolToPDSOperation.find(transition.first.second)->second.second;
1697 if (pop.empty ( )) {
1698 symbol +=
" ε";
1700 for (
const PushdownStoreSymbolType & symb : pop) {
1708 const auto& to = transition.second;
1710 if (push.empty ( )) {
1711 symbol +=
" ε";
1713 for (
const PushdownStoreSymbolType & symb : push) {
1720 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(to)->second);
1723 if (mapit == transitions.
end()) {
1726 mapit->second +=
",";
1728 size_t pos = mapit->second.find_last_of(
"\n");
1729 if(pos == std::string::npos) pos = 0;
1730 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1731 else mapit->second +=
" ";
1733 mapit->second += symbol;
1738 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1739 out << transition.first.first <<
" -> " << transition.first.second;
1741 out <<
"[label=\"" << transition.second <<
"\"]\n";
1745template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
1751 const auto& pop = symbolToPDSOperation.find(transition.first.second)->second.first;
1752 const auto& push = symbolToPDSOperation.find(transition.first.second)->second.second;
1762 if (pop.empty ( )) {
1763 symbol +=
" ε";
1765 for (
const PushdownStoreSymbolType & symb : pop) {
1774 if (push.empty ( )) {
1775 symbol +=
" ε";
1777 for (
const PushdownStoreSymbolType & symb : push) {
1784 std::pair<int, int> key(states.find(transition.first.first)->second, states.find( transition.second )->second);
1787 if (mapit == transitions.
end()) {
1790 mapit->second +=
",";
1792 size_t pos = mapit->second.find_last_of(
"\n");
1793 if(pos == std::string::npos) pos = 0;
1794 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1795 else mapit->second +=
" ";
1797 mapit->second += symbol;
1802 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1803 out << transition.first.first <<
" -> " << transition.first.second;
1805 out <<
"[label=\"" << transition.second <<
"\"]\n";
1809template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
1822 symbol +=
" ε";
1828 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second.first)->second);
1831 if (mapit == transitions.
end()) {
1834 mapit->second +=
",";
1836 size_t pos = mapit->second.find_last_of(
"\n");
1837 if(pos == std::string::npos) pos = 0;
1838 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1839 else mapit->second +=
" ";
1841 mapit->second += symbol;
1857 symbol +=
" ε";
1860 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second)->second);
1863 if (mapit == transitions.
end()) {
1866 mapit->second +=
",";
1868 size_t pos = mapit->second.find_last_of(
"\n");
1869 if(pos == std::string::npos) pos = 0;
1870 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1871 else mapit->second +=
" ";
1873 mapit->second += symbol;
1886 symbol +=
" ε";
1889 symbol +=
" ε";
1892 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
1895 if (mapit == transitions.
end()) {
1898 mapit->second +=
",";
1900 size_t pos = mapit->second.find_last_of(
"\n");
1901 if(pos == std::string::npos) pos = 0;
1902 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1903 else mapit->second +=
" ";
1905 mapit->second += symbol;
1910 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
1911 out << transition.first.first <<
" -> " << transition.first.second;
1913 out <<
"[label=\"" << transition.second <<
"\"]\n";
1917template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
1930 symbol +=
" ε";
1936 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second.first)->second);
1939 if (mapit == transitions.
end()) {
1942 mapit->second +=
",";
1944 size_t pos = mapit->second.find_last_of(
"\n");
1945 if(pos == std::string::npos) pos = 0;
1946 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1947 else mapit->second +=
" ";
1949 mapit->second += symbol;
1965 symbol +=
" ε";
1968 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second)->second);
1971 if (mapit == transitions.
end()) {
1974 mapit->second +=
",";
1976 size_t pos = mapit->second.find_last_of(
"\n");
1977 if(pos == std::string::npos) pos = 0;
1978 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
1979 else mapit->second +=
" ";
1981 mapit->second += symbol;
1994 symbol +=
" ε";
1997 symbol +=
" ε";
2000 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
2003 if (mapit == transitions.
end()) {
2006 mapit->second +=
",";
2008 size_t pos = mapit->second.find_last_of(
"\n");
2009 if(pos == std::string::npos) pos = 0;
2010 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2011 else mapit->second +=
" ";
2013 mapit->second += symbol;
2018 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
2019 out << transition.first.first <<
" -> " << transition.first.second;
2021 out <<
"[label=\"" << transition.second <<
"\"]\n";
2025template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
2033 if(transition.first.second.is_epsilon ( ) )
2034 symbol =
"&epsilon";
2041 symbol +=
" ε";
2047 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second.first)->second);
2050 if (mapit == transitions.
end()) {
2053 mapit->second +=
",";
2055 size_t pos = mapit->second.find_last_of(
"\n");
2056 if(pos == std::string::npos) pos = 0;
2057 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2058 else mapit->second +=
" ";
2060 mapit->second += symbol;
2068 if(std::get<1>(transition.first).is_epsilon ( ) )
2069 symbol =
"&epsilon";
2079 symbol +=
" ε";
2082 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second)->second);
2085 if (mapit == transitions.
end()) {
2088 mapit->second +=
",";
2090 size_t pos = mapit->second.find_last_of(
"\n");
2091 if(pos == std::string::npos) pos = 0;
2092 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2093 else mapit->second +=
" ";
2095 mapit->second += symbol;
2103 if(transition.first.second.is_epsilon ( ) )
2104 symbol =
"&epsilon";
2111 symbol +=
" ε";
2114 symbol +=
" ε";
2117 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
2120 if (mapit == transitions.
end()) {
2123 mapit->second +=
",";
2125 size_t pos = mapit->second.find_last_of(
"\n");
2126 if(pos == std::string::npos) pos = 0;
2127 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2128 else mapit->second +=
" ";
2130 mapit->second += symbol;
2135 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
2136 out << transition.first.first <<
" -> " << transition.first.second;
2138 out <<
"[label=\"" << transition.second <<
"\"]\n";
2142template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
2150 if(transition.first.second.is_epsilon ( ) )
2151 symbol =
"&epsilon";
2158 symbol +=
" ε";
2164 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second.first)->second);
2167 if (mapit == transitions.
end()) {
2170 mapit->second +=
",";
2172 size_t pos = mapit->second.find_last_of(
"\n");
2173 if(pos == std::string::npos) pos = 0;
2174 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2175 else mapit->second +=
" ";
2177 mapit->second += symbol;
2185 if(std::get<1>(transition.first).is_epsilon ( ) )
2186 symbol =
"ε";
2196 symbol +=
" ε";
2199 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second)->second);
2202 if (mapit == transitions.
end()) {
2205 mapit->second +=
",";
2207 size_t pos = mapit->second.find_last_of(
"\n");
2208 if(pos == std::string::npos) pos = 0;
2209 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2210 else mapit->second +=
" ";
2212 mapit->second += symbol;
2220 if(transition.first.second.is_epsilon ( ) )
2221 symbol =
"ε";
2228 symbol +=
" ε";
2231 symbol +=
" ε";
2234 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(transition.second)->second);
2237 if (mapit == transitions.
end()) {
2240 mapit->second +=
",";
2242 size_t pos = mapit->second.find_last_of(
"\n");
2243 if(pos == std::string::npos) pos = 0;
2244 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2245 else mapit->second +=
" ";
2247 mapit->second += symbol;
2252 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
2253 out << transition.first.first <<
" -> " << transition.first.second;
2255 out <<
"[label=\"" << transition.second <<
"\"]\n";
2259template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
2267 if (std::get<1>(transition.first).is_epsilon ( ) ) {
2268 symbol =
"ε";
2276 if (std::get<2>(transition.first).empty ( )) {
2277 symbol +=
" ε";
2279 for (
const PushdownStoreSymbolType & symb : std::get<2>(transition.first)) {
2288 if (transition.second.second.empty ( )) {
2289 symbol +=
" ε";
2291 for (
const PushdownStoreSymbolType & symb : transition.second.second) {
2298 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second.first)->second);
2301 if (mapit == transitions.
end()) {
2304 mapit->second +=
",";
2306 size_t pos = mapit->second.find_last_of(
"\n");
2307 if(pos == std::string::npos) pos = 0;
2308 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2309 else mapit->second +=
" ";
2311 mapit->second += symbol;
2316 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
2317 out << transition.first.first <<
" -> " << transition.first.second;
2319 out <<
"[label=\"" << transition.second <<
"\"]\n";
2323template <
class InputSymbolType,
class PushdownStoreSymbolType,
class StateType >
2331 if (std::get<1>(transition.first).is_epsilon ( )) {
2332 symbol =
"ε";
2345 if (transition.second.second.empty ( )) {
2346 symbol +=
" ε";
2348 for (
const PushdownStoreSymbolType & symb : transition.second.second) {
2355 std::pair<int, int> key(states.find(std::get<0>(transition.first))->second, states.find(transition.second.first)->second);
2358 if (mapit == transitions.
end()) {
2361 mapit->second +=
",";
2363 size_t pos = mapit->second.find_last_of(
"\n");
2364 if(pos == std::string::npos) pos = 0;
2365 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2366 else mapit->second +=
" ";
2368 mapit->second += symbol;
2373 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
2374 out << transition.first.first <<
" -> " << transition.first.second;
2376 out <<
"[label=\"" << transition.second <<
"\"]\n";
2380template <
class SymbolType,
class StateType >
2392 switch(std::get<2>(transition.second)) {
2400 symbol +=
"×";
2407 std::pair<int, int> key(states.find(transition.first.first)->second, states.find(std::get<0>(transition.second))->second);
2410 if (mapit == transitions.
end()) {
2413 mapit->second +=
",";
2415 size_t pos = mapit->second.find_last_of(
"\n");
2416 if(pos == std::string::npos) pos = 0;
2417 if(mapit->second.size() - pos > CAPTION_LENGTH_LIMIT) mapit->second +=
"\n";
2418 else mapit->second +=
" ";
2420 mapit->second += symbol;
2425 for (std::pair<
const std::pair<int, int>, std::string>& transition : transitions) {
2426 out << transition.first.first <<
" -> " << transition.first.second;
2428 out <<
"[label=\"" << transition.second <<
"\"]\n";
Nondeterministic Z-Automaton in Arc-Factored Normal Form. Computation model for unranked regular tree...
Definition: ArcFactoredNondeterministicZAutomaton.h:67
const ext::set< StateType > & getFinalStates() const &
Definition: ArcFactoredNondeterministicZAutomaton.h:154
const ext::multimap< ext::variant< SymbolType, ext::pair< StateType, StateType > >, StateType > & getTransitions() const &
Definition: ArcFactoredNondeterministicZAutomaton.h:293
const ext::set< StateType > & getStates() const &
Definition: ArcFactoredNondeterministicZAutomaton.h:105
Compact nondeterministic finite automaton. Accepts regular languages. The automaton has a list of sym...
Definition: CompactNFA.h:78
const ext::set< StateType > & getFinalStates() const &
Definition: CompactNFA.h:232
const ext::multimap< ext::pair< StateType, ext::vector< SymbolType > >, StateType > & getTransitions() const &
Definition: CompactNFA.h:555
const ext::set< StateType > & getStates() const &
Definition: CompactNFA.h:183
const StateType & getInitialState() const &
Definition: CompactNFA.h:154
Deterministic finite automaton. Accepts regular languages.
Definition: DFA.h:71
const ext::set< StateType > & getFinalStates() const &
Definition: DFA.h:183
const ext::map< ext::pair< StateType, SymbolType >, StateType > & getTransitions() const &
Definition: DFA.h:473
const StateType & getInitialState() const &
Definition: DFA.h:105
const ext::set< StateType > & getStates() const &
Definition: DFA.h:134
Nondeterministic finite tree automaton without epsilon transitions. Accepts regular tree languages.
Definition: DFTA.h:74
const ext::map< ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > >, StateType > & getTransitions() const &
Definition: DFTA.h:289
const ext::set< StateType > & getFinalStates() const &
Definition: DFTA.h:154
const ext::set< StateType > & getStates() const &
Definition: DFTA.h:105
Deterministic pushdown automaton. Accepts subset of context free languages.
Definition: DPDA.h:78
const ext::set< StateType > & getStates() const &
Definition: DPDA.h:145
const ext::map< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, ext::vector< PushdownStoreSymbolType > >, ext::pair< StateType, ext::vector< PushdownStoreSymbolType > > > & getTransitions() const &
Definition: DPDA.h:682
const ext::set< StateType > & getFinalStates() const &
Definition: DPDA.h:194
const StateType & getInitialState() const &
Definition: DPDA.h:116
Epsilon nondeterministic finite automaton. Accepts regular languages.
Definition: EpsilonNFA.h:74
const ext::set< StateType > & getStates() const &
Definition: EpsilonNFA.h:158
const ext::set< StateType > & getFinalStates() const &
Definition: EpsilonNFA.h:207
const ext::multimap< ext::pair< StateType, common::symbol_or_epsilon< SymbolType > >, StateType > & getTransitions() const &
Definition: EpsilonNFA.h:666
const StateType & getInitialState() const &
Definition: EpsilonNFA.h:129
Epsilon nondeterministic finite tree automaton. Accepts regular tree languages.
Definition: EpsilonNFTA.h:73
const ext::set< StateType > & getFinalStates() const &
Definition: EpsilonNFTA.h:167
const ext::set< StateType > & getStates() const &
Definition: EpsilonNFTA.h:118
const ext::multimap< ext::variant< StateType, ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > > >, StateType > & getTransitions() const &
Definition: EpsilonNFTA.h:354
Extended nondeterministic finite automaton. Accepts regular languages. The automaton has a regular ex...
Definition: ExtendedNFA.h:80
const StateType & getInitialState() const &
Definition: ExtendedNFA.h:156
const ext::multimap< ext::pair< StateType, regexp::UnboundedRegExpStructure< SymbolType > >, StateType > & getTransitions() const &
Definition: ExtendedNFA.h:581
const ext::set< StateType > & getStates() const &
Definition: ExtendedNFA.h:185
const ext::set< StateType > & getFinalStates() const &
Definition: ExtendedNFA.h:234
Nondeterministic finite tree automaton without epsilon transitions. Accepts regular tree languages.
Definition: ExtendedNFTA.h:75
const ext::set< StateType > & getStates() const &
Definition: ExtendedNFTA.h:115
const ext::map< ext::pair< rte::FormalRTEStructure< ext::variant< SymbolType, StateType > >, ext::vector< StateType > >, ext::set< StateType > > & getTransitions() const &
Definition: ExtendedNFTA.h:314
const ext::set< StateType > & getFinalStates() const &
Definition: ExtendedNFTA.h:164
Nondeterministic finite automaton with multiple initial states. Accepts regular languages.
Definition: MultiInitialStateNFA.h:69
const ext::set< StateType > & getInitialStates() const &
Definition: MultiInitialStateNFA.h:117
const ext::set< StateType > & getStates() const &
Definition: MultiInitialStateNFA.h:166
const ext::multimap< ext::pair< StateType, SymbolType >, StateType > & getTransitions() const &
Definition: MultiInitialStateNFA.h:520
const ext::set< StateType > & getFinalStates() const &
Definition: MultiInitialStateNFA.h:215
Nondeterministic finite automaton. Accepts regular languages.
Definition: NFA.h:66
const ext::set< StateType > & getStates() const &
Definition: NFA.h:136
const StateType & getInitialState() const &
Definition: NFA.h:107
const ext::multimap< ext::pair< StateType, SymbolType >, StateType > & getTransitions() const &
Definition: NFA.h:484
const ext::set< StateType > & getFinalStates() const &
Definition: NFA.h:185
Nondeterministic finite tree automaton without epsilon transitions. Accepts regular tree languages.
Definition: NFTA.h:72
const ext::set< StateType > & getFinalStates() const &
Definition: NFTA.h:159
const ext::multimap< ext::pair< common::ranked_symbol< SymbolType >, ext::vector< StateType > >, StateType > & getTransitions() const &
Definition: NFTA.h:294
const ext::set< StateType > & getStates() const &
Definition: NFTA.h:110
const ext::set< StateType > & getFinalStates() const &
Definition: NPDA.h:197
const StateType & getInitialState() const &
Definition: NPDA.h:119
const ext::set< StateType > & getStates() const &
Definition: NPDA.h:148
const ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, ext::vector< PushdownStoreSymbolType > >, ext::pair< StateType, ext::vector< PushdownStoreSymbolType > > > & getTransitions() const &
Definition: NPDA.h:644
Nondeterministic Z-Automaton. Computation model for unranked regular tree languages.
Definition: NondeterministicZAutomaton.h:68
const ext::multimap< ext::pair< ext::variant< SymbolType, StateType >, ext::vector< ext::variant< SymbolType, StateType > > >, StateType > & getTransitions() const &
Definition: NondeterministicZAutomaton.h:283
const ext::set< StateType > & getStates() const &
Definition: NondeterministicZAutomaton.h:99
const ext::set< StateType > & getFinalStates() const &
Definition: NondeterministicZAutomaton.h:148
const ext::set< SymbolType > & getInputAlphabet() const &
Definition: NondeterministicZAutomaton.h:197
Deterministic single tape turing machine. Accepts recursive languages.
Definition: OneTapeDTM.h:71
const StateType & getInitialState() const &
Definition: OneTapeDTM.h:108
const ext::set< StateType > & getFinalStates() const &
Definition: OneTapeDTM.h:186
const ext::map< ext::pair< StateType, SymbolType >, ext::tuple< StateType, SymbolType, Shift > > & getTransitions() const &
Definition: OneTapeDTM.h:526
const ext::set< StateType > & getStates() const &
Definition: OneTapeDTM.h:137
Deterministic real time height deterministic pushdown automaton. Accepts subset of context free langu...
Definition: RealTimeHeightDeterministicDPDA.h:89
const StateType & getInitialState() const &
Definition: RealTimeHeightDeterministicDPDA.h:149
const ext::map< ext::pair< StateType, common::symbol_or_epsilon< InputSymbolType > >, ext::pair< StateType, PushdownStoreSymbolType > > & getCallTransitions() const &
Definition: RealTimeHeightDeterministicDPDA.h:1062
const ext::map< ext::pair< StateType, common::symbol_or_epsilon< InputSymbolType > >, StateType > & getLocalTransitions() const &
Definition: RealTimeHeightDeterministicDPDA.h:1082
const ext::map< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, PushdownStoreSymbolType >, StateType > & getReturnTransitions() const &
Definition: RealTimeHeightDeterministicDPDA.h:1072
const ext::set< StateType > & getStates() const &
Definition: RealTimeHeightDeterministicDPDA.h:178
const ext::set< StateType > & getFinalStates() const &
Definition: RealTimeHeightDeterministicDPDA.h:227
Nondeterministic real time height deterministic pushdown automaton. Accepts subset of context free la...
Definition: RealTimeHeightDeterministicNPDA.h:76
const ext::set< StateType > & getInitialStates() const &
Definition: RealTimeHeightDeterministicNPDA.h:175
const ext::set< StateType > & getStates() const &
Definition: RealTimeHeightDeterministicNPDA.h:126
const ext::multimap< ext::pair< StateType, common::symbol_or_epsilon< InputSymbolType > >, StateType > & getLocalTransitions() const &
Definition: RealTimeHeightDeterministicNPDA.h:1004
const ext::multimap< ext::pair< StateType, common::symbol_or_epsilon< InputSymbolType > >, ext::pair< StateType, PushdownStoreSymbolType > > & getCallTransitions() const &
Definition: RealTimeHeightDeterministicNPDA.h:984
const ext::set< StateType > & getFinalStates() const &
Definition: RealTimeHeightDeterministicNPDA.h:224
const ext::multimap< ext::tuple< StateType, common::symbol_or_epsilon< InputSymbolType >, PushdownStoreSymbolType >, StateType > & getReturnTransitions() const &
Definition: RealTimeHeightDeterministicNPDA.h:994
Deterministic pushdown automaton requiring a symbol pop from pushdown store on each transition use....
Definition: SinglePopDPDA.h:78
const StateType & getInitialState() const &
Definition: SinglePopDPDA.h:116
const ext::set< StateType > & getFinalStates() const &
Definition: SinglePopDPDA.h:194
const ext::set< StateType > & getStates() const &
Definition: SinglePopDPDA.h:145
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: SinglePopNPDA.h:72
const StateType & getInitialState() const &
Definition: SinglePopNPDA.h:110
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
const ext::set< StateType > & getFinalStates() const &
Definition: SinglePopNPDA.h:188
Nondeterministic unordered finite tree automaton without epsilon transitions. Accepts regular tree la...
Definition: UnorderedNFTA.h:72
const ext::set< StateType > & getStates() const &
Definition: UnorderedNFTA.h:110
const ext::set< StateType > & getFinalStates() const &
Definition: UnorderedNFTA.h:159
const ext::multimap< ext::pair< common::ranked_symbol< SymbolType >, ext::multiset< StateType > >, StateType > & getTransitions() const &
Definition: UnorderedNFTA.h:294
Deterministic visibly pushdown automaton. Accepts subset of context free languages.
Definition: VisiblyPushdownDPDA.h:86
const ext::map< ext::tuple< StateType, InputSymbolType, PushdownStoreSymbolType >, StateType > & getReturnTransitions() const &
Definition: VisiblyPushdownDPDA.h:899
const ext::map< ext::pair< StateType, InputSymbolType >, StateType > & getLocalTransitions() const &
Definition: VisiblyPushdownDPDA.h:909
const ext::set< StateType > & getFinalStates() const &
Definition: VisiblyPushdownDPDA.h:224
const ext::map< ext::pair< StateType, InputSymbolType >, ext::pair< StateType, PushdownStoreSymbolType > > & getCallTransitions() const &
Definition: VisiblyPushdownDPDA.h:889
const ext::set< StateType > & getStates() const &
Definition: VisiblyPushdownDPDA.h:175
const StateType & getInitialState() const &
Definition: VisiblyPushdownDPDA.h:146
Nondeterministic visibly pushdown automaton. Accepts subset of context free languages.
Definition: VisiblyPushdownNPDA.h:81
const ext::set< StateType > & getInitialStates() const &
Definition: VisiblyPushdownNPDA.h:131
const ext::set< StateType > & getStates() const &
Definition: VisiblyPushdownNPDA.h:180
const ext::multimap< ext::pair< StateType, InputSymbolType >, StateType > & getLocalTransitions() const &
Definition: VisiblyPushdownNPDA.h:884
const ext::set< StateType > & getFinalStates() const &
Definition: VisiblyPushdownNPDA.h:229
const ext::multimap< ext::tuple< StateType, InputSymbolType, PushdownStoreSymbolType >, StateType > & getReturnTransitions() const &
Definition: VisiblyPushdownNPDA.h:874
const ext::multimap< ext::pair< StateType, InputSymbolType >, ext::pair< StateType, PushdownStoreSymbolType > > & getCallTransitions() const &
Definition: VisiblyPushdownNPDA.h:864
static void convertInternal(ext::ostream &oss, const rte::FormalRTE< SymbolType > &rte, const std::string &nodePrefix="")
Definition: DotConverterRTEPart.hxx:31
static void convertInternal(ext::ostream &oss, const tree::RankedTree< SymbolType > &tree)
Definition: DotConverterTreePart.hxx:24
Definition: DotConverter.h:58
static std::string convert(const T &automaton)
Definition: DotConverter.h:212
static void convert(ext::ostream &out, const automaton::DFA< SymbolType, StateType > &a)
Definition: DotConverter.h:318
Basic exception from which all other exceptions are derived.
Definition: CommonException.h:21
Class extending the map class from the standard library. Original reason is to allow printing of the ...
Definition: map.hpp:48
R & at(const T &key, R &defaultValue)
Definition: map.hpp:163
std::pair< iterator, bool > insert(const T &key, const R &value)
Insert variant with explicit key and value parameters.
Definition: map.hpp:118
auto end() &
Inherited behavior of end for non-const instance.
Definition: map.hpp:215
typename std::map< T, R, Cmp, Alloc >::iterator iterator
The iterator type is inheried.
Definition: map.hpp:101
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
std::string str() const &
Definition: sstream.cpp:29
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
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
static std::string toString(const T &data)
Definition: StringDataFactory.hpp:89
Tree structure represented in its natural representation. The representation is so called ranked,...
Definition: RankedTree.h:72
typename T::StateType StateType
Definition: ToGrammarLeftRG.h:64
int i
Definition: AllEpsilonClosure.h:118
typename T::SymbolType SymbolType
Definition: ReachableStates.h:176
Definition: ToGrammar.h:31
Definition: converterCommon.hpp:8
auto replaceInplace
Definition: converterCommon.hpp:10
auto replace
Definition: converterCommon.hpp:19
ContainerType< ResType > transform(const ContainerType< InType, Ts ... > &in, Callback transform)
In container tranformation of all elements according to the tranform.
Definition: algorithm.hpp:150
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_tuple(Elements &&... args)
Helper of extended tuple construction. The tuple is constructed from values pack, types are deduced.
Definition: tuple.hpp:203
constexpr auto make_pair(T1 &&x, T2 &&y)
Definition: pair.hpp:79
string::LinearString< char > stringFrom(const std::string &string)
Definition: String.cpp:10