19 if (propertyFilter ==
"all") {
23 std::set<std::string> propertyNameSet(propertyNames.begin(), propertyNames.end());
24 return propertyNameSet;
28 boost::optional<std::set<std::string>>
const& propertyFilter) {
30 std::vector<storm::jani::Property> properties;
32 STORM_LOG_INFO(
"Loading properties from file: " << inputString <<
'\n');
37 if (inputString.find(
".prop") != std::string::npos || inputString.find(
".pctl") != std::string::npos ||
38 inputString.find(
".prctl") != std::string::npos || inputString.find(
".csl") != std::string::npos) {
39 STORM_LOG_WARN(
"File with name '" << inputString <<
"' does not exist. Trying to parse as property string.");
47std::vector<storm::jani::Property>
parseProperties(std::string
const& inputString, boost::optional<std::set<std::string>>
const& propertyFilter) {
48 auto exprManager = std::make_shared<storm::expressions::ExpressionManager>();
52 }
catch (storm::exceptions::WrongFormatException
const& e) {
54 e.what() <<
"Note that the used API function does not have access to model variables. If the property you tried to parse contains "
55 "model variables, it will not be parsed correctly.");
60 boost::optional<std::set<std::string>>
const& propertyFilter) {
62 auto formulas =
parseProperties(formulaParser, inputString, propertyFilter);
70 boost::optional<std::set<std::string>>
const& propertyFilter) {
72 auto formulas =
parseProperties(formulaParser, inputString, propertyFilter);
78 boost::optional<std::set<std::string>>
const& propertyFilter) {
79 std::vector<storm::jani::Property> result;
std::shared_ptr< ExpressionManager > getSharedPointer()
Retrieves a shared pointer to the expression manager.
storm::expressions::ExpressionManager & getManager() const
Retrieves the expression manager responsible for the expressions in the model.
std::map< storm::expressions::Variable, storm::expressions::Expression > getConstantsSubstitution() const
Retrieves a mapping from expression variables associated with defined constants of the model to their...
std::shared_ptr< Formula > eliminateRewardAccumulations(Formula const &f) const
Eliminates any reward accumulations of the formula, where the presence of the reward accumulation doe...
std::map< storm::expressions::Variable, storm::expressions::Expression > getConstantsFormulasSubstitution(bool getConstantsSubstitution=true, bool getFormulasSubstitution=true) const
Retrieves a mapping of all defined constants and formula variables to their defining expressions.
storm::prism::Program const & asPrismProgram() const
bool isPrismProgram() const
storm::jani::Model const & asJaniModel() const
#define STORM_LOG_INFO(message)
#define STORM_LOG_WARN(message)
#define STORM_LOG_ASSERT(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
std::vector< storm::jani::Property > parsePropertiesForPrismProgram(std::string const &inputString, storm::prism::Program const &program, boost::optional< std::set< std::string > > const &propertyFilter)
std::pair< storm::jani::Model, std::vector< storm::jani::Property > > filterProperties(std::pair< storm::jani::Model, std::vector< storm::jani::Property > > &modelAndFormulae, boost::optional< std::vector< std::string > > const &propertyFilter)
std::vector< storm::jani::Property > parseProperties(storm::parser::FormulaParser &formulaParser, std::string const &inputString, boost::optional< std::set< std::string > > const &propertyFilter)
std::vector< storm::jani::Property > parsePropertiesForJaniModel(std::string const &inputString, storm::jani::Model const &model, boost::optional< std::set< std::string > > const &propertyFilter)
std::vector< storm::jani::Property > parsePropertiesForSymbolicModelDescription(std::string const &inputString, storm::storage::SymbolicModelDescription const &modelDescription, boost::optional< std::set< std::string > > const &propertyFilter)
boost::optional< std::set< std::string > > parsePropertyFilter(std::string const &propertyFilter)
std::vector< storm::jani::Property > substituteConstantsInProperties(std::vector< storm::jani::Property > const &properties, std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution)
bool fileExistsAndIsReadable(std::string const &filename)
Tests whether the given file exists and is readable.
std::vector< std::string > parseCommaSeparatedStrings(std::string const &input)