tp_3_parallel.cpp

Go to the documentation of this file.
00001 /** @file tp_3_parallel.cpp
00002 
00003 Tutorial, timed parallel composition.
00004 Demonstratates synchronous composition of two timed automata by function faudes::TParallel
00005 
00006 @ingroup Tutorials 
00007 
00008 @include tp_3_parallel.cpp
00009 
00010 */
00011 
00012 
00013 #include "libfaudes.h"
00014 #include "tp_include.h"
00015 
00016 
00017 // for simplicity we make the faudes namespace available to our program
00018 
00019 using namespace faudes;
00020 
00021 
00022 
00023 /////////////////
00024 // main program
00025 /////////////////
00026 
00027 int main() {
00028 
00029   // read two generators ...
00030   TimedGenerator g1("data/tsimplemachine.gen");
00031   TimedGenerator g2("data/tbuffer.gen");
00032 
00033   // ... and perform parallel composition
00034   TimedGenerator gres;
00035   TParallel(g1,g2,gres);
00036 
00037   // Report
00038   std::cout << "######################################\n";
00039   std::cout << "# t simple machine with buffer  \n";
00040   gres.DWrite();
00041   std::cout << "######################################\n";
00042 
00043   // Save to file
00044   gres.Write("tmp_tmachinewithbuffer.gen");
00045 
00046   // Test protocol
00047   FAUDES_TEST_DUMP("composition",gres.ToText());
00048 
00049   return 0;
00050 }
00051 
00052 
00053 

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