cfl_localgen.h

Go to the documentation of this file.
00001 /** @file cfl_localgen.h Helper functions for projected generators */
00002 
00003 /* FAU Discrete Event Systems Library (libfaudes)
00004 
00005    Copyright (C) 2006  Bernd Opitz
00006    Exclusive copyright is granted to Klaus Schmidt
00007 
00008    This library is free software; you can redistribute it and/or
00009    modify it under the terms of the GNU Lesser General Public
00010    License as published by the Free Software Foundation; either
00011    version 2.1 of the License, or (at your option) any later version.
00012 
00013    This library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with this library; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00021 
00022 
00023 #ifndef FAUDES_LOCALGEN_H
00024 
00025 #include "cfl_agenerator.h"
00026 #include <map>
00027 #include <stack>
00028 
00029 namespace faudes {
00030 
00031 /**
00032  * LowExitStates return-copy function:
00033  *
00034  * Wrapper for the corresponding call-by-reference function. 
00035  * Creates new StateSet, calls function and returns StateSet containing low level
00036  * exit states.
00037  *
00038  * @param rLowGen 
00039  *   Low level generator (just needed for determining statetable)
00040  * @param rHighAlph
00041  *   High level events
00042  * @param rEntryStatesMap
00043  *   Entry states map (see CreateEntryStatesMap(resmap))
00044  * @param rLowRevTransRel
00045  *   Reverse sorted low level transition relation
00046  * @param highState
00047  *   Hi level state for which to compute low level exit states
00048  *
00049  * @exception Exception
00050  *   Hi level state not found in entry states map (with FAUDES_CHECKED) (id 502)
00051  */
00052 StateSet LowExitStates(const Generator& rLowGen, const EventSet& rHighAlph, 
00053     const std::map<Idx,StateSet>& rEntryStatesMap, const TransSetX2EvX1& rLowRevTransRel, Idx highState);
00054 
00055 /**
00056  * LowExitStates call-by-reference function:
00057  *
00058  * Compute the low level exit states for a corresponding hi level state
00059  *
00060  * @param rHighAlph
00061  *   High level events
00062  * @param rEntryStatesMap
00063  *   Entry states map (see CreateEntryStatesMap(resmap))
00064  * @param rLowRevTransRel
00065  *   Reverse sorted low level transition relation
00066  * @param highState
00067  *   Hi level state for which to compute low level exit states
00068  * @param rLowExitStates
00069  *   Reference to StateSet for low level exit states (result)
00070  *
00071  * @exception Exception
00072  *   Hi level state not found in entry states map (with FAUDES_CHECKED)
00073  */
00074 void LowExitStates(const EventSet& rHighAlph, const std::map<Idx,StateSet>& rEntryStatesMap, 
00075     const TransSetX2EvX1& rLowRevTransRel, Idx highState, StateSet& rLowExitStates);
00076 
00077 /**
00078  * ReachableEvents return-copy function:
00079  *
00080  * Wrapper for the corresponding call-by-reference function. 
00081  * Creates new EventSet, calls function and returns EventSet containing the
00082  * reachable hi level events.
00083  *
00084  * @param rLowGen
00085  *   Low level generator
00086  * @param rHighAlph
00087  *   High level alphabet
00088  * @param lowState
00089  *   Low level state 
00090  */
00091 EventSet ReachableEvents(const Generator& rLowGen, const EventSet& rHighAlph, 
00092     Idx lowState);
00093 
00094 /**
00095  * ReachableEvents call-by-reference function:
00096  *
00097  * Compute the set of hi level events which can be reached from a low
00098  * level state. Resulting set will be cleared first.
00099  *
00100  * @param rLowGen
00101  *   Low level generator
00102  * @param rHighAlph
00103  *   High level alphabet
00104  * @param lowState
00105  *   Low level state 
00106  * @param rReachableEvents
00107  *   Reference to EventSet which will contain the reachable high level events
00108  *   (result)
00109  */
00110 void ReachableEvents(const Generator& rLowGen, const EventSet& rHighAlph, 
00111     Idx lowState, EventSet& rReachableEvents);
00112 
00113 /**
00114  * Compute the coaccessible reach for a local automaton.
00115  *
00116  * @param rRevTransRel
00117  *   Reverse sorted transition relation
00118  * @param rHighAlph
00119  *   High level alphabet
00120  * @param lowState
00121  *   Low level exit state
00122  * @param rCoaccessibleReach
00123  *   Result 
00124  */
00125 void LocalCoaccessibleReach(const TransSetX2EvX1& rRevTransRel, 
00126     const EventSet& rHighAlph, Idx lowState, StateSet& rCoaccessibleReach);
00127 
00128 /**
00129  * Compute the accessible reach for a local automaton
00130  *
00131  * @param rLowGen
00132  *   Low level generator
00133  * @param rHighAlph
00134  *   High level alphabet
00135  * @param lowState
00136  *   Low level entry state
00137  * @param rAccessibleReach
00138  *   Result
00139  */
00140 void LocalAccessibleReach(const Generator& rLowGen, const EventSet& rHighAlph, 
00141     Idx lowState, StateSet& rAccessibleReach);
00142 
00143 } // namespace faudes
00144 
00145 #define FAUDES_LOCALGEN_H
00146 #endif 
00147 

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen