pd_test_util.h

Go to the documentation of this file.
00001 /** @file pd_test_util.h  Creation of test classes*/
00002 
00003 
00004 /* Pushdown plugin for FAU Discrete Event Systems Library (libfaudes)
00005 
00006    Copyright (C) 2013  Stefan Jacobi, Sven Schneider, Anne-Kathrin Hess
00007 
00008 */
00009 
00010 #ifndef FAUDES_PD_TEST_UTIL_H
00011 #define FAUDES_PD_TEST_UTIL_H
00012 
00013 #include "corefaudes.h"
00014 #include "pd_include.h"
00015 
00016 namespace faudes {
00017 
00018 /**
00019  * build a test generator
00020  * 
00021  * @return
00022  *      the populated test generator
00023  */
00024 PushdownGenerator TestGenerator1();
00025 
00026 /**
00027  * build a test generator
00028  * 
00029 <Generator>
00030 Generator    
00031 
00032 % 
00033 %  Statistics for Generator
00034 % 
00035 %  States:        3
00036 %  Init/Marked:   1/1
00037 %  Events:        3
00038 %  Transitions:   4
00039 %  StateSymbols:  3
00040 %  Attrib. E/S/T: 1/0/4
00041 % 
00042 
00043 <Alphabet>
00044 lambda        a             +C+           b            d
00045 </Alphabet>
00046 
00047 <States>
00048 s1            s2            s3           
00049 </States>
00050 
00051 <TransRel>
00052 s1            a             s2           
00053 ++            +lambda+      +dot, dot+   
00054 s1            b             s2           
00055 ++            +square+      +dot, square+ 
00056 s2            lambda        s3           
00057 ++            +dot, dot+    +square+     
00058 s3            b             s1           
00059 ++            +square+      +square+     
00060 </TransRel>
00061 
00062 <InitStates>
00063 s1           
00064 </InitStates>
00065 
00066 <MarkedStates>
00067 s2           
00068 </MarkedStates>
00069 
00070 <StackSymbols>
00071 lambda        dot           square        bottom       
00072 </StackSymbols>
00073 
00074 </Generator>
00075 
00076  * @return
00077  *      the populated test generator
00078  */
00079 PushdownGenerator TestGenerator2();
00080 
00081 /**
00082 <Generator>
00083 Generator    
00084 
00085 % 
00086 %  Statistics for Generator
00087 % 
00088 %  States:        3
00089 %  Init/Marked:   1/1
00090 %  Events:        2
00091 %  Transitions:   4
00092 %  StateSymbols:  3
00093 %  Attrib. E/S/T: 1/0/4
00094 % 
00095 
00096 <Alphabet>
00097 a             +C+           b            
00098 </Alphabet>
00099 
00100 <States>
00101 s1            s2            s3           
00102 </States>
00103 
00104 <TransRel>
00105 s1            a             s2           
00106 ++            +dot+         +dot, dot+   
00107 s1            b             s2           
00108 ++            +square+      +dot, square+ 
00109 s2            a             s3           
00110 ++            +dot+         +dot+        
00111 s3            b             s1           
00112 ++            +dot+         +dot+        
00113 </TransRel>
00114 
00115 <InitStates>
00116 s1           
00117 </InitStates>
00118 
00119 <MarkedStates>
00120 s2           
00121 </MarkedStates>
00122 
00123 <StackSymbols>
00124 lambda        dot           square       
00125 </StackSymbols>
00126 
00127 </Generator>
00128 */
00129 PushdownGenerator TestGenerator3();
00130 
00131 /**
00132 <Generator>
00133 Generator    
00134 
00135 % 
00136 %  Statistics for Generator
00137 % 
00138 %  States:        3
00139 %  Init/Marked:   1/1
00140 %  Events:        2
00141 %  Transitions:   4
00142 %  StateSymbols:  3
00143 %  Attrib. E/S/T: 1/0/4
00144 % 
00145 
00146 <Alphabet>
00147 a             +C+           b            
00148 </Alphabet>
00149 
00150 <States>
00151 s1            s2            s3           
00152 </States>
00153 
00154 <TransRel>
00155 s1            a             s2           
00156 ++            +dot, dot, dot+  +dot, dot+   
00157 s1            b             s2           
00158 ++            +dot, square+  +dot, square+ 
00159 s2            a             s3           
00160 ++            +dot, dot+    +dot+        
00161 s3            b             s1           
00162 ++            +dot+         +dot+        
00163 </TransRel>
00164 
00165 <InitStates>
00166 s1           
00167 </InitStates>
00168 
00169 <MarkedStates>
00170 s2           
00171 </MarkedStates>
00172 
00173 <StackSymbols>
00174 lambda        dot           square       
00175 </StackSymbols>
00176 
00177 </Generator>
00178 */
00179 PushdownGenerator TestGenerator4();
00180 
00181 /**
00182 <Generator>
00183 Generator    
00184 
00185 % 
00186 %  Statistics for Generator
00187 % 
00188 %  States:        3
00189 %  Init/Marked:   1/1
00190 %  Events:        3
00191 %  Transitions:   4
00192 %  StateSymbols:  3
00193 %  Attrib. E/S/T: 1/0/4
00194 % 
00195 
00196 <Alphabet>
00197 lambda        a             +C+           b            
00198 </Alphabet>
00199 
00200 <States>
00201 s1            s2            s3           
00202 </States>
00203 
00204 <TransRel>
00205 s1            a             s2           
00206 ++            +square+      +square+     
00207 s1            b             s2           
00208 ++            +dot+         +square+     
00209 s2            lambda        s3           
00210 ++            +dot+        
00211 +square, dot, dot+  +square+      +square+     
00212 s3            lambda        s1           
00213 ++            +square+     
00214 +lambda+      +square+      +square, dot+ 
00215 </TransRel>
00216 
00217 <InitStates>
00218 s1           
00219 </InitStates>
00220 
00221 <MarkedStates>
00222 s2           
00223 </MarkedStates>
00224 
00225 <StackSymbols>
00226 lambda        dot           square       
00227 </StackSymbols>
00228 
00229 </Generator>
00230 
00231 */
00232 PushdownGenerator TestGenerator5();
00233 
00234 PushdownGenerator TestGenerator6();
00235 
00236 PushdownGenerator TestGenerator7();
00237 
00238 PushdownGenerator TestGenerator8();
00239 
00240 PushdownGenerator TestGenerator9();
00241 
00242 PushdownGenerator TestGenerator10();
00243 
00244 PushdownGenerator TestGenerator11();
00245 
00246 PushdownGenerator TestGenerator12();
00247 
00248 PushdownGenerator TestGenerator13();
00249 
00250 PushdownGenerator TestGenerator14();
00251 
00252 PushdownGenerator TestGenerator15();
00253 
00254 PushdownGenerator TestGenerator16();
00255 
00256 PushdownGenerator TestGenerator17();
00257 
00258 PushdownGenerator TestGenerator18();
00259 
00260 PushdownGenerator TestGenerator19();
00261 
00262 PushdownGenerator TestGenerator20();
00263 
00264 PushdownGenerator TestGenerator21();
00265 
00266 PushdownGenerator TestGenerator22();
00267 
00268 PushdownGenerator TestGenerator23();
00269 
00270 PushdownGenerator TestGenerator24();
00271 
00272 PushdownGenerator TestGenerator25();
00273 
00274 /**
00275  * 
00276 <Generator>
00277 Generator    
00278 
00279 % 
00280 %  Statistics for Generator
00281 % 
00282 %  States:        3
00283 %  Init/Marked:   1/1
00284 %  Events:        3
00285 %  Transitions:   5
00286 %  StateSymbols:  3
00287 %  Attrib. E/S/T: 2/0/0
00288 % 
00289 
00290 <Alphabet>
00291 a             +C+           b             c             +C+          
00292 </Alphabet>
00293 
00294 <States>
00295 s1            s2            s3           
00296 </States>
00297 
00298 <TransRel>
00299 s1            a             s2           
00300 s1            b             s3           
00301 s1            c             s3           
00302 s2            b             s1           
00303 s3            a             s2           
00304 </TransRel>
00305 
00306 <InitStates>
00307 s1           
00308 </InitStates>
00309 
00310 <MarkedStates>
00311 s3           
00312 </MarkedStates>
00313 
00314 
00315 </Generator>
00316 
00317  * 
00318  * @return
00319  *      the populated test system
00320  */
00321 System TestSystem1();
00322 
00323 System TestSystem2();
00324 
00325 System TestSystem3();
00326 
00327 System TestSystem4();
00328 
00329 System TestSystem5();
00330 
00331 /**
00332  * build a test grammer based on the generator from TestGenerator()
00333  * 
00334  * start symbol: (3, 2)
00335  * nonterminals: (1, 2, 2), (2, 3, 3), (3, 2), (4, 3), (5, 3, 1)
00336  * terminals: a, b
00337  * grammar productions: 
00338  *      (1, 2, 2) --> (2, 3, 3)
00339  *      (1, 2, 2) --> (5, 3, 1)
00340  *      (3, 2) --> (4, 3)b
00341  *      (4, 3) --> a(1, 2, 2)b
00342  *      (5, 3, 1) --> b
00343  * 
00344  * @return
00345  *      the populated test grammar
00346  */
00347 Grammar TestGrammar1();
00348 
00349 /**
00350  * build a test grammer based on the generator from TestGenerator()
00351  * 
00352  * start symbol: (4, 3)
00353  * nonterminals: (1, 2, 2), (2, 3, 3), (3, 2), (4, 3), (5, 3, 1)
00354  * terminals: a, b
00355  * grammar productions: 
00356  *      (1, 2, 2) --> (2, 3, 3)
00357  *      (1, 2, 2) --> (5, 3, 1)
00358  *      (4, 3) --> a(1, 2, 2)b
00359  *      (5, 3, 1) --> b
00360  * @return
00361  *      the populated test grammar
00362  */
00363 Grammar TestGrammar2();
00364 Grammar TestGrammar3();
00365 Grammar TestGrammar4();
00366 Grammar TestGrammar5();
00367 Grammar TestGrammar6();
00368 Grammar TestGrammar7();
00369 Grammar TestGrammar8();
00370 Grammar TestGrammar9();
00371 Grammar TestGrammar10();
00372 Grammar TestGrammar11();
00373 
00374 /**
00375  * write to console to indicate start of test
00376  * 
00377  * @param name
00378  *      name of the test
00379  */
00380 void TestStart(std::string name);
00381 
00382 /**
00383  * write to console to indicate end of test
00384  * 
00385  * @param name
00386  *      name of the test
00387  */
00388 void TestEnd(std::string name);
00389 
00390 } // namespace faudes
00391 
00392 #endif

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