|
|
@ -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; |
|
|
|
ofs.open (filepath, std::ofstream::out ); |
|
|
|
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) { |
|
|
|
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; |
|
|
|
uint64_t index = 0; |
|
|
|
for(auto const& f : formulas) { |
|
|
|
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; |
|
|
|
properties.push_back(propDecl); |
|
|
|
} |
|
|
|