DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <AutFileDescriptor.hh>
Classes | |
class | Transition |
Public Types | |
using | State = size_t |
using | Event = _Event |
using | MyReadEvent = ReadEvent< Event > |
using | MyPrintEvent = PrintEvent< Event > |
using | ConstTransitionIterator = typename std::set< Transition >::const_iterator |
using | TransitionIterator = typename std::set< Transition >::iterator |
using | ConstInitialIterator = typename std::set< State >::const_iterator |
using | InitialIterator = typename std::set< State >::iterator |
Private Member Functions | |
bool | autFileTransitionEvent (const std::string &betweenFirstAndLastComma, Event &event) |
bool | autFileSourceState (const std::string &beforeFirstComma, State &source) |
bool | autFileTargetState (const std::string &afterLastComma, State &target) |
std::istream & | autFileTransition (std::istream &stream, State &source, Event &event, State &target, bool &ok) |
std::istream & | autFileHeader (std::istream &stream, State &initialState, size_t &numberOfTransitions, size_t &numberOfStates, bool &ok) |
Private Attributes | |
size_t | _nbStates |
std::set< Transition > | _transitions |
std::set< State > | _initials |
This class records as an object all the pieces of information that is contained in a '.aut' file
about
the aut file format: The first line of an AUT file has the following syntax: des (<initial-state>, <number-of-transitions>, <number-of-states>) The "des" keywords stands for "descriptor". The <number-of-states> must be greater or equal to 1, because there is always at least one state, the initial state. State numbers range between 0 and <number-of-states> - 1. The <initial-state> is always equal to 0. The remainder of the AUT file consists of one line per transition, in an arbitrary order. Each remaining line has the following syntax: (<from-state>, <label>, <to-state>) where <from-state> and <to-state> are state numbers and where <label> can take two possible forms: <unquoted-label> consists of a character string starting with a letter, and followed by zero, one, or many letters, digits, or underscore characters. <quoted-label> consists of a character string starting with a double quote and ending with a double quote. Between these two double quotes, there can be zero, one or many printable characters; the meaning of "printable" is given by the POSIX isprint() function with locale "C" (namely, ASCII characters with decimal codes in the range from 32 to 126, bounds included). No other assumption should be made about the characters present between these two double quotes. In particular, the double quote character itself may be present, and may not necessarily be "escaped" in some way (e.g., preceded by a backslash, as in C). Definition at line 145 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::ConstInitialIterator = typename std::set< State >::const_iterator |
Definition at line 334 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::ConstTransitionIterator = typename std::set< Transition >::const_iterator |
Definition at line 332 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::Event = _Event |
Definition at line 153 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::InitialIterator = typename std::set< State >::iterator |
Definition at line 335 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::MyPrintEvent = PrintEvent<Event> |
Definition at line 155 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::MyReadEvent = ReadEvent<Event> |
Definition at line 154 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::State = size_t |
Definition at line 152 of file AutFileDescriptor.hh.
using Diades::Automata::Experimental::AutFileDescriptor< _Event >::TransitionIterator = typename std::set< Transition >::iterator |
Definition at line 333 of file AutFileDescriptor.hh.
|
default |
Default constructor
|
default |
Copy constructor (default)
other |
|
default |
Move constructor (default)
other |
|
virtualdefault |
Destructor
|
inline |
Add a new transition
transition | a new transition |
Definition at line 508 of file AutFileDescriptor.hh.
|
inlineprivate |
stream | the input stream |
initialState | the recorded initial state |
numberOfTransitions | the recorded number of transitions |
numberOfStates | the recorded number of states |
ok | the resulting status (true if the stream reading is ok and data are filled in, false otherwise) |
The first line of an AUT file has the following syntax: des (<initial-state>, <number-of-transitions>, <number-of-states>) The "des" keywords stands for "descriptor". The <number-of-states> must be greater or equal to 1, because there is always at least one state, the initial state. State numbers range between 0 and <number-of-states> - 1. The <initial-state> is always equal to 0.
Definition at line 794 of file AutFileDescriptor.hh.
|
inlineprivate |
beforeFirstComma | string like this: '(source' |
source | the resulting source state |
Definition at line 619 of file AutFileDescriptor.hh.
|
inlineprivate |
afterLastComma | string like this: 'target)' |
target | the resulting target state |
Definition at line 674 of file AutFileDescriptor.hh.
|
inlineprivate |
stream | the input stream that should contain a line like this '(source,label,target)' |
source | the resulting source |
label | the resulting label |
target | the resulting target |
ok | true if the parsing is successful |
Definition at line 723 of file AutFileDescriptor.hh.
|
inlineprivate |
betweenFirstAndLastComma | string like this: 'label' |
label | the resulting label |
Definition at line 604 of file AutFileDescriptor.hh.
|
inlinevirtual |
Clear the descriptor
Reimplemented in Diades::Automata::Experimental::DdAutFileDescriptor.
Definition at line 536 of file AutFileDescriptor.hh.
|
inline |
Clear the initial state
Definition at line 589 of file AutFileDescriptor.hh.
|
inline |
Definition at line 548 of file AutFileDescriptor.hh.
|
inline |
Definition at line 558 of file AutFileDescriptor.hh.
|
inline |
Definition at line 580 of file AutFileDescriptor.hh.
|
inline |
Definition at line 455 of file AutFileDescriptor.hh.
|
inline |
Definition at line 476 of file AutFileDescriptor.hh.
|
default |
|
default |
|
inlinevirtual |
stream | input stream Reads the stream to fill the AutFileDescriptor If the AutFileDescriptor was already filled, it is cleared first |
Reimplemented in Diades::Automata::Experimental::DdAutFileDescriptor.
Definition at line 377 of file AutFileDescriptor.hh.
|
inline |
Remove a transition
transition | to remove |
Definition at line 521 of file AutFileDescriptor.hh.
|
inline |
s | a State |
Definition at line 570 of file AutFileDescriptor.hh.
|
inline |
nbStates | the number of states |
Definition at line 466 of file AutFileDescriptor.hh.
|
inlinevirtual |
stream | output stream Write the content of the AutFileDescriptor in the output stream |
Reimplemented in Diades::Automata::Experimental::DdAutFileDescriptor.
Definition at line 425 of file AutFileDescriptor.hh.
|
inline |
Definition at line 486 of file AutFileDescriptor.hh.
|
inline |
Definition at line 496 of file AutFileDescriptor.hh.
|
private |
Definition at line 328 of file AutFileDescriptor.hh.
|
private |
Definition at line 326 of file AutFileDescriptor.hh.
|
private |
Definition at line 327 of file AutFileDescriptor.hh.