27 std::pair<
storm::jani::Model, std::vector<storm::jani::Property>>& modelAndFormulae, boost::optional<std::vector<std::string>>
const& propertyFilter) {
29 if (propertyFilter.is_initialized()) {
30 std::vector<storm::jani::Property> newProperties;
32 for (
auto const& propName : propertyFilter.get()) {
34 for (
auto const& property : modelAndFormulae.second) {
35 if (property.getName() == propName) {
36 newProperties.push_back(std::move(property));
43 modelAndFormulae.second = std::move(newProperties);
45 modelAndFormulae.first.checkValid();
46 return modelAndFormulae;
49std::pair<storm::jani::Model, std::vector<storm::jani::Property>>
parseJaniModel(std::string
const& filename,
50 boost::optional<std::vector<std::string>>
const& propertyFilter) {
51 bool parseProperties = !propertyFilter.is_initialized() || !propertyFilter.get().empty();
55 return modelAndFormulae;
59 boost::optional<std::vector<std::string>>
const& propertyFilter) {
60 bool parseProperties = !propertyFilter.is_initialized() || !propertyFilter.get().empty();
64 return modelAndFormulae;
67std::pair<storm::jani::Model, std::vector<storm::jani::Property>>
parseJaniModel(std::string
const& filename,
69 boost::optional<std::vector<std::string>>
const& propertyFilter) {
71 simplifyJaniModel(modelAndFormulae.first, modelAndFormulae.second, supportedFeatures);
72 return modelAndFormulae;
77 boost::optional<std::vector<std::string>>
const& propertyFilter) {
79 simplifyJaniModel(modelAndFormulae.first, modelAndFormulae.second, supportedFeatures);
80 return modelAndFormulae;
85 STORM_LOG_THROW(nonEliminatedFeatures.empty(), storm::exceptions::NotSupportedException,
86 "The used model feature(s) " << nonEliminatedFeatures.toString() <<
" is/are not in the list of supported features.");
ModelFeatures restrictToFeatures(ModelFeatures const &modelFeatures)
Attempts to eliminate all features of this model that are not in the given set of features.
static std::pair< storm::jani::Model, std::vector< storm::jani::Property > > parseFromString(std::string const &jsonstring, bool parseProperties=true)
static std::pair< storm::jani::Model, std::vector< storm::jani::Property > > parse(std::string const &path, bool parseProperties=true)
static storm::prism::Program parse(std::string const &filename, bool prismCompatability=false)
Parses the given file into the PRISM storage classes assuming it complies with the PRISM syntax.
void checkValidity(Program::ValidityCheckLevel lvl=Program::ValidityCheckLevel::READYFORPROCESSING) const
Checks the validity of the program.
Program simplify()
Entry point for static analysis for simplify.
#define STORM_LOG_ERROR_COND(cond, message)
#define STORM_LOG_THROW(cond, exception, message)
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)
storm::prism::Program parseProgram(std::string const &filename, bool prismCompatibility, bool simplify)
std::pair< storm::jani::Model, std::vector< storm::jani::Property > > parseJaniModel(std::string const &filename, 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)
void simplifyJaniModel(storm::jani::Model &model, std::vector< storm::jani::Property > &properties, storm::jani::ModelFeatures const &supportedFeatures)
std::pair< storm::jani::Model, std::vector< storm::jani::Property > > parseJaniModelFromString(std::string const &jsonstring, boost::optional< std::vector< 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)