Synthesizes the minimal restrictive supervisor for a combination of plant and specification presented in the appendix of the technical report by Schneider and Schmuck (referenced at the webpage of this plugin). More... #include "libfaudes.h" #include "pd_include.h" Go to the source code of this file.
Detailed DescriptionSynthesizes the minimal restrictive supervisor for a combination of plant and specification presented in the appendix of the technical report by Schneider and Schmuck (referenced at the webpage of this plugin). This is a counterexample to the results by Griffin (2008) as his algorithm returns a real subset of the supremal controllable sublanguage. Using our tool (i.e. this tutorial), the correct supervisor is synthesized. To run the tutorial and both save the output to a file and display it in the terminal, use "./pd_counterexample_griffin ls -l 2>&1 | tee pd_counterexample_griffin.txt" /** @file pd_counterexample_griffin.cpp
Synthesizes the minimal restrictive supervisor for a combination of plant and specification presented in the appendix of the technical report by Schneider and Schmuck (referenced at the webpage of this plugin). This is a counterexample to the results by Griffin (2008) as his algorithm returns a real subset of the supremal controllable sublanguage. Using our tool (i.e. this tutorial), the correct supervisor is synthesized.
To run the tutorial and both save the output to a file and display it in the terminal, use
"./pd_counterexample_griffin ls -l 2>&1 | tee pd_counterexample_griffin.txt"
@ingroup Tutorials
@include pd_counterexample_griffin.cpp
*/
/* Pushdown plugin for FAU Discrete Event Systems Library (libfaudes)
Copyright (C) 2013 Sven Schneider,Anne-Kathrin Schmuck,Stefan Jacobi
*/
#include "libfaudes.h"
#include "pd_include.h"
// make the faudes namespace available to our program
using namespace faudes;
int main(){
//***********************************************
//create the specification, a pushdown generator
//************************************************
//insert states
g.InsState("q0");
g.InsState("q1");
g.InsState("q2");
//insert stack symbols
//insert events
g.InsControllableEvent("a");
g.InsControllableEvent("b");
g.InsUncontrollableEvent("u");
//g.InsUncontrollableEvent(FAUDES_PD_LAMBDA); //here, we do not have lambda-transitions
//build stack symbol vectors to be inserted as pop and push attributes of transitions
std::vector<Idx> vLambda; //vLambda is the abbreviation for the empty string
vLambda.push_back(lambda);
std::vector<Idx> vSquare; //vSquare is the abbreviation for the string "Box"
vSquare.push_back(square);
std::vector<Idx> vDot; //vDot is the abbreviation for the string "Dot"
vDot.push_back(dot);
std::vector<Idx> vDotSquare; // vDotSquare is the abbreviation for the string "Dot Box"
vDotSquare.push_back(dot); // here the dot is pushed AFTER (popped BEFORE) the Box
vDotSquare.push_back(square);
std::vector<Idx> vDotDot; // vDotDot is the abbreviation for the string "Dot Dot"
vDotDot.push_back(dot); // here two dots are pushed (popped)
vDotDot.push_back(dot);
//insert transitions
//set state attributes
g.SetMarkedState("q1");
g.SetMarkedState("q2");
//*******************************
//create the plant, a DFA
//*******************************
System s;
s.InsState("p0");
s.InsState("p1");
s.InsState("p2");
s.InsControllableEvent("a");
s.InsControllableEvent("b");
s.InsUncontrollableEvent("u");
s.SetMarkedState("p1");
s.SetMarkedState("p2");
//*******************************
//print plant and specification
//*******************************
g.Write();
s.Write();
//*******************************
//call synthesis algorithm
//*******************************
PushdownGenerator rPd;
PushdownConstructController(g,s,rPd);
//*******************************
//print result
//*******************************
std::cout << "***************** RESULT *****************" << std::endl;
rPd.Write();
//*******************************
//print words that are possible in the closed loop
//*******************************
LangK test(rPd);
test.FindLangK(50); //at most 50 are checked when generating words in the language
test.PrintWords();
return 0;
}
Definition in file pd_counterexample_griffin.cpp. Function Documentation
Definition at line 26 of file pd_counterexample_griffin.cpp. libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen |