omg_rabinctrlpartialobs.h
Go to the documentation of this file.
1/** @file omg_rabinctrlpartialobs.h
2 *
3 * Rabin control synthesis under partial observation
4 *
5 * This module implements high-level API functions for supervisory control
6 * synthesis of Rabin automata under partial observation constraints.
7 *
8 * @ingroup OmegaautPlugin
9 */
10
11#ifndef FAUDES_OMG_RABINCTRLPARTIALOBS_H
12#define FAUDES_OMG_RABINCTRLPARTIALOBS_H
13
14#include "libfaudes.h"
15#include "omg_rabinaut.h"
16#include "omg_pseudodet.h"
17
18namespace faudes {
19
20/**
21 * @brief Rabin control synthesis under partial observation (System interface)
22 *
23 * This function performs supervisory control synthesis for Rabin automata
24 * under partial observation. It automatically extracts controllable and
25 * observable events from the System's event attributes, then combines the
26 * plant and specification, expands to control patterns, handles unobservable
27 * events, and applies pseudo-determinization to produce a deterministic supervisor.
28 *
29 * The synthesis algorithm performs the following steps:
30 * 1. Extract controllable and observable events from System attributes
31 * 2. Compute synchronous product of plant and specification
32 * 3. Expand alphabet to control patterns for controllability
33 * 4. Apply epsilon observation for unobservable events
34 * 5. Pseudo-determinize the result to obtain a deterministic supervisor
35 * 6. Trim the result to remove unreachable states
36 *
37 * @param rPlant
38 * Plant model (System with controllable/observable event attributes)
39 * @param rSpec
40 * Specification (Rabin automaton)
41 * @param rSupervisor
42 * Output supervisor (deterministic Rabin automaton)
43 *
44 * @exception Exception
45 * - Plant has no controllable events (id 300)
46 * - Plant has no observable events (id 301)
47 * - Empty specification language (id 302)
48 * - Synthesis failed - no valid supervisor exists (id 303)
49 * - Algorithm complexity limits exceeded (id 304)
50 */
51FAUDES_API void RabinCtrlPartialObs(const System& rPlant,
52 const RabinAutomaton& rSpec,
53 RabinAutomaton& rSupervisor);
54
55/**
56 * @brief Rabin control synthesis under partial observation (with explicit event sets)
57 *
58 * This function performs supervisory control synthesis for Rabin automata
59 * under partial observation with explicitly specified controllable and observable events.
60 *
61 * @param rPlant
62 * Plant model (Rabin automaton)
63 * @param rControllableEvents
64 * Set of controllable events
65 * @param rObservableEvents
66 * Set of observable events
67 * @param rSpec
68 * Specification (Rabin automaton)
69 * @param rSupervisor
70 * Output supervisor (deterministic Rabin automaton)
71 *
72 * @exception Exception
73 * - Empty controllable event set (id 300)
74 * - Empty observable event set (id 301)
75 * - Controllable events not subset of plant alphabet (id 305)
76 * - Observable events not subset of plant alphabet (id 306)
77 * - Empty specification language (id 302)
78 * - Synthesis failed - no valid supervisor exists (id 303)
79 * - Algorithm complexity limits exceeded (id 304)
80 */
82 const EventSet& rControllableEvents,
83 const EventSet& rObservableEvents,
84 const RabinAutomaton& rSpec,
85 RabinAutomaton& rSupervisor);
86
87/**
88 * @brief Check consistency of control problem setup
89 *
90 * This function validates that the plant, specification, and event sets
91 * are consistent for partial observation control synthesis.
92 *
93 * @param rPlant Plant automaton
94 * @param rSpec Specification automaton
95 * @param rControllableEvents Set of controllable events
96 * @param rObservableEvents Set of observable events
97 *
98 * @exception Exception
99 * - Alphabets of plant and specification do not match (id 100)
100 * - Controllable events not subset of alphabet (id 305)
101 * - Observable events not subset of alphabet (id 306)
102 * - Plant or specification is nondeterministic (id 201-204)
103 */
105 const RabinAutomaton& rSpec,
106 const EventSet& rControllableEvents,
107 const EventSet& rObservableEvents);
108
109/**
110 * @brief Extract controllable and observable events from System attributes
111 *
112 * Helper function to extract event sets from a System with event attributes.
113 *
114 * @param rSys System with event attributes
115 * @param rControllableEvents Output: extracted controllable events
116 * @param rObservableEvents Output: extracted observable events
117 */
119 EventSet& rControllableEvents,
120 EventSet& rObservableEvents);
121
122/**
123 * @brief Apply controller to filter transitions and create Buchi automaton
124 *
125 * This function takes a deterministic Rabin automaton and a controller map,
126 * filters out transitions not allowed by the controller, ignores Rabin
127 * acceptance conditions, and marks all states to create a Buchi automaton.
128 *
129 * @param rsDRA Input deterministic Rabin automaton
130 * @param rController Controller mapping states to allowed events
131 * @param rRes Output Buchi automaton (all states marked)
132 */
133FAUDES_API void ControlAut(const RabinAutomaton& rsDRA,
134 const TaIndexSet<EventSet>& rController,
135 Generator& rRes);
136
137/**
138 * @brief Epsilon observation for Rabin automata
139 *
140 * This function performs epsilon observation on a Rabin automaton by replacing
141 * all unobservable events with corresponding epsilon events. Each control pattern
142 * gets its own epsilon event to maintain the control pattern structure.
143 *
144 * @param rGen
145 * Input Rabin automaton
146 * @param rRes
147 * Output Rabin automaton with epsilon events replacing unobservable events
148 */
150
151/**
152 * @brief Replace unobservable events with epsilon events for System types
153 *
154 * This function creates a System where all unobservable events are replaced
155 * with a single epsilon event. This is useful for converting systems to a form
156 * where unobservable behavior is represented uniformly as epsilon transitions.
157 *
158 * @param rGen
159 * Input System
160 * @param rRes
161 * Output System with epsilon events replacing unobservable events
162 */
163FAUDES_API void EpsObservation(const System& rGen, System& rRes);
164
165/**
166 * @brief Create muted automaton by removing specified states and their transitions
167 *
168 * This function creates a copy of the input automaton with specified states
169 * and all their associated transitions removed. This is useful for language
170 * inclusion verification algorithms.
171 *
172 * @param rOriginal
173 * Input automaton
174 * @param rStatesToMute
175 * Set of states to be removed (muted)
176 * @return
177 * New automaton with muted states removed
178 */
179FAUDES_API Generator CreateMutedAutomaton(const Generator& rOriginal, const StateSet& rStatesToMute);
180
181/**
182 * @brief Verify language inclusion for Rabin automata
183 *
184 * This function verifies whether the language of a Büchi automaton is included
185 * in the language of a Rabin automaton using a 7-step verification algorithm.
186 * It performs SCC analysis and checks Rabin acceptance conditions.
187 *
188 * @param rGenL
189 * Büchi automaton (generator with all states marked)
190 * @param rRabK
191 * Rabin automaton representing the target language
192 * @return
193 * True if L(genL) ⊆ L(rabK), false otherwise
194 */
195FAUDES_API bool RabinLanguageInclusion(const System& rGenL, const RabinAutomaton& rRabK);
196
197} // namespace faudes
198
199#endif // FAUDES_OMG_RABINCTRLPARTIALOBS_H
#define FAUDES_API
IndexSet StateSet
NameSet EventSet
vGenerator Generator
TcGenerator< AttributeVoid, AttributeVoid, AttributeCFlags, AttributeVoid > System
void RabinCtrlPartialObs(const System &rPlant, const RabinAutomaton &rSpec, RabinAutomaton &rSupervisor)
Rabin control synthesis under partial observation (System interface)
void ExtractEventAttributes(const System &rSys, EventSet &rControllableEvents, EventSet &rObservableEvents)
Extract controllable and observable events from System attributes.
bool RabinLanguageInclusion(const System &rGenL, const RabinAutomaton &rRabK)
Verify language inclusion for Rabin automata.
void ControlAut(const RabinAutomaton &rsDRA, const TaIndexSet< EventSet > &rController, Generator &rRes)
Apply controller to filter transitions and create Buchi automaton.
TrGenerator< RabinAcceptance, AttributeVoid, AttributeCFlags, AttributeVoid > RabinAutomaton
Generator CreateMutedAutomaton(const Generator &rOriginal, const StateSet &rStatesToMute)
Create muted automaton by removing specified states and their transitions.
void RabinCtrlPartialObsConsistencyCheck(const RabinAutomaton &rPlant, const RabinAutomaton &rSpec, const EventSet &rControllableEvents, const EventSet &rObservableEvents)
Check consistency of control problem setup.
void EpsObservation(const RabinAutomaton &rGen, RabinAutomaton &rRes)
Epsilon observation for Rabin automata.

libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen