Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm-cli.cpp
Go to the documentation of this file.
1
16
18 // Parse symbolic input (PRISM, JANI, properties, etc.)
20
21 // Obtain settings for model processing
23
24 // Preprocess the symbolic input
25 std::tie(symbolicInput, mpi) = storm::cli::preprocessSymbolicInput(symbolicInput);
26
28 "The model checking query does not seem to be supported for the selected engine. Storm will try to solve the query, but you will most "
29 "likely get an error for at least one of the provided properties.");
30
31 // Export symbolic input (if requested)
33
34 storm::cli::processInput(symbolicInput, mpi);
35}
36
37void initSettings(std::string const& name, std::string const& executableName) {
38 storm::settings::initializeAll(name, executableName);
39 storm::settings::addModule<storm::settings::modules::CounterexampleGeneratorSettings>();
40}
41
45int main(const int argc, const char** argv) {
46 try {
47 return storm::cli::process("Storm", "storm", initSettings, processOptions, argc, argv);
48 } catch (storm::exceptions::BaseException const& exception) {
49 STORM_LOG_ERROR("An exception caused Storm to terminate. The message of the exception is: " << exception.what());
50 return 1;
51 } catch (std::exception const& exception) {
52 STORM_LOG_ERROR("An unexpected exception occurred and caused Storm to terminate. The message of this exception is: " << exception.what());
53 return 2;
54 }
55}
This class represents the base class of all exception classes.
virtual const char * what() const noexcept override
Retrieves the message associated with this exception.
#define STORM_LOG_ERROR(message)
Definition logging.h:26
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:38
void exportSymbolicInput(SymbolicInput const &input)
SymbolicInput parseSymbolicInput()
int process(std::string const &name, std::string const &executableName, std::function< void(std::string const &, std::string const &)> initSettingsFunc, std::function< void(void)> processOptionsFunc, const int argc, const char **argv)
Processes the options and returns the exit code.
Definition cli.cpp:84
std::pair< SymbolicInput, ModelProcessingInformation > preprocessSymbolicInput(SymbolicInput const &input)
void processInput(SymbolicInput const &input, ModelProcessingInformation const &mpi)
void initializeAll(std::string const &name, std::string const &executableName)
Initialize the settings manager with all available modules.
void processOptions()
Definition storm-cli.cpp:17
int main(const int argc, const char **argv)
Main entry point of the executable storm.
Definition storm-cli.cpp:45
void initSettings(std::string const &name, std::string const &executableName)
Definition storm-cli.cpp:37