|
@ -516,7 +516,7 @@ namespace storm { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void JsonExporter::toFile(storm::jani::Model const& janiModel, std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas, std::string const& filepath, bool checkValid) { |
|
|
|
|
|
|
|
|
void JsonExporter::toFile(storm::jani::Model const& janiModel, std::vector<storm::jani::Property> const& formulas, std::string const& filepath, bool checkValid) { |
|
|
std::ofstream ofs; |
|
|
std::ofstream ofs; |
|
|
ofs.open (filepath, std::ofstream::out ); |
|
|
ofs.open (filepath, std::ofstream::out ); |
|
|
if(ofs.is_open()) { |
|
|
if(ofs.is_open()) { |
|
@ -526,7 +526,7 @@ namespace storm { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void JsonExporter::toStream(storm::jani::Model const& janiModel, std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas, std::ostream& os, bool checkValid) { |
|
|
|
|
|
|
|
|
void JsonExporter::toStream(storm::jani::Model const& janiModel, std::vector<storm::jani::Property> const& formulas, std::ostream& os, bool checkValid) { |
|
|
if(checkValid) { |
|
|
if(checkValid) { |
|
|
janiModel.checkValid(); |
|
|
janiModel.checkValid(); |
|
|
} |
|
|
} |
|
@ -759,13 +759,13 @@ namespace storm { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void JsonExporter::convertProperties( std::vector<std::shared_ptr<storm::logic::Formula const>> const& formulas, storm::jani::Model const& model) { |
|
|
|
|
|
|
|
|
void JsonExporter::convertProperties( std::vector<storm::jani::Property> const& formulas, storm::jani::Model const& model) { |
|
|
std::vector<modernjson::json> properties; |
|
|
std::vector<modernjson::json> properties; |
|
|
uint64_t index = 0; |
|
|
uint64_t index = 0; |
|
|
for(auto const& f : formulas) { |
|
|
for(auto const& f : formulas) { |
|
|
modernjson::json propDecl; |
|
|
modernjson::json propDecl; |
|
|
propDecl["name"] = "prop" + std::to_string(index); |
|
|
|
|
|
propDecl["expression"] = convertFilterExpression(storm::jani::FilterExpression(f), model); |
|
|
|
|
|
|
|
|
propDecl["name"] = f.getName(); |
|
|
|
|
|
propDecl["expression"] = convertFilterExpression(f.getFilter(), model); |
|
|
++index; |
|
|
++index; |
|
|
properties.push_back(propDecl); |
|
|
properties.push_back(propDecl); |
|
|
} |
|
|
} |
|
|