cfl_localgen.h
Go to the documentation of this file.
1 /** @file cfl_localgen.h Helper functions for projected generators */
2 
3 /* FAU Discrete Event Systems Library (libfaudes)
4 
5  Copyright (C) 2006 Bernd Opitz
6  Exclusive copyright is granted to Klaus Schmidt
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
21 
22 
23 #ifndef FAUDES_LOCALGEN_H
24 #define FAUDES_LOCALGEN_H
25 
26 
27 #include "cfl_agenerator.h"
28 #include <map>
29 #include <stack>
30 
31 namespace faudes {
32 
33 /**
34  * LowExitStates return-copy function:
35  *
36  * Wrapper for the corresponding call-by-reference function.
37  * Creates new StateSet, calls function and returns StateSet containing low level
38  * exit states.
39  *
40  * @param rLowGen
41  * Low level generator (just needed for determining statetable)
42  * @param rHighAlph
43  * High level events
44  * @param rEntryStatesMap
45  * Entry states map (see CreateEntryStatesMap(resmap))
46  * @param rLowRevTransRel
47  * Reverse sorted low level transition relation
48  * @param highState
49  * Hi level state for which to compute low level exit states
50  *
51  * @exception Exception
52  * Hi level state not found in entry states map (with FAUDES_CHECKED) (id 502)
53  */
54 extern FAUDES_API StateSet LowExitStates(const Generator& rLowGen, const EventSet& rHighAlph,
55  const std::map<Idx,StateSet>& rEntryStatesMap, const TransSetX2EvX1& rLowRevTransRel, Idx highState);
56 
57 /**
58  * LowExitStates call-by-reference function:
59  *
60  * Compute the low level exit states for a corresponding hi level state
61  *
62  * @param rHighAlph
63  * High level events
64  * @param rEntryStatesMap
65  * Entry states map (see CreateEntryStatesMap(resmap))
66  * @param rLowRevTransRel
67  * Reverse sorted low level transition relation
68  * @param highState
69  * Hi level state for which to compute low level exit states
70  * @param rLowExitStates
71  * Reference to StateSet for low level exit states (result)
72  *
73  * @exception Exception
74  * Hi level state not found in entry states map (with FAUDES_CHECKED)
75  */
76 extern FAUDES_API void LowExitStates(const EventSet& rHighAlph, const std::map<Idx,StateSet>& rEntryStatesMap,
77  const TransSetX2EvX1& rLowRevTransRel, Idx highState, StateSet& rLowExitStates);
78 
79 /**
80  * ReachableEvents return-copy function:
81  *
82  * Wrapper for the corresponding call-by-reference function.
83  * Creates new EventSet, calls function and returns EventSet containing the
84  * reachable hi level events.
85  *
86  * @param rLowGen
87  * Low level generator
88  * @param rHighAlph
89  * High level alphabet
90  * @param lowState
91  * Low level state
92  */
93 extern FAUDES_API EventSet ReachableEvents(const Generator& rLowGen, const EventSet& rHighAlph,
94  Idx lowState);
95 
96 /**
97  * ReachableEvents call-by-reference function:
98  *
99  * Compute the set of hi level events which can be reached from a low
100  * level state. Resulting set will be cleared first.
101  *
102  * @param rLowGen
103  * Low level generator
104  * @param rHighAlph
105  * High level alphabet
106  * @param lowState
107  * Low level state
108  * @param rReachableEvents
109  * Reference to EventSet which will contain the reachable high level events
110  * (result)
111  */
112 extern FAUDES_API void ReachableEvents(const Generator& rLowGen, const EventSet& rHighAlph,
113  Idx lowState, EventSet& rReachableEvents);
114 
115 /**
116  * Compute the coaccessible reach for a local automaton.
117  *
118  * @param rRevTransRel
119  * Reverse sorted transition relation
120  * @param rHighAlph
121  * High level alphabet
122  * @param lowState
123  * Low level exit state
124  * @param rCoaccessibleReach
125  * Result
126  */
127 extern FAUDES_API void LocalCoaccessibleReach(const TransSetX2EvX1& rRevTransRel,
128  const EventSet& rHighAlph, Idx lowState, StateSet& rCoaccessibleReach);
129 
130 /**
131  * Compute the accessible reach for a local automaton
132  *
133  * @param rLowGen
134  * Low level generator
135  * @param rHighAlph
136  * High level alphabet
137  * @param lowState
138  * Low level entry state
139  * @param rAccessibleReach
140  * Result
141  */
142 extern FAUDES_API void LocalAccessibleReach(const Generator& rLowGen, const EventSet& rHighAlph,
143  Idx lowState, StateSet& rAccessibleReach);
144 
145 } // namespace faudes
146 
147 #endif
148 
Attributed generator class TaGenerator.
#define FAUDES_API
Interface export/import symbols: windows.
Definition: cfl_platform.h:81
IndexSet StateSet
Definition: cfl_indexset.h:271
TTransSet< TransSort::X2EvX1 > TransSetX2EvX1
Type definition for x2, ev, x1 sorted TTransSet.
Definition: cfl_transset.h:966
NameSet EventSet
Convenience typedef for plain event sets.
Definition: cfl_nameset.h:531
vGenerator Generator
Plain generator, api typedef for generator with no attributes.
libFAUDES resides within the namespace faudes.
uint32_t Idx
Type definition for index type (allways 32bit)
EventSet ReachableEvents(const Generator &rLowGen, const EventSet &rHighAlph, Idx lowState)
ReachableEvents return-copy function:
StateSet LowExitStates(const Generator &rLowGen, const EventSet &rHighAlph, const std::map< Idx, StateSet > &rEntryStatesMap, const TransSetX2EvX1 &rLowRevTransRel, Idx highState)
LowExitStates return-copy function:
void LocalCoaccessibleReach(const TransSetX2EvX1 &rRevTransRel, const EventSet &rHighAlph, Idx lowState, StateSet &rCoaccessibleReach)
Compute the coaccessible reach for a local automaton.
void LocalAccessibleReach(const Generator &rLowGen, const EventSet &rHighAlph, Idx lowState, StateSet &rAccessibleReach)
Compute the accessible reach for a local automaton.

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