Storm
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#ifdef STORM_HAVE_CARL
33 switch (mpi.verificationValueType) {
35 storm::cli::processInputWithValueType<storm::RationalFunction>(symbolicInput, mpi);
36 break;
38 storm::cli::processInputWithValueType<storm::RationalNumber>(symbolicInput, mpi);
39 break;
41 storm::cli::processInputWithValueType<double>(symbolicInput, mpi);
42 break;
43 }
44#else
46 "No exact numbers or parameters are supported in this build.");
47 storm::cli::processInputWithValueType<double>(symbolicInput, mpi);
48#endif
49}
50
51void initSettings(std::string const& name, std::string const& executableName) {
52 storm::settings::initializeAll(name, executableName);
54}
55
59int main(const int argc, const char** argv) {
60 try {
61 return storm::cli::process("Storm", "storm", initSettings, processOptions, argc, argv);
62 } catch (storm::exceptions::BaseException const& exception) {
63 STORM_LOG_ERROR("An exception caused Storm to terminate. The message of the exception is: " << exception.what());
64 return 1;
65 } catch (std::exception const& exception) {
66 STORM_LOG_ERROR("An unexpected exception occurred and caused Storm to terminate. The message of this exception is: " << exception.what());
67 return 2;
68 }
69}
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:31
#define STORM_LOG_WARN_COND(cond, message)
Definition macros.h:38
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
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:81
std::pair< SymbolicInput, ModelProcessingInformation > preprocessSymbolicInput(SymbolicInput const &input)
SettingsType const & getModule()
Get module.
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:59
void initSettings(std::string const &name, std::string const &executableName)
Definition storm-cli.cpp:51