|
Go to the documentation of this file.
19 FD_DF( "ConstructController(" << &rSpec << "," << &rPlant << ")");
23 FD_WARN( "The given system automaton (plant) is not deterministic ! "
24 "May use Deterministic(const Generator&,Generator& rResGen) ");
27 FD_WARN( "The given pushdown automaton (spec) is not deterministic !");
31 if (&rResPd == &rSpec) {
32 pResPd = rResPd. New();
41 FD_DF( "ConstructController: PreCombine done !");
52 if (pResPd != &rResPd) {
62 FD_DF( "ConstructControllerPreCombine(" << &rSpec << "," << &rPlant << ")");
67 FD_DF( "ConstructControllerPreCombine: Times done !");
72 FD_DF( "ConstructControllerPreCombine: Blockfree done !");
86 FD_DF( "ConstructControllerLoop(" << &rContr << "," << &rPlant << ") " + iteration);
88 DEBUG_PRINTF(debug, ( "LoopControllerCandidate_" + iteration), rContr);
94 rPd = Times(rPlant, rContr);
99 DEBUG_PRINTF(debug, ( "LoopTimesTrim_" + iteration), rPd);
104 FD_DF( "ConstructControllerLoop: Split done !");
108 DEBUG_PRINTF(debug, ( "LoopSplitTrim_" + iteration), rPd);
124 rPd = Rnce(rPd, rPlant);
127 if (numberOfStates == rPd. Size()) {
135 DEBUG_PRINTF(debug, "numberOfStates != rPd.Size()", "");
153 FD_DF( "PushdownBlockfree(" << &pd << "," << &resPd << ")");
157 FD_WARN( "PushdownBlockfree: The given pushdown automaton is not deterministic !");
208 if(gr.GrammarProductions().empty()){
225 v.push_back(stackSymbolIdx);
247 DEBUG_PRINTF(debug, "BlockfreeTransformedParserActions",parser.Str());
319 FD_DF( "PushdownAccessible(" << &pd << "," << &resPd << ")");
323 FD_WARN( "PushdownBlockfree: The given pushdown automaton is not deterministic !");
342 tmp = SPDA(tmp, &history);
373 tmp.vGenerator::Accessible();
384 PopPushSet::const_iterator ppit;
389 if (!tmp.ExistsTransition(*transit, ppit->first, ppit->second)) {
400 tmp.vGenerator::Accessible();
423 rStates. Insert(transit->X1);
435 FD_DF( "Rnce(" << &pd << "," << &s << ")");
440 StateSet::Iterator stateit;
441 EventSet::Iterator eventit;
451 std::stringstream errstr;
453 << "State in Rnce was neither head nor ear, check correctness of Merge attribute"
455 throw Exception( "Rnce", errstr.str(), 1001);
464 if (transientStates. Exists(*stateit)) {
469 for (eventit = uc. Begin(); eventit != uc. End(); eventit++) {
497 FD_DF( "Times(" << &s << "," << &pd << ")");
504 std::map<std::pair<Idx, Idx>, Idx> stateMap;
506 StateSet::Iterator pdStateit, sStateit;
508 std::vector<Idx> oldStatesVector;
518 std::make_pair(std::make_pair(*sStateit, *pdStateit),
522 oldStatesVector.clear();
523 oldStatesVector.push_back(*sStateit);
524 oldStatesVector.push_back(*pdStateit);
557 std::string sEvName, pdEvName;
560 PopPushSet::const_iterator ppsit;
566 ppsit != pd. PopPushEnd(*pdTransit); ppsit++) {
576 newX1 = stateMap.find(
577 std::make_pair(*sStateit, pdTransit->X1))->second;
578 newX2 = stateMap.find(
579 std::make_pair(*sStateit, pdTransit->X2))->second;
583 newX2, ppsit->first, ppsit->second);
596 if (pdEvName.compare(sEvName) == 0) {
601 std::make_pair(sTransit->X1,
602 pdTransit->X1))->second;
605 std::make_pair(sTransit->X2,
606 pdTransit->X2))->second;
610 ppsit->first, ppsit->second);
632 EventSet::Iterator pdEventit, sEventit;
637 if (*pdEventit == *sEventit) {
676 FD_DF( "Split(" << &pd << ")");
692 std::multimap<Idx, std::pair<Idx, Idx> > headEarMap;
695 std::map<Idx, Idx> headMap, earMap;
697 StackSymbolSet::Iterator ssit;
715 headMap.insert(std::make_pair(*stateit, newHead));
734 earMap.insert(std::make_pair(newEar, *stateit));
737 std::make_pair(newHead, std::make_pair(newEar, *ssit)));
744 PopPushSet::const_iterator popPushit;
745 std::multimap<Idx, std::pair<Idx, Idx> >::iterator headEarit;
746 std::vector<Idx> ssvector;
747 Idx head, ear, startState, endState, event;
751 for (headEarit = headEarMap.begin(); headEarit != headEarMap.end();
755 head = headEarit->first;
756 ear = headEarit->second.first;
757 stackSymbol = headEarit->second.second;
760 ssvector.push_back(stackSymbol);
769 popPushit != pd. PopPushEnd(*transit); popPushit++) {
775 if (earMap.find(ear)->second == transit->X1
776 && stackSymbol == *popPushit->first.begin()) {
779 endState = headMap.find(transit->X2)->second;
785 popPushit->first, popPushit->second);
798 EventSet::Iterator correctevit, evit;
801 correctevit != correctPd. AlphabetEnd(); correctevit++) {
802 if (*evit == *correctevit) {
839 if (x->tv_usec < y->tv_usec) {
840 int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
841 y->tv_usec -= 1000000 * nsec;
844 if (x->tv_usec - y->tv_usec > 1000000) {
845 int nsec = (x->tv_usec - y->tv_usec) / 1000000;
846 y->tv_usec += 1000000 * nsec;
852 result->tv_sec = x->tv_sec - y->tv_sec;
853 result->tv_usec = x->tv_usec - y->tv_usec;
856 return x->tv_sec < y->tv_sec;
libFAUDES 2.26g
--- 2015.08.17
--- c++ api documentaion by doxygen
|