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 @subsection 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 @subsection 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 @sunsection 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 <p>
159 Copyright (C) 2006 Bernd Opitz <br>
160 Copyright (C) 2008 - 2010 Thomas Moor, Klaus Schmidt, Sebastian Perk <br>
161 Copyright (C) 2010 - 2025 Thomas Moor, Klaus Schmidt<br>
162 </p>
163 */
164 
165 /************************************************
166  ************************************************
167  ************************************************/
168 
169 
170 /** @defgroup GeneratorClasses Generator Classes
171 
172 A generator is a tupel G = (Q, Sigma, Delta, Qo, Qm). Generators are used
173 to represent the closed and the marked language L(G)
174 and L_m(G) respectively. The core members of FAUDES generator classes are
175 - mpStates, the stateset Q, type faudes::StateSet;
176 - mpAlphabet, the Alphabet Sigma, type faudes::EventSet;
177 - mpTransRel, the transitionrelation Delta, type faudes::TransSet;
178 - mInitStates, the set of initial states Qo, type faudes::StateSet;
179 - mMarkedStates, the set of marked states Qm, type faudes::StateSet.
180 
181 The base class for all libFAUDES generator classes is the faudes::vGenerator,
182 also accessible as typedef faudes::Generator.
183 It provides functions for read and write access to the core members and file IO.
184 Derived generator classes provide attibutes attached to events, states and transitions
185 in order to extend basic generator semantics.
186 Examples for attributes are controllability flags for events;
187 see also faudes::TcGenerator or faudes::System.
188 
189 */
190 
191 /************************************************
192  ************************************************
193  ************************************************/
194 
195 /** @defgroup ContainerClasses State, Event and Transition Set
196 
197 This module collects all basic container classes aka state- event-
198 and transition-sets, e.g.,
199 
200 - TBaseSet base class for all libFaudes containers,
201 - IndexSet set of plain indices,
202 - TaIndexSet set of indices with attributes,
203 - NameSet set of indices with symbolic names,
204 - TaNameSet set of indices with attributes and symbolic names,
205 - TTransSet set of transitions in a sepcific order.
206 
207 All libFAUDES container classes share the same basic API
208 similar to the one known from STL containers. In addition,
209 they implement file IO via faudes token streams and/or XML.
210 Most commonly used is the plain faudes::EventSet and the faudes::Alphabet.
211 Plug-ins introduce specialized sets for their purposes.
212 
213 */
214 
215 /************************************************
216  ************************************************
217  ************************************************/
218 
219 /** @defgroup GeneratorFunctions General Purpose Functions
220 
221 This module collects general purpose functions on
222 Generator, System, EventSet and Alphabet typed data.
223 It includes functions related to regular expressions,
224 projection, parallel composition, etc.
225 
226 */
227 
228 
229 /************************************************
230  ************************************************
231  ************************************************/
232 
233 /** @defgroup Tutorials Tutorials
234 
235 This module collects all tutorials. The tutorials are seen as a pragmatic
236 introduction to supplement the doxygen generated html documentaion of
237 class and function definitions. Plug-Ins are meant to contribute additional tutorials
238 to illustrate their intended usage.
239 
240 To compile the tutorials call make with target &quot;tutorial&quot;
241 in the &quot;libfaudes&quot; directory of the source tree:
242 <pre>$ make tutorial
243 </pre>
244 
245 
246 */
247 
248 /************************************************
249  ************************************************
250  ************************************************/
251 
252 
253 /** @defgroup AllPlugins PlugIns
254 
255 List of all plug-ins that are installed and enabled
256 in this copy of libFAUDES.
257 
258 To install a plug-in, copy its sources into the plug directory
259 of the libfaudes source tree. To enable a plug-in, either edit the
260 main Makefile or add its name to the FAUDES_PLUGINS environment variable.
261 The <a href="../faudes_algorithm_example.html">example plug-in</a>
262 further illustrates the plug-in infrastructure.
263 
264 For instructions on how to compile libFAUDES, see the
265 <a href="../faudes_build.html">build-system</a> documentation.
266 
267 */
268 
269 /************************************************
270  ************************************************
271  ************************************************/
272 
273 /** @defgroup TokenIO Faudes object serialization.
274 
275 Objects of a class derived from the universal base faudes::Type
276 provide a uniform interface for serialization, which are to be
277 implemented for derived classes. This is supported by
278 - the faudes::Token class to model atomic data units like integers, sections tags and strings.
279 - the faudes::TokenReader class to read a tokenized character stream from file or string
280 - the faudes::TokenWriter class to write a tokenized character stream to file or string
281 
282 A token hast value types attached, e.g., type string, number, and/or tag.
283 Tags indicate the beginning or end of a section, must balance, and must be XML compliant.
284 The character data inbetween the tags is interpreted as a sequence of strings and numbers,
285 to e.g. conveniently represent a list of events, transition or states. While the Token class
286 implements reading and writing individual tokens from a C++ stream, the TokenReader and TokenWriter
287 classes keep track of nested sections. Thus, opening a file via a TokenReader allows to scan for
288 a particular section or to loop over all tokens from a particular section.
289 
290 Tokens by example
291 - <tt>abcd</tt> the string "abcd"
292 - <tt>"ab cd"</tt> the same string containing a blank
293 - <tt>'ad\"cd';</tt> the same string containing a double quote
294 - <tt>abc\\d</tt> the same string containing a backslash
295 - <tt>"123"</tt> the string 123
296 - <tt>123</tt> the non-negative integer 123
297 - <tt>0xFF</tt> the non-negative integer 255 (hexadecimal notation)
298 - <tt>1.5</tt> the float number 1.5
299 - <tt>&lt;Start&gt;</tt> tag to indicate begin of section Start (so called XML element)
300 - <tt>&lt;/Start&gt;</tt> tag to indicate end of section Start (so called XML element)
301 - <tt>&lt;Start value="x12"&gt;</tt> begin tag with XML attribute
302 
303 Faudes serialisation example
304 @code
305 <Generator name="simple machine">
306 
307 <Alphabet>
308 alpha +C+ beta mue lambda
309 </Alphabet>
310 
311 <States>
312 idle busy down
313 </States>
314 
315 <TransRel>
316 idle alpha busy
317 busy beta idle
318 busy mue down
319 down lambda idle
320 </TransRel>
321 
322 <InitStates>
323 idle
324 </InitStates>
325 
326 <MarkedStates>
327 idle
328 </MarkedStates>
329 
330 % this is a comment: it will be ignored by TokenReader
331 
332 <!-- another comment, will be ignored by TokenReader and other XML parsers -->
333 
334 </Generator>
335 @endcode
336 
337 <br>
338 
339 Note that the special characters <tt>&lt;</tt>, <tt>&gt;</tt> and <tt>&amp;</tt> must be
340 quoted as entities, i.e., represented as <tt>&amp;xxx;</tt> where the <tt>xxx</tt> refers to the
341 character. This style of quoting is also required when the respective character appears within
342 a quoted string or a faudes-style comment. This restriction is required for XML compliance.
343 
344 <br>
345 <br>
346 
347 
348 
349 <b>Technical Note: alternative file format</b>
350 
351 libFAUDES token formats are intended to be human editable. However, the
352 specific interpretation of the character data between the begin and end elements
353 can not be covered a formal XML document model. The design objective here
354 was a balance between a formal model and human editable data input.
355 
356 Since the initial design, however, a number of faudes types where inroduced to
357 configure the run-time behaviour of tools like the simulator or hardware access.
358 Theese kind of objects are seldomly edited and we feel that a more rigoruos
359 XML format is required to make use of professional XML editors/tools.
360 Therefore we started in libFAUDES 2.16f to implement an alternative serialization
361 format. Recent versions of libFAUDES still read the old format and provide
362 the utility <tt>libfaudes/bin/fts2ftx</tt> for file conversion.
363 Please let us know if you experience problems with data in the old format.
364 
365 Typical user data like generators and alphabets by default continue to use
366 the original file format for token output. However, for applications that require
367 the more rigoruos XML format, the base class Type provides the additional
368 interface XWrite().
369 
370 */
371 
372 /************************************************
373  ************************************************
374  ************************************************/
375 
376 /** @namespace faudes
377 
378 libFAUDES resides within the namespace faudes. Plug-Ins may use the same namespace.
379 
380 */

libFAUDES 2.33h --- 2025.06.18 --- c++ api documentaion by doxygen