DiaDes
0.1
DIAgnosis of Discrete-Event System
|
This file implements the dd-synchronize command that is used to perform any kind of automata synchronization. More...
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <regex>
#include <boost/program_options.hpp>
#include <diades/automata/experimental/AutFile.hh>
#include <diades/automata/experimental/DdAutFile.hh>
#include <diades/automata/experimental/Printer.hh>
#include <diades/automata/experimental/StateMachine.hh>
#include <diades/automata/experimental/Synchronize.hh>
#include "../AutomataInterface.hh"
#include "diades/automata/experimental/DdAutFileDescriptor.hh"
#include <diades/automata/experimental/DdSyncDescriptor.hh>
Go to the source code of this file.
Functions | |
const string | program ("dd-synchronize") |
void | initialiseOptions (int argc, char *argv[], Poptions::options_description &desc, Poptions::variables_map &vm) |
size_t | synchroniseDdAut (const std::vector< std::string > &fileNames, const std::string &rulesName, const std::string &output) |
size_t | synchroniseFsm (const std::vector< std::string > &fileNames, const std::string &rulesName, const std::string &output) |
int | main (int argc, char **argv) |
Variables | |
FileSuffixes | suffixes ({"ddaut", "ddsync"}) |
This file implements the dd-synchronize command that is used to perform any kind of automata synchronization.
Definition in file Synchronize.cc.
void initialiseOptions | ( | int | argc, |
char * | argv[], | ||
Poptions::options_description & | desc, | ||
Poptions::variables_map & | vm | ||
) |
Initialise the options of the command present in the command line
argc | |
argv | |
desc | |
vm |
Definition at line 55 of file Synchronize.cc.
References options().
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Main file of the dd-determine command
argc | |
argv |
Definition at line 242 of file Synchronize.cc.
References initialiseOptions(), Diades::CmdInterface::printCommandLineError(), printUsage(), program(), and synchroniseFsm().
const string program | ( | "dd-synchronize" | ) |
Referenced by main().
size_t synchroniseDdAut | ( | const std::vector< std::string > & | fileNames, |
const std::string & | rulesName, | ||
const std::string & | output | ||
) |
Load the files (ddaut files) and performs the synchronisation based on the rules in the rulesFile
fileNames | the aut files to load |
rulesName | the file containing the synchronisation rules |
output | the file to write (if empty, write on the standard output) |
Definition at line 87 of file Synchronize.cc.
References Diades::Automata::Experimental::descriptorToRules(), Diades::Automata::Experimental::faFromDdAutFile(), Diades::Automata::Experimental::generateSynchronisedDdAutEventLabels(), Diades::CmdInterface::printCommandLineError(), Diades::Automata::Experimental::DdSyncDescriptor::readStream(), Diades::Automata::Experimental::StateMachine< _StatePropertyId, _EventPropertyId, _NullStatePropertyId, _NullEventPropertyId >::setName(), suffixes, Diades::Automata::Experimental::synchronize(), and Diades::CmdInterface::writeFiniteAutomaton().
Referenced by synchroniseFsm().
size_t synchroniseFsm | ( | const std::vector< std::string > & | fileNames, |
const std::string & | rulesName, | ||
const std::string & | output | ||
) |
Load the files (aut/ddaut files) and performs the synchronisation based on the rules in the rulesFile
fileNames | the aut/ddaut files to load |
rulesName | the file containing the synchronisation rules |
output | the file to write (if empty, write on the standard output) |
Definition at line 194 of file Synchronize.cc.
References ERROR_UNHANDLED_EXCEPTION, Diades::CmdInterface::FileSuffixes::match(), Diades::CmdInterface::printCommandLineError(), suffixes, synchroniseDdAut(), and toStream().
Referenced by main().
FileSuffixes suffixes({"ddaut", "ddsync"}) |
Referenced by synchroniseDdAut(), and synchroniseFsm().