doxygen_groups.h
Go to the documentation of this file.
1 /************************************************
2  ************************************************
3  ************************************************/
4 
5 /**
6 
7 @mainpage libFAUDES C++ API
8 
9 
10 <p>
11 As a C++ library, the natural application interface of libFAUDES is given by C++ class and
12 function declarations. The API documentation is generated directly from the C++ source code
13 and supplemented by <a href="group__Tutorials.html">tutorials</a> that illustrate the intended
14 ussage by simple example programs.
15 </p>
16 <p>
17 The C++ API is organized as follows:
18 <ul class="l2">
19 <li><p>
20 <a href="group__ContainerClasses.html">container classes</a>
21 for sets of events, states and transitions;
22 </p></li>
23 <li><p>
24 <a href="group__GeneratorClasses.html">generator classes</a>
25 to model finite state machines;
26 </p></li>
27 <li><p>
28 <a href="group__GeneratorFunctions.html">functions</a>
29 that implement general purpose algorithms on generators; and
30 </p></li>
31 <li><p>
32 <a href="group__AllPlugins.html">plug-ins</a>
33 to provide specialised algorithms and derived generator classes.
34 </p></li>
35 <li><p>
36 <a href="group__RunTimeInterface.html">run-time interface (RTI)</a>
37 for transparent extensions (advanced topic)
38 <li><p>
39 <a href="group__TokenIO.html">token-IO</a>
40 to serialize faudes typed objects (advanced topic)
41 </p></li>
42 </ul>
43 </p>
44 
45 
46 <p>
47 In addition to the C++ API, libFAUDES provides a
48 <a href="../reference/index.html">user-reference</a> to address the typical user
49 of a libFAUDES application without bothering with C++ implementation technicalities.
50 </p>
51 
52 
53 <br>
54 
55 @section SecHomeCompile Compile
56 
57 
58 <p>
59 libFAUDES is coded in posix C++ and should compile within any recent C++
60 development environment. The supplied
61 <tt>Makefile</tt> is targeted for the GNU-Tool-Chain and provides the
62 following build targets:
63 </p>
64 
65 <ul class="l2">
66 <li><p>
67 <tt>make configure</tt> to configure the library; e.g., select plug-ins, choose dynamic or static linking, etc.
68 </p></li>
69 <li><p>
70 <tt>make</tt> to build the library and utility executables;
71 </p></li>
72 <li><p>
73 <tt>make tutorial</tt> to compile examples from the tutorial section.
74 </p></li>
75 <li><p>
76 <tt>make test</tt> to evaluate included test cases
77 </p></li>
78 </ul>
79 
80 <p>
81 For more information on how to compile libFAUDES,
82 see the
83 <a href="../faudes_build.html">build-system documentation</a>.
84 </p>
85 
86 <br/>
87 
88 
89 @section SecCoding Coding Conventions
90 
91 
92 <p>
93 In order to ease communication, libFAUDES sources try
94 to follow some notational conventions.
95 They are extracted from
96 <a href="http://www.possibility.com/Cpp/CppCodingStandard.html" target="_top">
97 www.possibility.com/Cpp/CppCodingStandard.html</a>.
98 </p>
99 
100 <ul class="l2">
101 <li><p>
102 member variable names are upper case with lower case prefix that
103 indicates ownership, i.e.
104 <tt>m</tt> for ordinary members,
105 <tt>p</tt> for pointer to variables controlled somewhere else,
106 <tt>r</tt> for refernces to variables controlled somewhere else, and
107 <tt>mp</tt> for pointers to variables controlled here;
108 </p></li>
109 <li><p>
110 function-local stack variables are lower case,
111 </p></li>
112 <li><p>
113 class names are upper case, with prefix T for class templates.
114 </p></li>
115 <li><p>
116 keep local stuff in the .cpp file, minimize .h files
117 </p></li>
118 </ul>
119 
120 <p>
121 Moreover, we
122 </p>
123 <ul class="l2">
124 <li><p>
125 avoid the Set/Get prefixes of members functions and use overloading
126 instead;
127 </p></li>
128 <li><p>
129 throw exceptions rather than abort() or assert();
130 </p></li>
131 <li><p>
132 use FAUDES_filename_H macro in headers;
133 </p></li>
134 <li><p>
135 use the provided macros in cfl_definitions FD_WARN etc for any console output;
136 </p></li>
137 <li><p>
138 use 2-space indent to have shorter lines of code;
139 </p></li>
140 <li><p>
141 never ever have "using" statements in headers.
142 </p></li>
143 </ul>
144 
145 <br/>
146 
147 @section SecHomeLicense License
148 
149 
150 <p>
151 The core libFAUDES sources incl. the C++ API
152 are provided for free under conditions of the GNU Lesser General Public License.
153 Note that different and perhaps more restrictive license terms may apply to the plug-ins that reside in the plug-in directory.
154 </p>
155 
156 
157 
158 
159 <br>
160 <br>
161 <br>
162 
163 
164 <p>
165 Copyright (C) 2006 Bernd Opitz <br>
166 Copyright (C) 2008 - 2010 Thomas Moor, Klaus Schmidt, Sebastian Perk <br>
167 Copyright (C) 2010 - 2024 Thomas Moor, Klaus Schmidt<br>
168 </p>
169 */
170 
171 /************************************************
172  ************************************************
173  ************************************************/
174 
175 
176 /** @defgroup GeneratorClasses Generator Classes
177 
178 A generator is a tupel G = (Q, Sigma, Delta, Qo, Qm). Generators are used
179 to represent the closed and the marked language L(G)
180 and L_m(G) respectively. The core members of FAUDS generator classes are
181 - mpStates, the stateset Q, type faudes::StateSet;
182 - mpAlphabet, the Alphabet Sigma, type faudes::EventSet;
183 - mpTransRel, the transitionrelation Delta, type faudes::TransSet;
184 - mInitStates, the set of initial states Qo, type faudes::StateSet;
185 - mMarkedStates, the set of marked states Qm, type faudes::StateSet.
186 
187 The base class for all libFAUDES generator classes is the faudes::vGenerator,
188 also accessible as typedef faudes::Generator.
189 It provides functions for read and write access to the core members and file IO.
190 Derived generator classes provide attibutes attached to events, states and transitions
191 in order to extend basic generator semantics.
192 Examples for attributes are controllability flags for events;
193 see also faudes::TcGenerator or faudes::System.
194 
195 */
196 
197 /************************************************
198  ************************************************
199  ************************************************/
200 
201 /** @defgroup ContainerClasses State, Event and Transition Set
202 
203 This module collects all basic container classes aka state- event-
204 and transition-sets, e.g.,
205 
206 - TBaseSet base class for all libFaudes containers,
207 - IndexSet set of plain indices,
208 - TaIndexSet set of indices with attributes,
209 - NameSet set of indices with symbolic names,
210 - TaNameSet set of indices with attributes and symbolic names,
211 - TTransSet set of transitions in a sepcific order.
212 
213 All libFAUDES container classes share the same basic API
214 similar to the one known from STL containers. In addition,
215 they implement file IO via faudes token streams and/or XML.
216 Most commonly used is the plain faudes::EventSet and the faudes::Alphabet.
217 Plug-ins introduce specialized sets for their purposes.
218 
219 */
220 
221 /************************************************
222  ************************************************
223  ************************************************/
224 
225 /** @defgroup GeneratorFunctions General Purpose Functions
226 
227 This module collects general purpose functions on
228 Generator, System, EventSet and Alphabet typed data.
229 It includes functions related to regular expressions,
230 projection, parallel composition, etc.
231 
232 */
233 
234 
235 /************************************************
236  ************************************************
237  ************************************************/
238 
239 /** @defgroup Tutorials Tutorials
240 
241 This module collects all tutorials. The tutorials are seen as a pragmatic
242 introduction to supplement the doxygen generated html documentaion of
243 class and function definitions. Plug-Ins are meant to contribute additional tutorials
244 to illustrate their intended usage.
245 
246 To compile the tutorials call make with target &quot;tutorial&quot;
247 in the &quot;libfaudes&quot; directory of the source tree:
248 <pre>$ make tutorial
249 </pre>
250 
251 
252 */
253 
254 /************************************************
255  ************************************************
256  ************************************************/
257 
258 
259 /** @defgroup AllPlugins PlugIns
260 
261 List of all plug-ins that are installed and enabled
262 in this copy of libFAUDES.
263 
264 To install a plug-in, copy its sources into the plug directory
265 of the libfaudes source tree. To enable a plug-in, either edit the
266 main Makefile or add its name to the FAUDES_PLUGINS environment variable.
267 The <a href="../faudes_algorithm_example.html">example plug-in</a>
268 further illustrates the plug-in infrastructure.
269 
270 For instructions on how to compile libFAUDES, see the
271 <a href="../faudes_build.html">build-system</a> documentation.
272 
273 */
274 
275 /************************************************
276  ************************************************
277  ************************************************/
278 
279 /** @defgroup TokenIO Faudes object serialization.
280 
281 Objects of a class derived from the universal base faudes::Type
282 provide a uniform interface for serialization, which are to be
283 implemented for derived classes. This is supported by
284 - the faudes::Token class to model atomic data units like integers, sections tags and strings.
285 - the faudes::TokenReader class to read a tokenized character stream from file or string
286 - the faudes::TokenWriter class to write a tokenized character stream to file or string
287 
288 A token hast value types attached, e.g., type string, number, and/or tag.
289 Tags indicate the beginning or end of a section, must balance, and must be XML compliant.
290 The character data inbetween the tags is interpreted as a sequence of strings and numbers,
291 to e.g. conveniently represent a list of events, transition or states. While the Token class
292 implements reading and writing individual tokens from a C++ stream, the TokenReader and TokenWriter
293 classes keep track of nested sections. Thus, opening a file via a TokenReader allows to scan for
294 a particular section or to loop over all tokens from a particular section.
295 
296 Tokens by example
297 - <tt>abcd</tt> the string "abcd"
298 - <tt>"ab cd"</tt> the same string containing a blank
299 - <tt>'ad\"cd';</tt> the same string containing a double quote
300 - <tt>abc\\d</tt> the same string containing a backslash
301 - <tt>"123"</tt> the string 123
302 - <tt>123</tt> the non-negative integer 123
303 - <tt>0xFF</tt> the non-negative integer 255 (hexadecimal notation)
304 - <tt>1.5</tt> the float number 1.5
305 - <tt>&lt;Start&gt;</tt> tag to indicate begin of section Start (so called XML element)
306 - <tt>&lt;/Start&gt;</tt> tag to indicate end of section Start (so called XML element)
307 - <tt>&lt;Start value="x12"&gt;</tt> begin tag with XML attribute
308 
309 Faudes serialisation example
310 @code
311 <Generator name="simple machine">
312 
313 <Alphabet>
314 alpha +C+ beta mue lambda
315 </Alphabet>
316 
317 <States>
318 idle busy down
319 </States>
320 
321 <TransRel>
322 idle alpha busy
323 busy beta idle
324 busy mue down
325 down lambda idle
326 </TransRel>
327 
328 <InitStates>
329 idle
330 </InitStates>
331 
332 <MarkedStates>
333 idle
334 </MarkedStates>
335 
336 % this is a comment: it will be ignored by TokenReader
337 
338 <!-- another comment, will be ignored by TokenReader and other XML parsers -->
339 
340 </Generator>
341 @endcode
342 
343 <br>
344 
345 Note that the special characters <tt>&lt;</tt>, <tt>&gt;</tt> and <tt>&amp;</tt> must be
346 quoted as entities, i.e., represented as <tt>&amp;xxx;</tt> where the <tt>xxx</tt> refers to the
347 character. This style of quoting is also required when the respective character appears within
348 a quoted string or a faudes-style comment. This restriction is required for XML compliance.
349 
350 <br>
351 <br>
352 
353 
354 
355 <b>Technical Note: alternative file format</b>
356 
357 libFAUDES token formats are intended to be human editable. However, the
358 specific interpretation of the character data between the begin and end elements
359 can not be covered a formal XML document model. The design objective here
360 was a balance between a formal model and human editable data input.
361 
362 Since the initial design, however, a number of faudes types where inroduced to
363 configure the run-time behaviour of tools like the simulator or hardware access.
364 Theese kind of objects are seldomly edited and we feel that a more rigoruos
365 XML format is required to make use of professional XML editors/tools.
366 Therefore we started in libFAUDES 2.16f to implement an alternative serialization
367 format. Recent versions of libFAUDES still read the old format and provide
368 the utility <tt>libfaudes/bin/fts2ftx</tt> for file conversion.
369 Please let us know if you experience problems with data in the old format.
370 
371 Typical user data like generators and alphabets by default continue to use
372 the original file format for token output. However, for applications that require
373 the more rigoruos XML format, the base class Type provides the additional
374 interface XWrite().
375 
376 */
377 
378 /************************************************
379  ************************************************
380  ************************************************/
381 
382 /** @namespace faudes
383 
384 libFAUDES resides within the namespace faudes. Plug-Ins may use the same namespace.
385 
386 */

libFAUDES 2.32f --- 2024.12.22 --- c++ api documentaion by doxygen