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  * Omega-synthesis w.r.t. Buechi acceptance condition
97  *
98  * Computation of the supremal oemga-controllable sublanguage as proposed by
99  * Thistle/Wonham in "Control of w-Automata, Church's Problem, and the Emptiness
100  * Problem for Tree w-Automata", 1992, and, here, applied to the specific case
101  * of deterministic Buechi automata. In the given setting, the result matches the
102  * limit of the controllable prefix intersected with the plant and specification
103  * omega-languages.
104  *
105  * Parameter restrictions: both generators must be deterministic and
106  * refer to the same alphabet.
107  *
108  *
109  * @param rPlantGen
110  * Plant G
111  * @param rCAlph
112  * Controllable events
113  * @param rSpecGen
114  * Specification Generator E
115  * @param rResGen
116  * Reference to resulting Generator to realize
117  * the supremal closed-loop behaviour.
118  *
119  * @exception Exception
120  * - alphabets of generators don't match (id 100)
121  * - plant nondeterministic (id 201)
122  * - spec nondeterministic (id 203)
123  * - plant and spec nondeterministic (id 204)
124  *
125  * @ingroup OmgPlugin
126  *
127  */
128 extern FAUDES_API void SupBuechiCon(
129  const Generator& rPlantGen,
130  const EventSet& rCAlph,
131  const Generator& rSpecGen,
132  Generator& rResGen);
133 
134 
135 /**
136  * Omega-synthesis w.r.t. Buechi acceptance
137  *
138  * This is the RTI wrapper for
139  * SupBuchiCon(const Generator&, const EventSet&, const Generator&, Generator&).
140  * Controllability attributes are taken from the plant argument.
141  * If the result is specified as a System, attributes will be copied
142  * from the plant argument.
143  *
144  *
145  * @param rPlantGen
146  * Plant System
147  * @param rSpecGen
148  * Specification Generator
149  * @param rResGen
150  * Reference to resulting Generator to realize
151  * the supremal closed-loop behaviour.
152  *
153  * @exception Exception
154  * Alphabets of generators don't match (id 100)
155  * plant nondeterministic (id 201)
156  * spec nondeterministic (id 203)
157  * plant and spec nondeterministic (id 204)
158  *
159  * @ingroup OmgPlugin
160  */
161 extern FAUDES_API void SupBuechiCon(
162  const System& rPlantGen,
163  const Generator& rSpecGen,
164  Generator& rResGen);
165 
166 
167 /**
168  * Omega-synthesis w.r.t. Buechi accptance
169  *
170  * This procedure first computes the supremal omega-controllable sublanguage as proposed by
171  * J. Thistle, 1992, applied to the specific case of deterministoc Buechi automata.
172  * It then applies a control pattern to obtain a relatively topologically-closed result,
173  * i.e., the topological closure of the result can be used as a supervisor.
174  *
175  * Parameter restrictions: both generators must be deterministic and
176  * have the same alphabet.
177  *
178  * @param rPlantGen
179  * Plant G
180  * @param rCAlph
181  * Controllable events
182  * @param rSpecGen
183  * Specification Generator E
184  * @param rResGen
185  * Reference to resulting Generator to realize
186  * the closed-loop behaviour.
187  *
188  * @exception Exception
189  * - alphabets of generators don't match (id 100)
190  * - plant nondeterministic (id 201)
191  * - spec nondeterministic (id 203)
192  * - plant and spec nondeterministic (id 204)
193  *
194  * @ingroup OmgPlugin
195  *
196  */
197 extern FAUDES_API void BuechiCon(
198  const Generator& rPlantGen,
199  const EventSet& rCAlph,
200  const Generator& rSpecGen,
201  Generator& rResGen);
202 
203 
204 /**
205  * Omega-synthesis
206  *
207  * This is the RTI wrapper for
208  * BuechiCon(const Generator&, const EventSet&, const Generator&, Generator&).
209  * Controllability attributes are taken from the plant argument.
210  * If the result is specified as a System, attributes will be copied
211  * from the plant argument.
212  *
213  *
214  * @param rPlantGen
215  * Plant System
216  * @param rSpecGen
217  * Specification Generator
218  * @param rResGen
219  * Reference to resulting Generator to realize
220  * the closed-loop behaviour.
221  *
222  * @exception Exception
223  * Alphabets of generators don't match (id 100)
224  * plant nondeterministic (id 201)
225  * spec nondeterministic (id 203)
226  * plant and spec nondeterministic (id 204)
227  *
228  * @ingroup OmgPlugin
229  */
230 extern FAUDES_API void BuechiCon(
231  const System& rPlantGen,
232  const Generator& rSpecGen,
233  Generator& rResGen);
234 
235 
236 /**
237  * Omega-synthesis for partial observation (experimental!)
238  *
239  * Variation of supremal omega-controllable sublanguage to address
240  * normality requirements in the context of partial observation. The test
241  * used in this implementation is sufficient but presumably to necessary.
242  * Thus, the function in general return only a subset of the relevant controllable
243  * prefix.
244  *
245  * Parameter restrictions: both generators must be deterministic and
246  * have the same alphabet.
247  *
248  * @param rPlantGen
249  * Plant G
250  * @param rCAlph
251  * Controllable events
252  * @param rOAlph
253  * Observable events
254  * @param rSpecGen
255  * Specification Generator E
256  * @param rResGen
257  * Reference to resulting Generator to realize
258  * the supremal closed-loop behaviour.
259  *
260  * @exception Exception
261  * - alphabets of generators don't match (id 100)
262  * - plant nondeterministic (id 201)
263  * - spec nondeterministic (id 203)
264  * - plant and spec nondeterministic (id 204)
265  *
266  * @ingroup OmgPlugin
267  *
268  */
269 extern FAUDES_API void SupBuechiConNorm(
270  const Generator& rPlantGen,
271  const EventSet& rCAlph,
272  const EventSet& rOAlph,
273  const Generator& rSpecGen,
274  Generator& rResGen);
275 
276 
277 
278 /**
279  * Omega-synthesis for partial observation (experimental!)
280  *
281  *
282  * This is the RTI wrapper for
283  * SupBuechiConNorm(const Generator&, const EventSet&, const Generator&, Generator&).
284  * Controllability attributes and observability attributes are taken from the plant argument.
285  * If the result is specified as a System, attributes will be copied
286  * from the plant argument.
287  *
288  *
289  * @param rPlantGen
290  * Plant System
291  * @param rSpecGen
292  * Specification Generator
293  * @param rResGen
294  * Reference to resulting Generator to realize
295  * the supremal closed-loop behaviour.
296  *
297  * @exception Exception
298  * Alphabets of generators don't match (id 100)
299  * plant nondeterministic (id 201)
300  * spec nondeterministic (id 203)
301  * plant and spec nondeterministic (id 204)
302  *
303  * @ingroup OmgPlugin
304  */
305 extern FAUDES_API void SupBuechiConNorm(
306  const System& rPlantGen,
307  const Generator& rSpecGen,
308  Generator& rResGen);
309 
310 
311 /**
312  * Omega-synthesis for partial observation (experimental!)
313  *
314  * Variation of supremal controllable prefix under partial observation.
315  * This variation applies a control pattern to obtain a relatively closed and
316  * omega-normal result. The latter properties are validated and an exception
317  * is thrown on an error. Thus, this function should not produce "false-positives".
318  * However, since it is derived from SupBuechiConNorm(), is may return the
319  * empty languages even if a non-empty controller exists.
320  *
321  * Parameter restrictions: both generators must be deterministic and
322  * have the same alphabet.
323  *
324  * @param rPlantGen
325  * Plant G
326  * @param rCAlph
327  * Controllable events
328  * @param rOAlph
329  * Observable events
330  * @param rSpecGen
331  * Specification Generator E
332  * @param rResGen
333  * Reference to resulting Generator to realize
334  * the supremal closed-loop behaviour.
335  *
336  * @exception Exception
337  * - alphabets of generators don't match (id 100)
338  * - plant nondeterministic (id 201)
339  * - spec nondeterministic (id 203)
340  * - plant and spec nondeterministic (id 204)
341  *
342  * @ingroup OmgPlugin
343  *
344  */
345 extern FAUDES_API void BuechiConNorm(
346  const Generator& rPlantGen,
347  const EventSet& rOAlph,
348  const EventSet& rCAlph,
349  const Generator& rSpecGen,
350  Generator& rResGen);
351 
352 
353 /**
354  * Omega-synthesis for partial observation (experimental!)
355  *
356  * This is the RTI wrapper for
357  * BuechiConNorm(const Generator&, const EventSet&, const Generator&, Generator&).
358  * Controllability attributes are taken from the plant argument.
359  * If the result is specified as a System, attributes will be copied
360  * from the plant argument.
361  *
362  * @param rPlantGen
363  * Plant System
364  * @param rSpecGen
365  * Specification Generator
366  * @param rResGen
367  * Reference to resulting Generator to realize
368  * the closed-loop behaviour.
369  *
370  * @exception Exception
371  * Alphabets of generators don't match (id 100)
372  * plant nondeterministic (id 201)
373  * spec nondeterministic (id 203)
374  * plant and spec nondeterministic (id 204)
375  *
376  * @ingroup OmgPlugin
377  */
378 extern FAUDES_API void BuechiConNorm(
379  const System& rPlantGen,
380  const Generator& rSpecGen,
381  Generator& rResGen);
382 
383 
384 
385 
386 } // namespace faudes
387 
388 #endif
389 
390 
#define FAUDES_API
Definition: cfl_platform.h:85
NameSet EventSet
Definition: cfl_nameset.h:546
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.33l --- 2025.09.16 --- c++ api documentaion by doxygen