omg_buechictrl.h
Go to the documentation of this file.
1 /** @file omg_buechictrl.h Supremal controllable sublanguage w.r.t. Buechi acceptance */
2 
3 /* FAU Discrete Event Systems Library (libfaudes)
4 
5  Copyright (C) 2010,2025 Thomas Moor
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
20 
21 
22 #ifndef FAUDES_OMG_BUECHICTRL_H
23 #define FAUDES_OMG_BUECHICTRL_H
24 
25 #include "corefaudes.h"
26 #include "syn_include.h"
27 #include <stack>
28 
29 namespace faudes {
30 
31 
32 
33 
34 /**
35  * Test omega controllability
36  *
37  * Tests whether the candidate supervisor H is omega controllable w.r.t.
38  * the plant G, where omega-languages are interpreted by Buechi acceptance condition.
39  * This implementation invokes IsControllable and IsBuechiRelativelyClosed.
40  * A future implementation may be more efficient.
41  *
42  * Parameter restrictions: both generators must be deterministic, omega-trim and
43  * have the same alphabet.
44  *
45  *
46  * @param rPlantGen
47  * Plant G
48  * @param rCAlph
49  * Controllable events
50  * @param rSupCandGen
51  * Supervisor candidate H
52  *
53  * @exception Exception
54  * - Alphabets of generators don't match (id 100)
55  * - Arguments are not omega trim (id 201, only if FAUDES_CHECKED is set)
56  * - Arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
57  *
58  * @return
59  * true / false
60  *
61  * @ingroup OmgPlugin
62  */
64  const Generator& rPlantGen,
65  const EventSet& rCAlph,
66  const Generator& rSupCandGen);
67 
68 
69 /**
70  * Test omega-controllability.
71  *
72  * Tests whether the candidate supervisor h is omega controllable w.r.t.
73  * the plant g; this is a System wrapper for IsOmegaControllable.
74  *
75  * @param rPlantGen
76  * Plant g generator
77  * @param rSupCandGen
78  * Supervisor candidate h generator
79  *
80  * @exception Exception
81  * - Alphabets of generators don't match (id 100)
82  * - Arguments are not omega trim (id 201, only if FAUDES_CHECKED is set)
83  * - Arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
84  *
85  * @return
86  * true / false
87  *
88  * @ingroup OmgPlugin
89  */
91  const System& rPlantGen,
92  const Generator& rSupCandGen);
93 
94 
95 
96 
97 
98 /**
99  * Omega-synthesis w.r.t. Buechi acceptance condition
100  *
101  * Computation of the supremal oemga-controllable sublanguage as proposed by
102  * Thistle/Wonham in "Control of w-Automata, Church's Problem, and the Emptiness
103  * Problem for Tree w-Automata", 1992, and, here, applied to the specific case
104  * of deterministic Buechi automata. In the given setting, the result matches the
105  * limit of the controllable prefix intersected with the plant and specification
106  * omega-languages.
107  *
108  * Parameter restrictions: both generators must be deterministic and
109  * refer to the same alphabet.
110  *
111  *
112  * @param rPlantGen
113  * Plant G
114  * @param rCAlph
115  * Controllable events
116  * @param rSpecGen
117  * Specification Generator E
118  * @param rResGen
119  * Reference to resulting Generator to realize
120  * the supremal closed-loop behaviour.
121  *
122  * @exception Exception
123  * - alphabets of generators don't match (id 100)
124  * - plant nondeterministic (id 201)
125  * - spec nondeterministic (id 203)
126  * - plant and spec nondeterministic (id 204)
127  *
128  * @ingroup OmgPlugin
129  *
130  */
131 extern FAUDES_API void SupBuechiCon(
132  const Generator& rPlantGen,
133  const EventSet& rCAlph,
134  const Generator& rSpecGen,
135  Generator& rResGen);
136 
137 
138 
139 /**
140  * Omega-synthesis w.r.t. Buechi acceptance
141  *
142  * This is the RTI wrapper for
143  * SupBuchiCon(const Generator&, const EventSet&, const Generator&, Generator&).
144  * Controllability attributes are taken from the plant argument.
145  * If the result is specified as a System, attributes will be copied
146  * from the plant argument.
147  *
148  *
149  * @param rPlantGen
150  * Plant System
151  * @param rSpecGen
152  * Specification Generator
153  * @param rResGen
154  * Reference to resulting Generator to realize
155  * the supremal closed-loop behaviour.
156  *
157  * @exception Exception
158  * Alphabets of generators don't match (id 100)
159  * plant nondeterministic (id 201)
160  * spec nondeterministic (id 203)
161  * plant and spec nondeterministic (id 204)
162  *
163  * @ingroup OmgPlugin
164  */
165 extern FAUDES_API void SupBuechiCon(
166  const System& rPlantGen,
167  const Generator& rSpecGen,
168  Generator& rResGen);
169 
170 
171 /**
172  * Omega-synthesis w.r.t. Buechi accptance
173  *
174  * This procedure first computes the supremal omega-controllable sublanguage as proposed by
175  * J. Thistle, 1992, applied to the specific case of deterministoc Buechi automata.
176  * It then applies a control pattern to obtain a relatively topologically-closed result,
177  * i.e., the topological closure of the result can be used as a supervisor.
178  *
179  * Parameter restrictions: both generators must be deterministic and
180  * have the same alphabet.
181  *
182  *
183  * @param rPlantGen
184  * Plant G
185  * @param rCAlph
186  * Controllable events
187  * @param rSpecGen
188  * Specification Generator E
189  * @param rResGen
190  * Reference to resulting Generator to realize
191  * the closed-loop behaviour.
192  *
193  * @exception Exception
194  * - alphabets of generators don't match (id 100)
195  * - plant nondeterministic (id 201)
196  * - spec nondeterministic (id 203)
197  * - plant and spec nondeterministic (id 204)
198  *
199  * @ingroup OmgPlugin
200  *
201  */
202 extern FAUDES_API void BuechiCon(
203  const Generator& rPlantGen,
204  const EventSet& rCAlph,
205  const Generator& rSpecGen,
206  Generator& rResGen);
207 
208 
209 
210 /**
211  * Omega-synthesis
212  *
213  * This is the RTI wrapper for
214  * BuechiCon(const Generator&, const EventSet&, const Generator&, Generator&).
215  * Controllability attributes are taken from the plant argument.
216  * If the result is specified as a System, attributes will be copied
217  * from the plant argument.
218  *
219  *
220  * @param rPlantGen
221  * Plant System
222  * @param rSpecGen
223  * Specification Generator
224  * @param rResGen
225  * Reference to resulting Generator to realize
226  * the closed-loop behaviour.
227  *
228  * @exception Exception
229  * Alphabets of generators don't match (id 100)
230  * plant nondeterministic (id 201)
231  * spec nondeterministic (id 203)
232  * plant and spec nondeterministic (id 204)
233  *
234  * @ingroup OmgPlugin
235  */
236 extern FAUDES_API void BuechiCon(
237  const System& rPlantGen,
238  const Generator& rSpecGen,
239  Generator& rResGen);
240 
241 
242 /**
243  * Omega-synthesis for partial observation (experimental!)
244  *
245  * Variation of supremal omega-controllable sublanguage to address
246  * normality requirements in the context of partial observation. The test
247  * used in this implementation is sufficient but presumably to necessary.
248  * Thus, the function in general return only a subset of the relevant controllable
249  * prefix.
250  *
251  * Parameter restrictions: both generators must be deterministic and
252  * have the same alphabet.
253  *
254  *
255  * @param rPlantGen
256  * Plant G
257  * @param rCAlph
258  * Controllable events
259  * @param rOAlph
260  * Observable events
261  * @param rSpecGen
262  * Specification Generator E
263  * @param rResGen
264  * Reference to resulting Generator to realize
265  * the supremal closed-loop behaviour.
266  *
267  * @exception Exception
268  * - alphabets of generators don't match (id 100)
269  * - plant nondeterministic (id 201)
270  * - spec nondeterministic (id 203)
271  * - plant and spec nondeterministic (id 204)
272  *
273  * @ingroup OmgPlugin
274  *
275  */
276 extern FAUDES_API void SupBuechiConNorm(
277  const Generator& rPlantGen,
278  const EventSet& rCAlph,
279  const EventSet& rOAlph,
280  const Generator& rSpecGen,
281  Generator& rResGen);
282 
283 
284 
285 /**
286  * Omega-synthesis for partial observation (experimental!)
287  *
288  *
289  * This is the RTI wrapper for
290  * SupBuechiConNorm(const Generator&, const EventSet&, const Generator&, Generator&).
291  * Controllability attributes and observability attributes are taken from the plant argument.
292  * If the result is specified as a System, attributes will be copied
293  * from the plant argument.
294  *
295  *
296  * @param rPlantGen
297  * Plant System
298  * @param rSpecGen
299  * Specification Generator
300  * @param rResGen
301  * Reference to resulting Generator to realize
302  * the supremal closed-loop behaviour.
303  *
304  * @exception Exception
305  * Alphabets of generators don't match (id 100)
306  * plant nondeterministic (id 201)
307  * spec nondeterministic (id 203)
308  * plant and spec nondeterministic (id 204)
309  *
310  * @ingroup OmgPlugin
311  */
312 extern FAUDES_API void SupBuechiConNorm(
313  const System& rPlantGen,
314  const Generator& rSpecGen,
315  Generator& rResGen);
316 
317 
318 
319 /**
320  * Omega-synthesis for partial observation (experimental!)
321  *
322  * Variation of supremal controllable prefix under partial observation.
323  * This variation applies a control pattern to obtain a relatively closed and
324  * omega-normal result. The latter properties are validated and an exception
325  * is thrown on an error. Thus, this function should not produce "false-positives".
326  * However, since it is derived from SupBuechiConNorm(), is may return the
327  * empty languages even if a non-empty controller exists.
328  *
329  * Parameter restrictions: both generators must be deterministic and
330  * have the same alphabet.
331  *
332  *
333  * @param rPlantGen
334  * Plant G
335  * @param rCAlph
336  * Controllable events
337  * @param rOAlph
338  * Observable events
339  * @param rSpecGen
340  * Specification Generator E
341  * @param rResGen
342  * Reference to resulting Generator to realize
343  * the supremal closed-loop behaviour.
344  *
345  * @exception Exception
346  * - alphabets of generators don't match (id 100)
347  * - plant nondeterministic (id 201)
348  * - spec nondeterministic (id 203)
349  * - plant and spec nondeterministic (id 204)
350  *
351  * @ingroup OmgPlugin
352  *
353  */
354 extern FAUDES_API void BuechiConNorm(
355  const Generator& rPlantGen,
356  const EventSet& rOAlph,
357  const EventSet& rCAlph,
358  const Generator& rSpecGen,
359  Generator& rResGen);
360 
361 
362 
363 /**
364  * Omega-synthesis for partial observation (experimental!)
365  *
366  * This is the RTI wrapper for
367  * BuechiConNorm(const Generator&, const EventSet&, const Generator&, Generator&).
368  * Controllability attributes are taken from the plant argument.
369  * If the result is specified as a System, attributes will be copied
370  * from the plant argument.
371  *
372  *
373  * @param rPlantGen
374  * Plant System
375  * @param rSpecGen
376  * Specification Generator
377  * @param rResGen
378  * Reference to resulting Generator to realize
379  * the closed-loop behaviour.
380  *
381  * @exception Exception
382  * Alphabets of generators don't match (id 100)
383  * plant nondeterministic (id 201)
384  * spec nondeterministic (id 203)
385  * plant and spec nondeterministic (id 204)
386  *
387  * @ingroup OmgPlugin
388  */
389 extern FAUDES_API void BuechiConNorm(
390  const System& rPlantGen,
391  const Generator& rSpecGen,
392  Generator& rResGen);
393 
394 
395 
396 
397 } // namespace faudes
398 
399 #endif
400 
401 
#define FAUDES_API
Definition: cfl_platform.h:80
NameSet EventSet
Definition: cfl_nameset.h:534
vGenerator Generator
TcGenerator< AttributeVoid, AttributeVoid, AttributeCFlags, AttributeVoid > System
void BuechiConNorm(const Generator &rPlantGen, const EventSet &rCAlph, const EventSet &rOAlph, const Generator &rSpecGen, Generator &rResGen)
void SupBuechiCon(const Generator &rPlantGen, const EventSet &rCAlph, const Generator &rSpecGen, Generator &rResGen)
bool IsBuechiControllable(const Generator &rGenPlant, const EventSet &rCAlph, const Generator &rGenCand)
void BuechiCon(const Generator &rPlantGen, const EventSet &rCAlph, const Generator &rSpecGen, Generator &rResGen)
void SupBuechiConNorm(const Generator &rPlantGen, const EventSet &rCAlph, const EventSet &rOAlph, const Generator &rSpecGen, Generator &rResGen)

libFAUDES 2.33h --- 2025.06.18 --- c++ api documentaion by doxygen