ios_2_synthesis.cpp
Go to the documentation of this file.
1/** @file ios_2_synthesis.cpp
2
3Tutorial, I/O system synthesis
4
5This tutorial runs the two examples from
6the techical report Moor/Schmidt/Wittmann, 2010.
7It thereby demonstrates the use of the provided
8functions for the synthesis of I/O controllers.
9
10@ingroup Tutorials
11
12@include ios_2_synthesis.cpp
13
14*/
15
16
17#include "libfaudes.h"
18
19
20// make the faudes namespace available to our program
21using namespace faudes;
22
23
24
25/////////////////
26// main program
27/////////////////
28
29int main() {
30
31 // Read plant and speification generators
32 IoSystem planta("data/ios_planta.gen");
33 Generator speca("data/ios_speca.gen");
34
35 // Adjust specification alphabet
36 InvProject(speca,planta.Alphabet());
37
38 // Run synthesis algorithm
39 IoSystem supera;
40 supera.StateNamesEnabled(false);
41 IoSynthesisClosed(planta,speca,supera);
42 aStateMin(supera,supera);
43
44 // Report to console
45 std::cout << "################################\n";
46 std::cout << "# tutorial, supervisor a \n";
47 supera.DWrite();
48 std::cout << "################################\n";
49
50
51 // Read plant and speification generators
52 IoSystem plantb("data/ios_plantb.gen");
53 Generator specb("data/ios_specb.gen");
54
55 // Adjust specification alphabet
56 InvProject(specb,plantb.Alphabet());
57
58 // Run synthesis algorithm
59 IoSystem superb;
60 superb.StateNamesEnabled(false);
61 IoSynthesis(plantb,specb,superb);
62 aStateMin(superb,superb);
63
64 // Report to console
65 std::cout << "################################\n";
66 std::cout << "# tutorial, supervisor b \n";
67 superb.DWrite();
68 std::cout << "################################\n";
69
70 // Record testcase
71 FAUDES_TEST_DUMP("supA",supera);
72 FAUDES_TEST_DUMP("supB",superb);
73
74 // Done
75 return 0;
76}
77
78
79
#define FAUDES_TEST_DUMP(mes, dat)
Definition cfl_utils.h:505
const TaEventSet< EventAttr > & Alphabet(void) const
void DWrite(const Type *pContext=0) const
bool StateNamesEnabled(void) const
void aStateMin(const Generator &rGen, Generator &rResGen)
void InvProject(Generator &rGen, const EventSet &rProjectAlphabet)
int main()
void IoSynthesisClosed(const IoSystem &rPlant, const Generator &rSpec, IoSystem &rSup)
void IoSynthesis(const IoSystem &rPlant, const Generator &rSpec, IoSystem &rSup)

libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen