Browse Source

reverted changing silent action name as JANI identifiers need to be non-empty

tempestpy_adaptions
dehnert 8 years ago
parent
commit
d5535b19be
  1. 2
      src/storm/storage/jani/Edge.h
  2. 2
      src/storm/storage/jani/Model.cpp
  3. 7
      src/storm/storage/prism/ToJaniConverter.cpp

2
src/storm/storage/jani/Edge.h

@ -13,6 +13,8 @@ namespace storm {
class Edge {
public:
Edge() = default;
Edge(uint64_t sourceLocationIndex, uint64_t actionIndex, boost::optional<storm::expressions::Expression> const& rate, storm::expressions::Expression const& guard, std::vector<EdgeDestination> destinations = {});
/*!

2
src/storm/storage/jani/Model.cpp

@ -14,7 +14,7 @@
namespace storm {
namespace jani {
const std::string Model::SILENT_ACTION_NAME = "__SILENT_ACTION__";
const std::string Model::SILENT_ACTION_NAME = "";
const uint64_t Model::SILENT_ACTION_INDEX = 0;
Model::Model() {

7
src/storm/storage/prism/ToJaniConverter.cpp

@ -216,7 +216,12 @@ namespace storm {
}
// Create the edge object so we can add transient assignments.
storm::jani::Edge newEdge(onlyLocationIndex, janiModel.getActionIndex(command.getActionName()), rateExpression, command.getGuardExpression(), destinations);
storm::jani::Edge newEdge;
if (command.getActionName().empty()) {
newEdge = storm::jani::Edge(onlyLocationIndex, storm::jani::Model::SILENT_ACTION_INDEX, rateExpression, command.getGuardExpression(), destinations);
} else {
newEdge = storm::jani::Edge(onlyLocationIndex, janiModel.getActionIndex(command.getActionName()), rateExpression, command.getGuardExpression(), destinations);
}
// Then add the transient assignments for the rewards. Note that we may do this only for the first
// module that has this action, so we remove the assignments from the global list of assignments

Loading…
Cancel
Save