Storm 1.10.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm-cli.cpp
Go to the documentation of this file.
1
11
14
16 // Parse symbolic input (PRISM, JANI, properties, etc.)
18
19 // Obtain settings for model processing
21
22 // Preprocess the symbolic input
23 std::tie(symbolicInput, mpi) = storm::cli::preprocessSymbolicInput(symbolicInput);
24
26 "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 "
27 "likely get an error for at least one of the provided properties.");
28
29 // Export symbolic input (if requested)
31
32 storm::cli::processInput(symbolicInput, mpi);
33}
34
35void initSettings(std::string const& name, std::string const& executableName) {
36 storm::settings::initializeAll(name, executableName);
37 storm::settings::addModule<storm::settings::modules::CounterexampleGeneratorSettings>();
38}
39
43int main(const int argc, const char** argv) {
44 try {
45 return storm::cli::process("Storm", "storm", initSettings, processOptions, argc, argv);
46 } catch (storm::exceptions::BaseException const& exception) {
47 STORM_LOG_ERROR("An exception caused Storm to terminate. The message of the exception is: " << exception.what());
48 return 1;
49 } catch (std::exception const& exception) {
50 STORM_LOG_ERROR("An unexpected exception occurred and caused Storm to terminate. The message of this exception is: " << exception.what());
51 return 2;
52 }
53}
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:15
int main(const int argc, const char **argv)
Main entry point of the executable storm.
Definition storm-cli.cpp:43
void initSettings(std::string const &name, std::string const &executableName)
Definition storm-cli.cpp:35