libFAUDES

Sections

Index

syn_functions.h

Go to the documentation of this file.
00001 /** @file syn_functions.h Misc functions related to synthesis */
00002 
00003 /* FAU Discrete Event Systems Library (libfaudes)
00004 
00005    Copyright (C) 2010  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_SYN_FUNCTIONS_H
00023 #define FAUDES_SYN_FUNCTIONS_H
00024 
00025 #include "corefaudes.h"
00026 
00027 namespace faudes {
00028     
00029 
00030 
00031 /**
00032  * Test for relative marking.
00033  *
00034  * Tests whether the language Lm(GCand) is relatively marked w.r.t.
00035  * the language Lm(GPlant). The formal definition of this property
00036  * requires
00037  *
00038  * closure(Lm(GCand)) ^ Lm(GPlant) <=  Lm(GCand).
00039  *
00040  * The implementation tests
00041  *
00042  * L(GCand) ^ Lm(GPlant) <= Lm(GCand)
00043  * 
00044  * by first performing the product composition and then inspecting
00045  * the marking to require
00046  *
00047  * ( forall accessible (qPlant,qCand) ) [ qPlant in QPlant_m implies qCand in QCand_m ].
00048  *
00049  * In general, the test is only sufficient.
00050  * Provided the arguments are trim and deterministic, the test
00051  * is sufficient and necessary. 
00052  *
00053  * @param rGenPlant
00054  *   Generator GPlant
00055  * @param rGenCand
00056  *   Generator GCand
00057  *
00058  *
00059  * @exception Exception
00060  *   - alphabets of generators don't match (id 100)
00061  *   - arguments are not trim (id 201, only if FAUDES_CHECKED is set)
00062  *   - arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
00063  *
00064  * @return 
00065  *   true / false
00066  *
00067  * @ingroup SynthesisPlugIn
00068  */
00069 bool IsRelativelyMarked(const vGenerator& rGenPlant, const vGenerator& rGenCand);
00070 
00071 
00072 /**
00073  * Test for relative prefix-closedness.
00074  *
00075  * Tests whether the language Lm(GCand) is relatively closed w.r.t.
00076  * the language Lm(GPant). The formal definition of this property
00077  * requires
00078  *
00079  * closure(Lm(GCand)) ^ Lm(GPlant) = Lm(GCand).
00080  *
00081  * The implementation tests
00082  *
00083  * L(GCand) ^ Lm(GPland) = Lm(GCand)
00084  * 
00085  * by performing the product composition and by testing
00086  *
00087  * - for L(GCand) subseteq L(GPlant), and
00088  * - ( forall accessible (qPland,qCand) ) [ qPlant in QPlant_m if and only if qCand in QCand_m ].
00089  *
00090  * In general, the test is only sufficient.
00091  * Provided the arguments are trim and deterministic, the test
00092  * is sufficient and necessary. 
00093  *
00094  * @param rGenPlant
00095  *   Generator GPlant
00096  * @param rGenCand
00097  *   Generator GCand
00098  *
00099  * @exception Exception
00100  *   - alphabets of generators don't match (id 100)
00101  *   - arguments are not trim (id 201, only if FAUDES_CHECKED is set)
00102  *   - arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
00103  *
00104  * @return 
00105  *   true / false
00106  *
00107  * @ingroup SynthesisPlugIn
00108  */
00109 bool IsRelativelyPrefixClosed(const vGenerator& rGenPlant, const vGenerator& rGenCand);
00110 
00111 
00112 
00113 /**
00114  * Test for relative marking, omega langauges.
00115  *
00116  * Tests whether the omega language Bm(GCand) 
00117  * is relatively marked w.r.t.
00118  * the omega language Bm(GPlant). The formal definition of this property
00119  * requires
00120  *
00121  * closure(Bm(GCand)) ^ Bm(GPlant) <= Bm(GCand).
00122  *
00123  * The implementation first performs the product composition 
00124  * of the two generators with product state space QPlant x QCand and 
00125  * generated language L(GPlant x GCand) = L(Plant) ^ L(Cand). It then investigates 
00126  * all SCCs that do not
00127  * contain a state that corresponds to GCand-marking. If and only if
00128  * none of the considered SCCs has a GPlant marking, the function
00129  * returns true.
00130  *
00131  * The arguments GCand and GPlant are required to be deterministic and omega trim.
00132  *
00133  * @param rGenPlant
00134  *   Generator GPlant
00135  * @param rGenCand
00136  *   Generator GCand
00137  *
00138  * @exception Exception
00139  *   - alphabets of generators don't match (id 100)
00140  *   - arguments are not omega-trim (id 201, only if FAUDES_CHECKED is set)
00141  *   - arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
00142  *
00143  *
00144  * @return 
00145  *   true / false
00146  *
00147  * @ingroup SynthesisPlugIn
00148  */
00149 bool IsRelativelyOmegaMarked(const vGenerator& rGenPlant, const vGenerator& rGenCand);
00150 
00151 /**
00152  * Test for relative closedness, omega languages.
00153  *
00154  * Tests whether the omega language Bm(GCand) 
00155  * is relatively closed w.r.t.
00156  * the omega language Bm(GPlant). The formal definition of this property
00157  * requires
00158  *
00159  * closure(Bm(GCand)) ^ Bm(GPlant) =  Bm(GCand).
00160  *
00161  *
00162  * The implementation first performs the product composition 
00163  * of the two generators with product state space QPlant x QCand and 
00164  * generated language L(GPlant x GCand) = L(GPlant) ^ L(GCand). It uses the composition
00165  * to test the follwing three conditions:
00166  * - L(GCand) subseteq L(GPlant);
00167  * - no SCC of GPlant x GCand without GCand-marking contains a state with GPlant-marking; and
00168  * - no SCC of GPlant x GCand without GPlant-marking contains a state with GCand-marking.
00169  * If and only if all three tests are passed, the function
00170  * returns true.
00171  *
00172  * The arguments GCand and GPlant are required to be deterministic and omega trim.
00173  *
00174  * @param rGenPlant
00175  *   Generator GPlant
00176  * @param rGenCand
00177  *   Generator GCand
00178  *
00179  *
00180  * @exception Exception
00181  *   - alphabets of generators don't match (id 100)
00182  *   - arguments are not omega trim (id 201, only if FAUDES_CHECKED is set)
00183  *   - arguments are non-deterministic (id 202, only if FAUDES_CHECKED is set)
00184  *
00185  *
00186  * @return 
00187  *   true / false
00188  *
00189  * @ingroup SynthesisPlugIn
00190  */
00191 bool IsRelativelyOmegaClosed(const vGenerator& rGenPlant, const vGenerator& rGenCand);
00192 
00193 /**
00194  * Test for relative closedness, omega languages.
00195  *
00196  * This variant does not perform consitency tests on the parameters. Neither
00197  * does it handle the special cases on empty arguments.
00198  * See also IsRelativelyOmegaClosed(const vGenerator&, const vGenerator& )
00199  *
00200  * @param rGenPlant
00201  *   Generator GPlant
00202  * @param rGenCand
00203  *   Generator GCand
00204  *
00205  */
00206 bool IsRelativelyOmegaClosedUnchecked(const vGenerator& rGenPlant, const vGenerator& rGenCand);
00207 
00208 
00209 
00210 
00211 
00212 } // namespace faudes
00213 
00214 #endif 
00215 
00216 

libFAUDES 2.16b --- 2010-9-8 --- c++ source docu by doxygen 1.6.3