DiaDes
0.1
DIAgnosis of Discrete-Event System
|
Classes | |
class | FileSuffixes |
Typedefs | |
using | Msg = Diades::Utils::Msg |
Functions | |
size_t | loadFiniteStateMachine (const std::string &input, const Diades::Automata::Experimental::ManagedDdAutFsm &mfsm) |
Load the fsm from a file called 'input'. More... | |
size_t | loadFiniteStateAutomaton (const std::string &input, const Diades::Automata::Experimental::ManagedDdAutFA &mfa) |
Load the finite automaton from a file called 'input'. More... | |
size_t | writeAut (const Diades::Automata::Experimental::AutFsm &fsm, const std::string &output, const FileSuffixes &suffixes) |
size_t | writeFiniteStateMachine (const Diades::Automata::Experimental::ConstManagedDdAutFsm &mfsm, const std::string &output, const FileSuffixes &suffixes) |
size_t | writeFiniteAutomaton (const Diades::Automata::Experimental::ConstManagedDdAutFA &mfa, const std::string &output, const FileSuffixes &suffixes) |
size_t | checkFileNameSuffix (const std::string &filename, const std::string &suffix) |
check that filename has the expected suffix More... | |
size_t | checkDdAutFileName (const std::string &filename) |
check that filename is a proper file with the ddaut suffix More... | |
size_t | isOpenableFile (const std::string &filename) |
check that the file can be opened More... | |
size_t | checkDdAutFile (const std::string &filename) |
check that filename is a proper file with the ddaut suffix check that the file 'filename' can be opened and is readable and check that this file is well suffixed with '.ddaut'. Do not check the content of the file More... | |
size_t | checkAutFile (const std::string &filename) |
check that filename is a proper file with the aut suffix More... | |
size_t | checkAutFileName (const std::string &filename) |
check that filename is a proper filename with the aut suffix More... | |
size_t | printUsage (const string &programName, Poptions::options_description &desc) |
size_t | printUsage (const string &description) |
size_t | printCommandLineError (const string &msg) |
size_t | printCommandLineWarning (const string &msg) |
bool | fileSuffixOk (const string &modelFile, const string &suffix) |
string | getSuffix (const string &name) |
size_t | printUsage (const string &programName, boost::program_options::options_description &desc) |
size_t | printCommandLineError (const Diades::Utils::Msg &msg) |
size_t | printCommandLineWarning (const Diades::Utils::Msg &msg) |
template<typename Option > | |
bool | getOption (const string ¶meter, const vector< string > &options, Option &result) |
template<typename T > | |
void | getParameter (int argc, char **argv, int &index, T ¶m) |
template<typename T > | |
void | getParameterList (int argc, char **argv, const vector< string > &options, const vector< string > &fileExtensions, int &index, set< T > &records) |
using Diades::CmdInterface::Msg = typedef Diades::Utils::Msg |
Definition at line 19 of file AutomataInterface.cc.
size_t Diades::CmdInterface::checkAutFile | ( | const std::string & | filename | ) |
check that filename is a proper file with the aut suffix
check that the file 'filename' can be opened and is readable and check that this file is well suffixed with '.aut'. Do not check the content of the file
filename | the name to check |
Definition at line 410 of file AutomataInterface.cc.
References checkAutFileName(), isOpenableFile(), and SUCCESS.
size_t Diades::CmdInterface::checkAutFileName | ( | const std::string & | filename | ) |
check that filename is a proper filename with the aut suffix
check that the file 'filename' is well suffixed with '.aut'. Do not check the content of the file
filename | the name to check |
Definition at line 433 of file AutomataInterface.cc.
References checkFileNameSuffix().
Referenced by checkAutFile().
size_t Diades::CmdInterface::checkDdAutFile | ( | const std::string & | filename | ) |
check that filename is a proper file with the ddaut suffix check that the file 'filename' can be opened and is readable and check that this file is well suffixed with '.ddaut'. Do not check the content of the file
check that filename is a proper file with the ddaut suffix
filename | the name to check |
check that the file 'filename' can be opened and is readable and check that this file is well suffixed with '.ddaut'. Do not check the content of the file
filename | the name to check |
Definition at line 386 of file AutomataInterface.cc.
References checkDdAutFileName(), isOpenableFile(), and SUCCESS.
Referenced by main().
size_t Diades::CmdInterface::checkDdAutFileName | ( | const std::string & | filename | ) |
check that filename is a proper file with the ddaut suffix
check that filename is a proper filename with the ddaut suffix
check that the file 'filename' can be opened and is readable and check that this file is well suffixed with '.ddaut'. Do not check the content of the file
filename | the name to check |
check that the file 'filename' is well suffixed with '.ddaut'. Do not check the content of the file
filename | the name to check |
Definition at line 348 of file AutomataInterface.cc.
References checkFileNameSuffix().
Referenced by checkDdAutFile().
size_t Diades::CmdInterface::checkFileNameSuffix | ( | const std::string & | filename, |
const std::string & | suffix | ||
) |
check that filename has the expected suffix
check that filename has the expected suffix, suffix must not contain '.' characters
[in] | filename | the name to check |
[in] | suffix | expected suffix (no '.' character in suffix) |
Definition at line 313 of file AutomataInterface.cc.
References printCommandLineError(), and SUCCESS.
Referenced by checkAutFileName(), and checkDdAutFileName().
bool Diades::CmdInterface::fileSuffixOk | ( | const string & | modelFile, |
const string & | suffix | ||
) |
modelFile | the name of a file |
suffix | a suffix |
Definition at line 128 of file CmdInterface.cc.
References Diades::Utils::getFileExtension().
Referenced by checkDescompFile(), main(), and printCommandLineWarning().
bool Diades::CmdInterface::getOption | ( | const string & | parameter, |
const vector< string > & | options, | ||
Option & | result | ||
) |
Get the current option
parameter | the parameter to analyse |
options | the set of available options |
result | the return option |
Definition at line 171 of file CmdInterface.hh.
void Diades::CmdInterface::getParameter | ( | int | argc, |
char ** | argv, | ||
int & | index, | ||
T & | param | ||
) |
argc | the number of available parameters |
argv | the list of available parameters |
index | the index of the current parameter, index is set to index + 1 at the end of this call |
param | the interpreted version of the current parameter as a type T |
This function aborts the program if something wrong.
Definition at line 202 of file CmdInterface.hh.
References printCommandLineError().
void Diades::CmdInterface::getParameterList | ( | int | argc, |
char ** | argv, | ||
const vector< string > & | options, | ||
const vector< string > & | fileExtensions, | ||
int & | index, | ||
set< T > & | records | ||
) |
argc | the number of available parameters |
argv | the list of available parameters |
options | the set of availble options for this command |
fileExtensions | the set of file extensions involved in this command. |
index | the index of the current parameter, index is set to (end of the list) + 1 at the end of this call |
records | the set of recorded parameters from index to the end of the list. |
This function aborts the program if something wrong.
Definition at line 241 of file CmdInterface.hh.
References Diades::Utils::getFileExtension().
string Diades::CmdInterface::getSuffix | ( | const string & | name | ) |
get the suffix of the filename
name | a filename |
Definition at line 145 of file CmdInterface.cc.
Referenced by printCommandLineWarning().
size_t Diades::CmdInterface::isOpenableFile | ( | const std::string & | filename | ) |
check that the file can be opened
attempt to open the file, SUCCESS if the file can be opened
filename | name of the file to check |
Definition at line 362 of file AutomataInterface.cc.
References printCommandLineError(), and SUCCESS.
Referenced by checkAutFile(), checkDdAutFile(), and main().
size_t Diades::CmdInterface::loadFiniteStateAutomaton | ( | const std::string & | input, |
const Diades::Automata::Experimental::ManagedDdAutFA & | mfa | ||
) |
Load the finite automaton from a file called 'input'.
Load a ddaut file and initialise a DdAutFA. To only load a DdAutFsm
input | filename of the file to load |
mfa | the loaded finite state machine |
Definition at line 65 of file AutomataInterface.cc.
References Diades::Automata::Experimental::ManagedDdAutFA::eMgr, Diades::Automata::Experimental::ManagedDdAutFA::fa, Diades::Automata::Experimental::faFromDescriptor(), printCommandLineError(), Diades::Automata::Experimental::DdAutFileDescriptor::readStream(), Diades::Automata::Experimental::ManagedDdAutFA::sMgr, and SUCCESS.
size_t Diades::CmdInterface::loadFiniteStateMachine | ( | const std::string & | input, |
const Diades::Automata::Experimental::ManagedDdAutFsm & | mfsm | ||
) |
Load the fsm from a file called 'input'.
Load a ddaut file and initialise a DdAutFsm. If the file contains acceptor states it is ignored
input | filename of the file to load |
mfsm | the loaded finite state machine |
Definition at line 32 of file AutomataInterface.cc.
References Diades::Automata::Experimental::ManagedDdAutFsm::eMgr, Diades::Automata::Experimental::ManagedDdAutFsm::fsm, Diades::Automata::Experimental::fsmFromDescriptor(), printCommandLineError(), Diades::Automata::Experimental::DdAutFileDescriptor::readStream(), Diades::Automata::Experimental::ManagedDdAutFsm::sMgr, and SUCCESS.
Referenced by prepareSimulation().
size_t Diades::CmdInterface::printCommandLineError | ( | const string & | msg | ) |
Print out on the standard output the description of an error.
description | the description of the error message |
Definition at line 98 of file CmdInterface.cc.
References ERROR_IN_COMMAND_LINE.
Referenced by checkFileNameSuffix(), completeAut(), completeDdaut(), completeFsm(), determineAut(), determineDdaut(), determineFsm(), explainFsm(), exportAutToDot(), exportDdAutToDot(), exportDdSyncToDot(), exportToDot(), exportTsToDdAut(), exportTsToDdAut2(), getParameter(), insertAuts(), insertDdAuts(), insertFsms(), isOpenableFile(), loadFiniteStateAutomaton(), loadFiniteStateMachine(), main(), minimizeAut(), minimizeDdaut(), minimizeFsm(), printCommandLineError(), projectAut(), projectDdaut(), projectFsm(), readControllableEvents(), readModels(), readParameters(), runAut(), runDdaut(), runFsm(), setOptions(), synchroniseDdAut(), synchroniseFsm(), tagDdAutStates(), tagDdAutStates2(), trimDdAutStates(), trimDdAutStates2(), writeAut(), writeDdAutComponents(), writeFiniteAutomaton(), and writeFiniteStateMachine().
|
inline |
Print out on the standard output the description of an error.
description | the description of the error message |
Definition at line 109 of file CmdInterface.hh.
References printCommandLineError(), and printCommandLineWarning().
size_t Diades::CmdInterface::printCommandLineWarning | ( | const string & | msg | ) |
Print out on the standard output the description of a warning.
description | the description of the error message |
Print out on the standard output the description of a warning.
description | the description of the error message |
Definition at line 110 of file CmdInterface.cc.
References WARNING_IN_COMMAND_LINE.
Referenced by explainFsm(), printCommandLineError(), and printCommandLineWarning().
|
inline |
Print out on the standard output the description of an error.
description | the description of the error message |
Definition at line 129 of file CmdInterface.hh.
References fileSuffixOk(), getSuffix(), and printCommandLineWarning().
size_t Diades::CmdInterface::printUsage | ( | const string & | programName, |
Poptions::options_description & | desc | ||
) |
Print out on the standard output the description of the usage of a program.
programName | the name of the program, "" if not available |
desc | the boost::program_options description |
Definition at line 73 of file CmdInterface.cc.
References SUCCESS.
size_t Diades::CmdInterface::printUsage | ( | const string & | programName, |
boost::program_options::options_description & | desc | ||
) |
Print out on the standard output the description of the usage of a program.
programName | name of the program, "" if not available |
desc | the boost::program_options description |
size_t Diades::CmdInterface::printUsage | ( | const string & | description | ) |
Print out on the standard output the description of the usage of a program.
description | the usage as a string |
Definition at line 86 of file CmdInterface.cc.
References SUCCESS.
size_t Diades::CmdInterface::writeAut | ( | const Diades::Automata::Experimental::AutFsm & | fsm, |
const std::string & | output, | ||
const FileSuffixes & | suffixes | ||
) |
Write the fsm in a file called 'output' in "aut" format
fsm | the StateMachine to save |
output | the output filename |
suffixes | to check |
Write the fsm in a file called 'output'
fsm | the StateMachine to save |
output | the output filename |
suffixes | to check |
Definition at line 102 of file AutomataInterface.cc.
References Diades::CmdInterface::FileSuffixes::match(), printCommandLineError(), SUCCESS, and Diades::Automata::Experimental::toAutFile().
Referenced by completeAut(), determineAut(), insertAuts(), minimizeAut(), and projectAut().
size_t Diades::CmdInterface::writeFiniteAutomaton | ( | const Diades::Automata::Experimental::ConstManagedDdAutFA & | mfa, |
const std::string & | output, | ||
const FileSuffixes & | suffixes | ||
) |
Write the finite automaton in a file called 'output' in "ddaut" format
fsm | the StateMachine to save |
output | the output filename |
suffixes | to check |
Definition at line 240 of file AutomataInterface.cc.
References Diades::Automata::Experimental::ConstManagedDdAutFA::eMgr, Diades::Automata::Experimental::ConstManagedDdAutFA::fa, Diades::Automata::Experimental::faToDdAutFile(), Diades::Automata::Experimental::fsmToAutFile(), Diades::CmdInterface::FileSuffixes::match(), printCommandLineError(), and SUCCESS.
Referenced by completeDdaut(), determineDdaut(), explainFsm(), insertDdAuts(), minimizeDdaut(), projectDdaut(), and synchroniseDdAut().
size_t Diades::CmdInterface::writeFiniteStateMachine | ( | const Diades::Automata::Experimental::ConstManagedDdAutFsm & | mfsm, |
const std::string & | output, | ||
const FileSuffixes & | suffixes | ||
) |
Write the fsm in a file called 'output' in "ddaut" format
fsm | the StateMachine to save |
output | the output filename |
suffixes | to check |
Definition at line 169 of file AutomataInterface.cc.
References Diades::Automata::Experimental::ConstManagedDdAutFsm::eMgr, Diades::Automata::Experimental::ConstManagedDdAutFsm::fsm, Diades::Automata::Experimental::fsmToAutFile(), Diades::Automata::Experimental::fsmToDdAutFile(), Diades::CmdInterface::FileSuffixes::match(), printCommandLineError(), and SUCCESS.
Referenced by completeDdaut(), determineDdaut(), minimizeDdaut(), and projectDdaut().