dol: initial dol commit
[jump.git] / dol / src / dol / visitor / yapi / lib / main.cpp
1 #include "yapi.h"
2 #include "application.h"
3 #include <fstream>
4
5 using namespace std;
6
7 int main()
8 {
9   // create yapi run-time environment
10   RTE rte;
11
12   // redirect standard output
13   ofstream f("./app.out");
14   rte.setOutStream(f);
15
16   // redirect standard error
17   ofstream g("./app.err");
18   rte.setErrorStream(g);
19
20   // create toplevel process network
21   Application app(id("app"));
22
23   // start the process network and
24   // wait for processes to finish
25   rte.start(app);
26
27   // print workload
28   ofstream h("./appworkload.txt");
29   printWorkload(app, h);
30
31   // generate dotty file
32   ofstream i("./app.dot");
33   printDotty(app, i);
34
35   f.close();
36   g.close();
37   h.close();
38   i.close();
39
40   return 0;
41 }