ios_2_synthesis.cpp

Go to the documentation of this file.
00001 /** @file ios_2_synthesis.cpp  
00002 
00003 Tutorial, I/O system synthesis
00004 
00005 This tutorial runs the two examples from 
00006 the techical report Moor/Schmidt/Wittmann, 2010.
00007 It thereby demonstrates the use of the provided
00008 functions for the synthesis of I/O controllers.
00009 
00010 @ingroup Tutorials 
00011 
00012 @include ios_2_synthesis.cpp
00013 
00014 */
00015 
00016 
00017 #include "libfaudes.h"
00018 
00019 
00020 // make the faudes namespace available to our program
00021 using namespace faudes;
00022 
00023 
00024 
00025 /////////////////
00026 // main program
00027 /////////////////
00028 
00029 int main() {
00030 
00031   // Read plant and speification generators
00032   IoSystem planta("data/ios_planta.gen");
00033   Generator speca("data/ios_speca.gen");
00034 
00035   // Adjust specification alphabet
00036   InvProject(speca,planta.Alphabet()); 
00037   
00038   // Run synthesis algorithm
00039   IoSystem supera;
00040   supera.StateNamesEnabled(false);
00041   IoSynthesis(planta,speca,supera);
00042   aStateMin(supera,supera);
00043 
00044   // Report to console
00045   std::cout << "################################\n";
00046   std::cout << "# tutorial, supervisor a \n";
00047   supera.DWrite();
00048   std::cout << "################################\n";
00049 
00050 
00051   // Read plant and speification generators
00052   IoSystem plantb("data/ios_plantb.gen");
00053   Generator specb("data/ios_specb.gen");
00054 
00055   // Adjust specification alphabet
00056   InvProject(specb,plantb.Alphabet()); 
00057   
00058   // Run synthesis algorithm
00059   IoSystem superb;
00060   superb.StateNamesEnabled(false);
00061   IoSynthesisNB(plantb,specb,superb);
00062   aStateMin(superb,superb);
00063 
00064   // Report to console
00065   std::cout << "################################\n";
00066   std::cout << "# tutorial, supervisor b \n";
00067   superb.DWrite();
00068   std::cout << "################################\n";
00069 
00070   // Record testcase
00071   FAUDES_TEST_DUMP("supA",supera);
00072   FAUDES_TEST_DUMP("supB",superb);
00073 
00074   // Done
00075   return 0;
00076 }
00077 
00078 
00079 

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen