cfl_omega.h
Go to the documentation of this file.
1 /** @file cfl_omega.h
2 
3 Operations on omega languages.
4 
5 */
6 
7 /* FAU Discrete Event Systems Library (libfaudes)
8 
9  Copyright (C) 2010 Thomas Moor
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 2.1 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
24 
25 
26 #ifndef FAUDES_OMEGA_H
27 #define FAUDES_OMEGA_H
28 
29 #include "cfl_definitions.h"
30 #include "cfl_generator.h"
31 
32 namespace faudes {
33 
34 
35 /**
36  * Product composition for Buechi automata
37  *
38  * Referring to the Buechi acceptance condition, the resulting genarator
39  * accepts all those inifinite words that are accepted by both, G1 and G2.
40  * This implementation extends the usual product state space by a flag to indentify
41  * executions with alternating marking.
42  *
43  * @param rGen1
44  * First generator
45  * @param rGen2
46  * Second generator
47  * @param rResGen
48  * Reference to resulting product composition generator
49  *
50  *
51  * @ingroup GeneratorFunctions
52  *
53  */
54 extern FAUDES_API void OmegaProduct(const Generator& rGen1, const Generator& rGen2, Generator& rResGen);
55 
56 
57 /**
58  * Product composition for Buechi automata
59  *
60  * See also OmegaProduct(const Generator&, const Generator&, Generator&).
61  * This version tries to be transparent on event attributes: if
62  * argument attributes match and if the result can take the respective
63  * attributes, then they are copied; it is considered an error if
64  * argument attributes do not match.
65  *
66  * @param rGen1
67  * First generator
68  * @param rGen2
69  * Second generator
70  * @param rResGen
71  * Reference to resulting product composition generator
72  *
73  * @ingroup GeneratorFunctions
74  */
75 extern FAUDES_API void aOmegaProduct(const Generator& rGen1, const Generator& rGen2, Generator& rResGen);
76 
77 
78 /**
79  * Parallel composition with relaxed acceptance condition.
80  *
81  * This version of the parallel composition relaxes the synchronisation of the acceptance
82  * condition (marking). It requires that the omega extension of the generated language
83  * has infinitely many prefixes that comply to the marked languages of G1 and G2, referring
84  * to the projection on the respective alphabet.
85  * It does however not require the synchronous acceptance.
86  *
87  * @param rGen1
88  * First generator
89  * @param rGen2
90  * Second generator
91  * @param rResGen
92  * Reference to resulting parallel composition generator
93  *
94  *
95  * @ingroup GeneratorFunctions
96  *
97  */
98 extern FAUDES_API void OmegaParallel(const Generator& rGen1, const Generator& rGen2, Generator& rResGen);
99 
100 
101 /**
102  * Parallel composition with relaxed acceptance condition.
103  *
104  * See also OmegaParallel(const Generator&, const Generator&, Generator&).
105  * This version tries to be transparent on event attributes: if
106  * argument attributes match and if the result can take the respective
107  * attributes, then they are copied; it is considered an error if
108  * argument attributes do not match.
109  *
110  * @param rGen1
111  * First generator
112  * @param rGen2
113  * Second generator
114  * @param rResGen
115  * Reference to resulting composition generator
116  *
117  * @ingroup GeneratorFunctions
118  */
119 extern FAUDES_API void aOmegaParallel(const Generator& rGen1, const Generator& rGen2, Generator& rResGen);
120 
121 
122 /**
123  * Topological closure.
124  *
125  * This function computes the topological closure the omega language
126  * Bm realized by rGen.
127  *
128  * Method:
129  * First, OmegaTrim is called to erase all states of rGen that do not
130  * contribute to Bm. Then, all remaining states are marked.
131  *
132  * No restrictions on parameter.
133  *
134  *
135  * @param rGen
136  * Generator that realizes Bm to which omega closure is applied
137  *
138  * <h4>Example:</h4>
139  * <table>
140  * <tr> <td> Generator G </td> <td> PrefixClosure(G) </td> </tr>
141  * <tr>
142  * <td> @image html tmp_omegaclosure_g.png </td>
143  * <td> @image html tmp_omegaclosure_gRes.png </td>
144  * </tr>
145  * </table>
146  *
147  * @ingroup GeneratorFunctions
148  */
149 extern FAUDES_API void OmegaClosure(Generator& rGen);
150 
151 
152 /**
153  * Test for topologically closed omega language.
154  *
155  * This function tests whether the omega language Bm(G) realized by the specified generator G
156  * is topologically closed.
157  *
158  * Method:
159  * First, compute the omega-trim state set and restrict the discussion to that set.
160  * Then, omega-closedness is equivalent to the non-existence on a non-trivial SCC
161  * with no marked states.
162  *
163  * @param rGen
164  * Generator that realizes Bm to which omega closure is applied
165  * @return
166  * True <> Bm(G) is omega closed
167  *
168  * @ingroup GeneratorFunctions
169  */
170 extern FAUDES_API bool IsOmegaClosed(const Generator& rGen);
171 
172 
173 
174 
175 } // namespace faudes
176 
177 #endif
178 
Compiletime options.
Class vGenerator.
#define FAUDES_API
Interface export/import symbols: windows.
Definition: cfl_platform.h:81
vGenerator Generator
Plain generator, api typedef for generator with no attributes.
void aOmegaProduct(const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
Product composition for Buechi automata.
Definition: cfl_omega.cpp:67
bool IsOmegaClosed(const Generator &rGen)
Test for topologically closed omega language.
Definition: cfl_omega.cpp:488
void OmegaParallel(const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
Parallel composition with relaxed acceptance condition.
Definition: cfl_omega.cpp:261
void OmegaClosure(Generator &rGen)
Topological closure.
Definition: cfl_omega.cpp:470
void OmegaProduct(const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
Product composition for Buechi automata.
Definition: cfl_omega.cpp:102
void aOmegaParallel(const Generator &rGen1, const Generator &rGen2, Generator &rResGen)
Parallel composition with relaxed acceptance condition.
Definition: cfl_omega.cpp:226
libFAUDES resides within the namespace faudes.

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen