DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <DdAutFileDescriptor.hh>
Protected Member Functions | |
bool | readDdAutExtensions (std::istream &stream) |
DdAutExtensions | readEventExtension (std::istream &stream) |
DdAutExtensions | readAcceptorExtension (std::istream &stream) |
DdAutExtensions | readInitialExtension (std::istream &stream, bool &firstInitialExtension) |
DdAutExtensions | readStateExtension (std::istream &stream) |
DdAutExtensions | readNameExtension (std::istream &stream) |
DdAutExtensions | readIdExtension (std::istream &stream) |
DdAutExtensions | readExtensionField (std::istream &stream, std::string &other) |
Private Attributes | |
size_t | _id |
std::string | _name |
std::set< State > | _acceptors |
std::map< State, DetailedState > | _states |
std::map< Event, DetailedEvent > | _events |
std::unordered_map< std::string, DdAutExtensions > | _extensionMapping |
This class records as an object all the pieces of information that is contained in a '.ddaut' file
about
the ddaut file format: it starts as a aut fileThe 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).
About
the ddaut extensions: the idea is to start from the aut format and add new fields of information: for now state, event, initial, acceptor None of this field is mandatory. There is no order. They may be several occurrence of the same field. Be as flexible as possible. None of the information in the fields has to be complete.
About
state: it is a couple consisting of one <state> and one <label>, one couple per line. If the state is present several times, the last occurrence prevails About
event: it is a couple consisting of one <label> (the id of the event) and one <label> (more detailed decription of the event). If the event is present several times, the last occurrence prevails About
initial: it is a <state> per line About
acceptor: it is a <state> per line
Definition at line 76 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::AcceptorIterator = std::set< State >::iterator |
Definition at line 104 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::ConstAcceptorIterator = std::set< State >::const_iterator |
Definition at line 103 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::ConstDetailedEventIterator = std::map< Event, DetailedEvent >::const_iterator |
Definition at line 109 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::ConstDetailedStateIterator = std::map< State, DetailedState >::const_iterator |
Definition at line 107 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::ConstInitialIterator = std::set< State >::const_iterator |
Definition at line 105 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::DetailedEvent = std::string |
Definition at line 80 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::DetailedEventIterator = std::map< Event, DetailedEvent >::iterator |
Definition at line 110 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::DetailedState = std::string |
Definition at line 79 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::DetailedStateIterator = std::map< State, DetailedState >::iterator |
Definition at line 108 of file DdAutFileDescriptor.hh.
using Diades::Automata::Experimental::DdAutFileDescriptor::InitialIterator = std::set< State >::iterator |
Definition at line 106 of file DdAutFileDescriptor.hh.
Enumerator | |
---|---|
Invalid | |
Empty | |
State | |
Event | |
Other | |
Initial | |
Acceptor | |
Name | |
Id |
Definition at line 82 of file DdAutFileDescriptor.hh.
|
default |
Default constructor
|
default |
Copy constructor (default)
other |
|
default |
Move constructor (default)
other |
|
virtualdefault |
Destructor
ConstAcceptorIterator Diades::Automata::Experimental::DdAutFileDescriptor::acceptorBegin | ( | ) | const |
Referenced by completeDdaut(), determineDdaut(), explainFsm(), minimizeDdaut(), and projectDdaut().
ConstAcceptorIterator Diades::Automata::Experimental::DdAutFileDescriptor::acceptorEnd | ( | ) | const |
Referenced by completeDdaut(), determineDdaut(), explainFsm(), minimizeDdaut(), and projectDdaut().
|
virtual |
Clear the descriptor
Reimplemented from Diades::Automata::Experimental::AutFileDescriptor< DdAutEventId >.
ConstDetailedEventIterator Diades::Automata::Experimental::DdAutFileDescriptor::eventBegin | ( | ) | const |
ConstDetailedEventIterator Diades::Automata::Experimental::DdAutFileDescriptor::eventEnd | ( | ) | const |
size_t Diades::Automata::Experimental::DdAutFileDescriptor::id | ( | ) | const |
const string& Diades::Automata::Experimental::DdAutFileDescriptor::name | ( | ) | const |
|
default |
Assignement (default)
other |
|
default |
Move assignement (default)
other |
|
protected |
stream | input stream |
|
protected |
stream | input stream |
|
protected |
stream | input stream |
|
protected |
stream | input stream |
other | return unknown keyword |
|
protected |
stream | input stream |
|
protected |
stream | input stream |
firstInitialExtension | true if it is the first 'initial' extension met when reading the stream |
|
protected |
stream | input stream |
|
protected |
stream | input stream |
|
virtual |
stream | input stream Reads the stream to fill the DdAutFileDescriptor If the DdAutFileDescriptor was already filled, it is cleared first |
Reimplemented from Diades::Automata::Experimental::AutFileDescriptor< DdAutEventId >.
Referenced by completeDdaut(), determineDdaut(), explainFsm(), exportDdAutToDot(), Diades::CmdInterface::loadFiniteStateAutomaton(), Diades::CmdInterface::loadFiniteStateMachine(), minimizeDdaut(), projectDdaut(), runDdaut(), tagDdAutStates2(), and trimDdAutStates2().
std::pair<AcceptorIterator, bool> Diades::Automata::Experimental::DdAutFileDescriptor::setAcceptor | ( | State | s | ) |
s | a State |
std::pair<DetailedEventIterator, bool> Diades::Automata::Experimental::DdAutFileDescriptor::setEvent | ( | const Event & | e, |
const DetailedEvent & | detail | ||
) |
e | an Event |
detail | a DetailedEvent |
size_t Diades::Automata::Experimental::DdAutFileDescriptor::setId | ( | size_t | id | ) |
id | the new id (0 is the default) |
const string& Diades::Automata::Experimental::DdAutFileDescriptor::setName | ( | const string & | name | ) |
name | the new name |
std::pair<DetailedStateIterator, bool> Diades::Automata::Experimental::DdAutFileDescriptor::setState | ( | State | s, |
const DetailedState & | detail | ||
) |
s | a State |
detail | the detailed piece of information about the state s |
ConstDetailedStateIterator Diades::Automata::Experimental::DdAutFileDescriptor::stateBegin | ( | ) | const |
ConstDetailedStateIterator Diades::Automata::Experimental::DdAutFileDescriptor::stateEnd | ( | ) | const |
|
virtual |
stream | output stream Write the content of the DdAutFileDescriptor in the output stream |
Reimplemented from Diades::Automata::Experimental::AutFileDescriptor< DdAutEventId >.
|
private |
Definition at line 90 of file DdAutFileDescriptor.hh.
|
private |
Definition at line 92 of file DdAutFileDescriptor.hh.
|
private |
Definition at line 93 of file DdAutFileDescriptor.hh.
|
private |
Definition at line 88 of file DdAutFileDescriptor.hh.
|
private |
Definition at line 89 of file DdAutFileDescriptor.hh.
|
private |
Definition at line 91 of file DdAutFileDescriptor.hh.