pd_pushdown_V2.cpp
Go to the documentation of this file.
1 /** @file pd_pushdown_V2.cpp
2 
3 Construct a controller from given files
4 @ingroup Tutorials
5 
6 @include pd_pushdown_V2.cpp
7 
8 */
9 
10 /* Pushdown plugin for FAU Discrete Event Systems Library (libfaudes)
11 
12  Copyright (C) 2013 Stefan Jacobi, Sven Schneider, Anne-Kathrin Hess
13 
14 */
15 
16 
17 #include "libfaudes.h"
18 #include "pd_include.h"
19 
20 
21 // make the faudes namespace available to our program
22 namespace faudes{
23 
24 
25 int main(std::string& arg1,std::string& arg2){
26 
27  std::cout << "********** Controller Construction ****************" << std::endl;
28  std::cout << "********** pushdown_V2 ****************" << std::endl;
29 
30 
31  System sys = SystemFromDot(arg1);
32  PushdownGenerator pd(arg2);
33 
34  PushdownGenerator controller;
35 
36  PushdownConstructController(pd,sys,controller);
37 
38  controller.DotWrite("pushdown_V2_Controller.dot");
39 
40  return 0;
41 }
42 
43 } // namespace
44 
45 int main( int argc, char **argv ){
46 
47  if(argc < 3){
48  std::cout << "Missing arguments " << std::endl;
49  std::cout << "Use: pd_pushdown_V2 < dot-file DFA> <dot-file DPDA>" << std::endl;
50 
51  return 1;
52  }
53  static time_t starttime = time(0);
54 
55  std::string arg1 = argv[1];
56  std::string arg2 = argv[2];
57  faudes::main(arg1,arg2);
58 
59  int funTime = static_cast<int>(difftime(time(0),starttime));
60  std::stringstream sfunTime;
61 
62  std::cout << "Finish: " << funTime/60 << "min " << funTime % 60 << "s \n";
63 
64  return 0;
65 }
66 
67 

libFAUDES 2.28c --- 2016.09.30 --- c++ api documentaion by doxygen