op_obserververification.h
Go to the documentation of this file.
1 /** @file op_obserververification.h
2 
3 Methods to verify the obsrver condition for natural projections.
4 The observer condition is, e.g., defined in
5 K. C. Wong and W. M. Wonham, “Hierarchical control of discrete-event
6 systems,” Discrete Event Dynamic Systems: Theory and Applications, 1996.
7 In addition, methods to verify output control consistency (OCC) and
8 local control consistency (LCC) are provided. See for example
9 K. Schmidt and C. Breindl, "On Maximal Permissiveness of Hierarchical and Modular Supervisory
10 Control Approaches for Discrete Event Systems," Workshop on Discrete Event Systems, 2008.
11 */
12 
13 /* FAU Discrete Event Systems Library (libfaudes)
14 
15  Copyright (C) 2006 Bernd Opitz
16  Exclusive copyright is granted to Klaus Schmidt
17 
18  This library is free software; you can redistribute it and/or
19  modify it under the terms of the GNU Lesser General Public
20  License as published by the Free Software Foundation; either
21  version 2.1 of the License, or (at your option) any later version.
22 
23  This library is distributed in the hope that it will be useful,
24  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26  Lesser General Public License for more details.
27 
28  You should have received a copy of the GNU Lesser General Public
29  License along with this library; if not, write to the Free Software
30  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
31 
32 #ifndef FAUDES_OP_OBSERVERVERIFICATION_H
33 #define FAUDES_OP_OBSERVERVERIFICATION_H
34 
35 #include "corefaudes.h"
36 #include "op_debug.h"
37 #include "op_observercomputation.h"
38 #include <map>
39 #include <vector>
40 #include <stack>
41 
42 
43 namespace faudes {
44 
45 
46 /**
47  * Verification of the natural observer property.
48  * For verifying if a natural projection has the observer property, one step in the observer
49  * algorithm is evaluated. If the resulting generator equals the input generator, then the
50  * natural projection on the abstraction alphabet is an observer.
51  *
52  * @param rLowGen
53  * Input generator
54  * @param rHighAlph
55  * High level alphabet
56  *
57  * @return
58  * true if the observer property holds
59  *
60  * @ingroup ObserverPlugin
61  *
62  */
63 extern FAUDES_API bool IsObs(const Generator& rLowGen, const EventSet& rHighAlph);
64 
65 
66 /**
67  * Verification of the MSA observer property.
68  * For verifying if a natural projection has the marked string accepting
69  * observer property, one step in the MSA observer
70  * algorithm is evaluated. If the resulting generator equals the input generator, then the
71  * natural projection on the abstraction alphabet is an MSA observer.
72  *
73  * @param rLowGen
74  * Input generator
75  * @param rHighAlph
76  * High level alphabet
77  *
78  * @return
79  * true if the MSA observer property holds
80  *
81  * @ingroup ObserverPlugin
82  *
83  */
84 extern FAUDES_API bool IsMSA(const Generator& rLowGen, const EventSet& rHighAlph);
85 
86 
87 /**
88  * Verification of output control consistency (OCC).
89  * For verifying if a natural projection fulfills the output control consistency condition,
90  * a backward reachability is conducted. If starting from a state, where an uncontrollable
91  * high-level event is feasible, a controllable event can be reached on a local backward path,
92  * OCC is violated.
93  *
94  * @param rLowGen
95  * Input System
96  * @param rHighAlph
97  * High level alphabet
98  *
99  * @return
100  * true if OCC holds
101  *
102  * @ingroup ObserverPlugin
103  *
104  */
105 extern FAUDES_API bool IsOCC(const System& rLowGen, const EventSet& rHighAlph);
106 
107 /**
108  * Verification of output control consistency (OCC).
109  * For verifying if a natural projection fulfills the output control consistency condition,
110  * a backward reachability is conducted. If starting from a state, where an uncontrollable
111  * high-level event is feasible, a controllable event can be reached on a local backward path,
112  * OCC is violated.
113  *
114  * @param rLowGen
115  * Input generator
116  * @param rControllableEvents
117  * set of controllable events
118  * @param rHighAlph
119  * High level alphabet
120  *
121  * @return
122  * true if OCC holds
123  *
124  */
125 extern FAUDES_API bool IsOCC(const Generator& rLowGen, const EventSet& rControllableEvents, const EventSet& rHighAlph);
126 
127 /**
128  * Function that supports the verification of output control consistency (OCC).
129  * This function performs a backward reachability to find if an uncontrollable
130  * high-level event is preemted by an uncontrollable low-level event. If this is
131  * the case, OCC is violated.
132  *
133  * @param rLowGen
134  * Input generator
135  * @param rControllableEvents
136  * set of controllable events
137  * @param rHighAlph
138  * High level alphabet
139  * @param currentState
140  * start state for backward reachability
141  *
142  * @return
143  * true if no controllable low-level event has been found
144  *
145  */
146 extern FAUDES_API bool backwardVerificationOCC(const Generator& rLowGen, const EventSet& rControllableEvents, const EventSet& rHighAlph, Idx currentState);
147 
148 /**
149  * Verification of local control consistency (LCC).
150  * For verifying if a natural projection fulfills the local control consistency condition,
151  * a backward reachability is conducted. If starting from a state, where an uncontrollable
152  * high-level event is feasible, at least one local state cannot be reached by an uncontrollable path, LCC is violated.
153  *
154  * @param rLowGen
155  * Input System
156  * @param rHighAlph
157  * High level alphabet
158  *
159  * @return
160  * true if LCC holds
161  *
162  * @ingroup ObserverPlugin
163  *
164  */
165 extern FAUDES_API bool IsLCC(const System& rLowGen, const EventSet& rHighAlph);
166 
167 /**
168  * Verification of local control consistency (LCC).
169  * For verifying if a natural projection fulfills the local control consistency condition,
170  * a backward reachability is conducted. If starting from a state, where an uncontrollable
171  * high-level event is feasible, at least one local state cannot be reached by an uncontrollable path, LCC is violated.
172  *
173  * @param rLowGen
174  * Input generator
175  * @param rControllableEvents
176  * set of controllable events
177  * @param rHighAlph
178  * High level alphabet
179  *
180  * @return
181  * true if LCC holds
182  *
183  */
184 extern FAUDES_API bool IsLCC(const Generator& rLowGen, const EventSet& rControllableEvents, const EventSet& rHighAlph);
185 
186 /**
187  * Function that supports the verification of local control consistency (LCC).
188  * This function performs a recursive backward reachability to find if from a state where
189  * an uncontrollable high-level event is possible, another state is only reachable
190  * by local strings that contaion at least one controllable event. If this is
191  * the case, LCC is violated.
192  *
193  * @param rTransSetX2EvX1
194  * reverse transition relation of the input generator
195  * @param rControllableEvents
196  * set of controllable events
197  * @param rHighAlph
198  * High level alphabet
199  * @param exitState
200  * start state for backward reachability
201  * @param currentState
202  * current state for backward reachability
203  * @param controllablePath
204  * false if at least one uncontrollable path to the currentState exists
205  * @param rLocalStatesMap
206  * map for states and their controllability property
207  * @param rDoneStates
208  * states that have already been visited
209  *
210  */
211 extern FAUDES_API void backwardVerificationLCC(const TransSetX2EvX1& rTransSetX2EvX1, const EventSet& rControllableEvents, const EventSet& rHighAlph, Idx exitState, Idx currentState, bool controllablePath, std::map<Idx, bool>& rLocalStatesMap, StateSet& rDoneStates);
212 
213 
214 
215 
216 
217 } // namespace faudes
218 
219 
220 
221 #endif
222 
#define FAUDES_API
Interface export/import symbols: windows.
Definition: cfl_platform.h:81
Set of indices.
Definition: cfl_indexset.h:78
Set of indices with symbolic names.
Definition: cfl_nameset.h:69
Set of Transitions.
Definition: cfl_transset.h:242
Includes all libFAUDES headers, no plugins.
NameSet EventSet
Convenience typedef for plain event sets.
Definition: cfl_nameset.h:531
vGenerator Generator
Plain generator, api typedef for generator with no attributes.
TcGenerator< AttributeVoid, AttributeVoid, AttributeCFlags, AttributeVoid > System
Convenience typedef for std System.
bool IsOCC(const System &rLowGen, const EventSet &rHighAlph)
Verification of output control consistency (OCC).
bool IsMSA(const Generator &rLowGen, const EventSet &rHighAlph)
Verification of the MSA observer property.
bool IsLCC(const System &rLowGen, const EventSet &rHighAlph)
Verification of local control consistency (LCC).
bool IsObs(const Generator &rLowGen, const EventSet &rHighAlph)
Verification of the natural observer property.
libFAUDES resides within the namespace faudes.
uint32_t Idx
Type definition for index type (allways 32bit)
bool backwardVerificationOCC(const Generator &rLowGen, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx currentState)
Function that supports the verification of output control consistency (OCC).
FAUDES_API void backwardVerificationLCC(const TransSetX2EvX1 &rTransSetX2EvX1, const EventSet &rControllableEvents, const EventSet &rHighAlph, Idx exitState, Idx currentState, bool controllablePath, std::map< Idx, bool > &rLocalStatesMap, StateSet &rDoneStates)
Function that supports the verification of local control consistency (LCC).
Methods to compute natural projections that exhibit the observer property.

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