|
|
@ -995,12 +995,7 @@ namespace storm { |
|
|
|
return destDeclarations; |
|
|
|
} |
|
|
|
|
|
|
|
ExportJsonType buildEdges(std::vector<Edge> const& edges , std::map<uint64_t, std::string> const& actionNames, std::map<uint64_t, std::string> const& locationNames, std::vector<storm::jani::Constant> const& constants, VariableSet const& globalVariables, VariableSet const& localVariables, bool commentExpressions) { |
|
|
|
ExportJsonType edgeDeclarations = std::vector<ExportJsonType>(); |
|
|
|
for(auto const& edge : edges) { |
|
|
|
if (edge.getGuard().isFalse()) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
ExportJsonType buildEdge(Edge const& edge , std::map<uint64_t, std::string> const& actionNames, std::map<uint64_t, std::string> const& locationNames, std::vector<storm::jani::Constant> const& constants, VariableSet const& globalVariables, VariableSet const& localVariables, bool commentExpressions) { |
|
|
|
STORM_LOG_THROW(edge.getDestinations().size() > 0, storm::exceptions::InvalidJaniException, "An edge without destinations is not allowed."); |
|
|
|
ExportJsonType edgeEntry; |
|
|
|
edgeEntry["location"] = locationNames.at(edge.getSourceLocationIndex()); |
|
|
@ -1023,8 +1018,16 @@ namespace storm { |
|
|
|
if (!edge.getAssignments().empty()) { |
|
|
|
edgeEntry["assignments"] = buildAssignmentArray(edge.getAssignments(), constants, globalVariables, localVariables, commentExpressions); |
|
|
|
} |
|
|
|
return edgeEntry; |
|
|
|
} |
|
|
|
|
|
|
|
edgeDeclarations.push_back(std::move(edgeEntry)); |
|
|
|
ExportJsonType buildEdges(std::vector<Edge> const& edges , std::map<uint64_t, std::string> const& actionNames, std::map<uint64_t, std::string> const& locationNames, std::vector<storm::jani::Constant> const& constants, VariableSet const& globalVariables, VariableSet const& localVariables, bool commentExpressions) { |
|
|
|
ExportJsonType edgeDeclarations = std::vector<ExportJsonType>(); |
|
|
|
for(auto const& edge : edges) { |
|
|
|
if (edge.getGuard().isFalse()) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
edgeDeclarations.push_back(buildEdge(edge, actionNames, locationNames, constants, globalVariables, localVariables, commentExpressions)); |
|
|
|
} |
|
|
|
return edgeDeclarations; |
|
|
|
} |
|
|
@ -1065,6 +1068,11 @@ namespace storm { |
|
|
|
jsonStruct["system"] = CompositionJsonExporter::translate(janiModel.getSystemComposition()); |
|
|
|
} |
|
|
|
|
|
|
|
ExportJsonType JsonExporter::getEdgeAsJson(storm::jani::Model const& janiModel, uint64_t automatonIndex, uint64_t edgeIndex, bool commentExpressions) { |
|
|
|
auto const& automaton = janiModel.getAutomaton(automatonIndex); |
|
|
|
return buildEdge(automaton.getEdge(edgeIndex), janiModel.getActionIndexToNameMap(), automaton.buildIdToLocationNameMap(), janiModel.getConstants(), janiModel.getGlobalVariables(), automaton.getVariables(), commentExpressions); |
|
|
|
} |
|
|
|
|
|
|
|
std::string janiFilterTypeString(storm::modelchecker::FilterType const& ft) { |
|
|
|
switch(ft) { |
|
|
|
case storm::modelchecker::FilterType::MIN: |
|
|
|