Browse Source

Fixes for json export of choice origins and state valuations.

tempestpy_adaptions
Tim Quatmann 5 years ago
parent
commit
120ec74e3b
  1. 2
      src/storm/storage/expressions/SimpleValuation.h
  2. 2
      src/storm/storage/sparse/ChoiceOrigins.cpp
  3. 2
      src/storm/storage/sparse/JaniChoiceOrigins.cpp
  4. 2
      src/storm/storage/sparse/PrismChoiceOrigins.cpp

2
src/storm/storage/expressions/SimpleValuation.h

@ -18,7 +18,7 @@ namespace storm {
public:
friend class SimpleValuationPointerHash;
friend class SimpleValuationPointerLess;
typedef storm::json<double> Json;
typedef storm::json<storm::RationalNumber> Json;
/*!

2
src/storm/storage/sparse/ChoiceOrigins.cpp

@ -70,7 +70,7 @@ namespace storm {
typename ChoiceOrigins::Json const& ChoiceOrigins::getIdentifierAsJson(uint_fast64_t identifier) const {
STORM_LOG_ASSERT(identifier < this->getNumberOfIdentifiers(), "Invalid choice origin identifier: " << identifier);
if (identifierToJson.empty()) {
computeIdentifierInfos();
computeIdentifierJson();
}
return identifierToJson[identifier];
}

2
src/storm/storage/sparse/JaniChoiceOrigins.cpp

@ -74,7 +74,7 @@ namespace storm {
edgesJson.push_back(storm::jani::JsonExporter::getEdgeAsJson(*model, autAndEdgeOffset.first, autAndEdgeOffset.second));
edgesJson.back()["automaton"] = automaton.getName();
}
setJson["edges"] = std::move(edgesJson);
setJson["transitions"] = std::move(edgesJson);
}
this->identifierToJson.push_back(std::move(setJson));
}

2
src/storm/storage/sparse/PrismChoiceOrigins.cpp

@ -151,7 +151,7 @@ namespace storm {
commandJson["updates"] = updatesJson;
commandsJson.push_back(std::move(commandJson));
}
setJson["commands"] = commandsJson;
setJson["transitions"] = commandsJson;
}
this->identifierToJson.push_back(std::move(setJson));
}

Loading…
Cancel
Save