libFAUDES
Sections
Index
|
syn_supnorm.hGo to the documentation of this file.00001 /** @file syn_supnorm.h Supremal normal sublanguage */ 00002 00003 /* FAU Discrete Event Systems Library (libfaudes) 00004 00005 Copyright (C) 2009 Sebastian Perk, Thomas Moor 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2.1 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00020 00021 00022 #ifndef FAUDES_SUPNORM_H 00023 #define FAUDES_SUPNORM_H 00024 00025 #include "corefaudes.h" 00026 #include <stack> 00027 00028 namespace faudes { 00029 00030 /** 00031 * ConcatenateFullLanguage: concatenate Sigma* to language 00032 * marked by rGen. Less expensive than using 00033 * LanguageConcatenate() to concatenate Sigma*, as no 00034 * additional nondeterminism is caused. 00035 * Used in SupNorm(). 00036 * Method: 00037 * Transitions starting from marked states are erased. 00038 * Remaining accessible marked states are provided with 00039 * Sigma-selfloops. 00040 * Determinism: 00041 * Result can be nondeterministic only if parameter is 00042 * nondeterministic. 00043 * 00044 * @param rGen 00045 * generator marking the language to be concatenated with Sigma* 00046 * 00047 * 00048 */ 00049 void ConcatenateFullLanguage(Generator& rGen); 00050 00051 /** 00052 * NormalityConsistencyCheck: Consistency 00053 * check for normality input data. Used e.g. in IsNormal(), 00054 * and SupNorm(). See exceptions. 00055 * 00056 * @param rL 00057 * generator of language L 00058 * @param rOAlph 00059 * observable alphabet 00060 * @param rK 00061 * generator of language K 00062 * 00063 * @exception Exception 00064 * - nondeterministic parameter(s) (id: 101) 00065 * - rOAlph not subset of rL.Alphabet() (id: 100) 00066 * - Alphabets of generators don't match (id: 100) 00067 * - K is not subset of L (id 0) 00068 * 00069 * 00070 */ 00071 void NormalityConsistencyCheck( 00072 const Generator& rL, 00073 const EventSet& rOAlph, 00074 const Generator& rK); 00075 00076 /** 00077 * IsNormal: checks normality of a language K generated by 00078 * rK wrt a language L generated by rL and the subset of 00079 * observable events rOAlph. This is done by checking if the 00080 * following equality holds: 00081 * pinv(p(K)) intersect L = K 00082 * todo(?): check for efficient algorithm replacing above 00083 * formula that returns false immediately after having 00084 * found a non-normal string -> IsNormalFast() 00085 * todo: implement test routines, verify correctness 00086 * todo: compare speed with IsNormalAlt 00087 * 00088 * @param rL 00089 * generator of language L 00090 * @param rOAlph 00091 * observable alphabet 00092 * @param rK 00093 * generator of language K 00094 * 00095 * @return 00096 * true if K is normal w.r.t. L and OAlph 00097 * 00098 * @exception Exception 00099 * - thrown by NormalityConsistencyCheck() 00100 * 00101 * @ingroup SynthesisPlugIn 00102 * 00103 */ 00104 bool IsNormal( 00105 const Generator& rL, 00106 const EventSet& rOAlph, 00107 const Generator& rK); 00108 00109 /** 00110 * IsNormal wrapper. 00111 * Wrapper for convenient access via the run-time interface. 00112 */ 00113 bool IsNormal(const System& rPlantGen, const Generator& rSupCandGen); 00114 00115 00116 /** 00117 * SupNorm: compute supremal normal sublanguage. 00118 * 00119 * SupNorm calculates the supremal sublanguage 00120 * of the closed language K (generated by rK) 00121 * that is normal w.r.t. the closed language L 00122 * (generated by rL) and the set 00123 * of observable events. 00124 * 00125 * Method: The supremal normal sublanguage is computed 00126 * according to the Lin-Brandt-Formula: 00127 * supnorm(K)wrt(L)=K-Pinv[P(L-K)] 00128 * 00129 * SupNorm returns false on empty result. 00130 * 00131 * Parameters have to be deterministic, result is deterministic. 00132 * 00133 * 00134 * @param rL 00135 * generates the closed language L=L(rL) 00136 * @param rOAlph 00137 * observable alphabet 00138 * @param rK 00139 * generates the closed language K=L(rK) 00140 * @param rResult 00141 * marks the supremal normal 00142 * sublanguage (not necessaryly prefix closed) 00143 * 00144 * @return 00145 * true for nonempty result 00146 * 00147 * @exception Exception 00148 * - Alphabets of generators don't match (id 500) 00149 * - rOAlph not subset of rL.Alphabet() (id 506) 00150 * - K is not subset of L. (id 0) 00151 * 00152 * @ingroup SynthesisPlugIn 00153 * 00154 * 00155 */ 00156 bool SupNorm( 00157 const Generator& rL, 00158 const EventSet& rOAlph, 00159 const Generator& rK, 00160 Generator& rResult); 00161 00162 00163 /** 00164 * SupNormClosed - compute supremal normal and closed 00165 * sublanguage. 00166 * 00167 * SupNormClosed calculates the supremal sublanguage 00168 * of the closed language K (generated by rK) 00169 * that is closed and normal w.r.t. the closed language 00170 * L (generated by rL) and the set 00171 * of observable events. 00172 * 00173 * Method: The supremal normal sublanguage is computed 00174 * according to the Lin-Brandt-Formula: 00175 * supnormclosed(K)wrt(L)=K-Pinv[P(L-K)]Sigma* 00176 * The difference to supnorm lies in the concatenation of Sigma*. 00177 * SupNormClosed returns false on empty result. 00178 * 00179 * Parameters have to be deterministic, result is deterministic. 00180 * 00181 * 00182 * @param rL 00183 * generates the closed language L=L(rL) 00184 * @param rOAlph 00185 * observable alphabet 00186 * @param rK 00187 * generates the closed language K=L(rK) 00188 * @param rResult 00189 * marks the supremal normal and closed 00190 * sublanguage 00191 * 00192 * @return 00193 * true for nonempty result 00194 * 00195 * @exception Exception 00196 * - Alphabets of generators don't match (id 500) 00197 * - rOAlph not subset of rL.Alphabet() (id 506) 00198 * - K is not subset of L. (id 0) 00199 * 00200 * @ingroup SynthesisPlugIn 00201 * 00202 * 00203 */ 00204 bool SupNormClosed( 00205 const Generator& rL, 00206 const EventSet& rOAlph, 00207 const Generator& rK, 00208 Generator& rResult); 00209 00210 00211 /** 00212 * SupPrefixClosed: supremal closed sublanguage of K by cancelling 00213 * all tranistions leading to a non-marked state. 00214 * Returns false on empty result. 00215 * todo: implement test routines, verify correctness 00216 * 00217 * @param rK 00218 * marks the (not necessarily closed) language K=Lm(rK) 00219 * @param rResult 00220 * generates and marks the supremal closed sublanguage, 00221 * where L(rResult)=Lm(rResult) 00222 * 00223 * @return 00224 * true for nonempty result 00225 * 00226 * @exception Exception 00227 * - todo: check determinism of rK 00228 * 00229 * 00230 */ 00231 bool SupPrefixClosed( 00232 const Generator& rK, 00233 Generator& rResult); 00234 00235 00236 /** rti wrapper */ 00237 void SupNorm( 00238 const System& rPlantGen, 00239 const Generator& rSpecGen, 00240 Generator& rResGen); 00241 00242 00243 /** rti wrapper */ 00244 void SupNormClosed( 00245 const System& rPlantGen, 00246 const Generator& rSpecGen, 00247 Generator& rResGen); 00248 00249 00250 } // end namespace 00251 #endif |
libFAUDES 2.20d --- 2011.04.26 --- c++ source docu by doxygen