syn_supcmpl.h
Go to the documentation of this file.
1 /** @file syn_supcmpl.h Supremal complete sublanguage for infinite time behaviours */
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_WSUPCON_H
23 #define FAUDES_WSUPCON_H
24 
25 #include "corefaudes.h"
26 #include <stack>
27 
28 namespace faudes {
29 
30 
31 
32 
33 
34 /**
35  * Supremal controllable and complete sublanguage
36  *
37  * Given a plant and a specification, this function computes a realisation of
38  * the supremal controllable and complete sublange. This version consideres the
39  * generated languages (ignores the marking). In particular, this implies that
40  * the result is prefix closed. It is returned as generated language.
41  *
42  * Starting with a product composition of plant and specification, the implementation
43  * iteratively remove states that either contradict controllability or completeness.
44  * Removal of states is continued until no contradicting states are left.
45  * Thus, the result is indeed controllable and complete. The algorithm was
46  * proposed in
47  *
48  * R. Kumar, V. Garg, and S.I. Marcus. On supervisory control of
49  * sequential behaviors. IEEE Transactions on Automatic Control,
50  * Vol. 37: pp.1978-1985, 1992.
51  *
52  * The paper proves supremality of the result. Provided that the corresponding
53  * omega language of the specification is closed, the result of the above algorithm
54  * also realises the least restrictive closed loop behaviour of the corresponding
55  * omega language control problem.
56  *
57  * Parameter restrictions: both generators must be deterministic and
58  * have the same alphabet. The result will be accessible and deterministic.
59  *
60  *
61  * @param rPlantGen
62  * Plant G
63  * @param rCAlph
64  * Controllable events
65  * @param rSpecGen
66  * Specification Generator E
67  * @param rResGen
68  * Reference to resulting Generator
69  *
70  * @exception Exception
71  * - alphabets of generators don't match (id 100)
72  * - plant nondeterministic (id 201)
73  * - spec nondeterministic (id 203)
74  * - plant and spec nondeterministic (id 204)
75  *
76  * @ingroup SynthesisPlugIn
77  *
78  */
79 extern FAUDES_API void SupConCmplClosed(
80  const Generator& rPlantGen,
81  const EventSet& rCAlph,
82  const Generator& rSpecGen,
83  Generator& rResGen);
84 
85 
86 
87 /**
88  * Supremal controllable and complete sublanguage.
89  *
90  * This is the RTI wrapper for
91  * SupConCmplClosed(const Generator&, const EventSet&, const Generator&, Generator&).
92  * Controllability attributes are taken from the plant argument.
93  * If the result is specified as a System, attributes will be copied
94  * from the plant argument.
95  *
96  *
97  * @param rPlantGen
98  * Plant System
99  * @param rSpecGen
100  * Specification Generator
101  * @param rResGen
102  * Reference to resulting Generator
103  *
104  * @exception Exception
105  * Alphabets of generators don't match (id 100)
106  * plant nondeterministic (id 201)
107  * spec nondeterministic (id 203)
108  * plant and spec nondeterministic (id 204)
109  *
110  * @ingroup SynthesisPlugIn
111  */
112 extern FAUDES_API void SupConCmplClosed(
113  const System& rPlantGen,
114  const Generator& rSpecGen,
115  Generator& rResGen);
116 
117 
118 /**
119  * Supremal controllable and complete sublanguage
120  *
121  *
122  * Given a plant and a specification, this function computes a realisation of
123  * the supremal controllable and complete sublange. This version consideres the
124  * marked languages.
125  *
126  * Starting with a product composition of plant and specification, the implementation
127  * iteratively remove states that contradict controllability or completeness or that
128  * are not coaccessible. Removal of states is continued until no contradicting states are left.
129  * Thus, the result is indeed controllable, complete and coaccessible.
130  *
131  * Considering the marked languages implies that only strings that simultanuosly
132  * reach a marking can survive the above procedure. From an omega-languages perspective,
133  * this is of limited use. However, in the special situation that the specification
134  * is relatively closed w.r.t. the plant, we can replace the specification by its
135  * prefix closure befor invoking SupConCompl. In this situation we claim that
136  * the procedure returns a realisation of the the least restrictive closed loop behaviour
137  * of the corresponding omega language control problem.
138  *
139  *
140  * @param rPlantGen
141  * Plant G
142  * @param rCAlph
143  * Controllable events
144  * @param rSpecGen
145  * Specification Generator E
146  * @param rResGen
147  * Reference to resulting Generator
148  *
149  * @exception Exception
150  * - alphabets of generators don't match (id 100)
151  * - plant nondeterministic (id 201)
152  * - spec nondeterministic (id 203)
153  * - plant and spec nondeterministic (id 204)
154  *
155  * @ingroup SynthesisPlugIn
156  *
157  */
158 extern FAUDES_API void SupConCmpl(
159  const Generator& rPlantGen,
160  const EventSet& rCAlph,
161  const Generator& rSpecGen,
162  Generator& rResGen);
163 
164 
165 
166 /**
167  * Supremal controllable and complete sublanguage.
168  *
169  * This is the RTI wrapper for
170  * SupConCmpl(const Generator&, const EventSet&, const Generator&, Generator&).
171  * Controllability attributes are taken from the plant argument.
172  * If the result is specified as a System, attributes will be copied
173  * from the plant argument.
174  *
175  *
176  * @param rPlantGen
177  * Plant System
178  * @param rSpecGen
179  * Specification Generator
180  * @param rResGen
181  * Reference to resulting Generator
182  *
183  * @exception Exception
184  * Alphabets of generators don't match (id 100)
185  * plant nondeterministic (id 201)
186  * spec nondeterministic (id 203)
187  * plant and spec nondeterministic (id 204)
188  *
189  * @ingroup SynthesisPlugIn
190  */
191 extern FAUDES_API void SupConCmpl(
192  const System& rPlantGen,
193  const Generator& rSpecGen,
194  Generator& rResGen);
195 
196 
197 /**
198  * Supremal controllable, normal and complete sublanguage.
199  *
200  *
201  * SupConNormCmpl computes the supremal sublanguage
202  * of language K (marked by rSpecGen) that
203  * - is controllable w.r.t. the language L (marked by rPlantGen);
204  * - has a prefix closure that is normal w.r.t. the closure of L
205  * - is complete
206  *
207  * The implementation is based on an iteration by Yoo, Lafortune and Lin
208  * "A uniform approach for computing supremal sublanguages arising
209  * in supervisory control theory", 2002, further developped in
210  * Moor, Baier, Yoo, Lin, and Lafortune "On the computation of supremal
211  * sublanguages relevant to supervisory control, WODES 2012. The relationship
212  * to the supervision of omega languages under partial observation is discussed
213  * as an example in the WODES 2012 paper.
214  *
215  * Parameters have to be deterministic, result is deterministic.
216  *
217  *
218  * @param rPlantGen
219  * Plant L
220  * @param rCAlph
221  * Controllable events
222  * @param rOAlph
223  * Observable events
224  * @param rSpecGen
225  * Specification Generator E
226  * @param rResGen
227  * Reference to resulting Generator
228  *
229  * @exception Exception
230  * - alphabets of generators don't match (id 100)
231  * - plant nondeterministic (id 201)
232  * - spec nondeterministic (id 203)
233  * - plant and spec nondeterministic (id 204)
234  *
235  * @ingroup SynthesisPlugIn
236  *
237  */
238 extern FAUDES_API void SupConNormCmpl(
239  const Generator& rPlantGen,
240  const EventSet& rCAlph,
241  const EventSet& rOAlph,
242  const Generator& rSpecGen,
243  Generator& rResGen);
244 
245 
246 /**
247  * Supremal controllable, normal and complete sublanguage.
248  *
249  * This is the RTI wrapper for
250  * SupConNormCmpl(const Generator&, const EventSet&, const EventSet&, const Generator&, Generator&).
251  * Event attributes are taken from the plant argument.
252  * If the result is specified as a System, attributes will be copied
253  * from the plant argument.
254  *
255  * @param rPlantGen
256  * Plant System
257  * @param rSpecGen
258  * Specification Generator
259  * @param rResGen
260  * Reference to resulting Generator
261  *
262  * @exception Exception
263  * Alphabets of generators don't match (id 100)
264  * plant nondeterministic (id 201)
265  * spec nondeterministic (id 203)
266  * plant and spec nondeterministic (id 204)
267  *
268  * @ingroup SynthesisPlugIn
269  */
270 extern FAUDES_API void SupConNormCmpl(
271  const System& rPlantGen,
272  const Generator& rSpecGen,
273  Generator& rResGen);
274 
275 
276 
277 
278 } // namespace faudes
279 
280 #endif
281 
282 
#define FAUDES_API
Definition: cfl_platform.h:80
NameSet EventSet
Definition: cfl_nameset.h:534
vGenerator Generator
TcGenerator< AttributeVoid, AttributeVoid, AttributeCFlags, AttributeVoid > System
void SupConNormCmpl(const Generator &rL, const EventSet &rCAlph, const EventSet &rOAlph, const Generator &rK, Generator &rResult)
void SupConCmplClosed(const Generator &rPlantGen, const EventSet &rCAlph, const Generator &rSpecGen, Generator &rResGen)
Definition: syn_supcmpl.cpp:45
void SupConCmpl(const Generator &rPlantGen, const EventSet &rCAlph, const Generator &rSpecGen, Generator &rResGen)

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