Browse Source

OrderedAssignments

Former-commit-id: 91a9125db1 [formerly 69a5020cf6]
Former-commit-id: 33cc0a7137
tempestpy_adaptions
sjunges 8 years ago
parent
commit
79c9dbcfda
  1. 2
      src/builder/DdJaniModelBuilder.cpp
  2. 4
      src/generator/JaniNextStateGenerator.cpp
  3. 4
      src/storage/jani/Edge.cpp
  4. 12
      src/storage/jani/EdgeDestination.cpp
  5. 15
      src/storage/jani/EdgeDestination.h

2
src/builder/DdJaniModelBuilder.cpp

@ -405,7 +405,7 @@ namespace storm {
// Iterate over all assignments (boolean and integer) and build the DD for it.
std::set<storm::expressions::Variable> assignedVariables;
for (auto const& assignment : destination.getNonTransientAssignments()) {
for (auto const& assignment : destination.getOrderedAssignments().getNonTransientAssignments()) {
// Record the variable as being written.
STORM_LOG_TRACE("Assigning to variable " << variables.variableToRowMetaVariableMap->at(assignment.getExpressionVariable()).getName());
assignedVariables.insert(assignment.getExpressionVariable());

4
src/generator/JaniNextStateGenerator.cpp

@ -203,8 +203,8 @@ namespace storm {
CompressedState JaniNextStateGenerator<ValueType, StateType>::applyUpdate(CompressedState const& state, storm::jani::EdgeDestination const& destination) {
CompressedState newState(state);
auto assignmentIt = destination.getNonTransientAssignments().begin();
auto assignmentIte = destination.getNonTransientAssignments().end();
auto assignmentIt = destination.getOrderedAssignments().getNonTransientAssignments().begin();
auto assignmentIte = destination.getOrderedAssignments().getNonTransientAssignments().end();
// Iterate over all boolean assignments and carry them out.
auto boolIt = this->variableInformation.booleanVariables.begin();

4
src/storage/jani/Edge.cpp

@ -71,7 +71,7 @@ namespace storm {
void Edge::finalize(Model const& containingModel) {
for (auto const& destination : getDestinations()) {
for (auto const& assignment : destination.getAssignments()) {
for (auto const& assignment : destination.getOrderedAssignments().getAllAssignments()) {
if (containingModel.getGlobalVariables().hasVariable(assignment.getExpressionVariable())) {
writtenGlobalVariables.insert(assignment.getExpressionVariable());
}
@ -88,7 +88,7 @@ namespace storm {
if (!destinations.empty()) {
auto const& destination = *destinations.begin();
for (auto const& assignment : destination.getTransientAssignments()) {
for (auto const& assignment : destination.getOrderedAssignments().getTransientAssignments()) {
// Check if we can lift the assignment to the edge.
bool canBeLifted = true;
for (auto const& destination : destinations) {

12
src/storage/jani/EdgeDestination.cpp

@ -26,16 +26,8 @@ namespace storm {
this->probability = probability;
}
storm::jani::detail::ConstAssignments EdgeDestination::getAssignments() const {
return assignments.getAllAssignments();
}
storm::jani::detail::ConstAssignments EdgeDestination::getTransientAssignments() const {
return assignments.getTransientAssignments();
}
storm::jani::detail::ConstAssignments EdgeDestination::getNonTransientAssignments() const {
return assignments.getNonTransientAssignments();
OrderedAssignments const& EdgeDestination::getOrderedAssignments() const {
return assignments;
}
void EdgeDestination::substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) {

15
src/storage/jani/EdgeDestination.h

@ -36,20 +36,7 @@ namespace storm {
*/
void setProbability(storm::expressions::Expression const& probability);
/*!
* Retrieves the assignments to make when choosing this destination.
*/
storm::jani::detail::ConstAssignments getAssignments() const;
/*!
* Retrieves the transient assignments to make when choosing this destination.
*/
storm::jani::detail::ConstAssignments getTransientAssignments() const;
/*!
* Retrieves the non-transient assignments to make when choosing this destination.
*/
storm::jani::detail::ConstAssignments getNonTransientAssignments() const;
OrderedAssignments const& getOrderedAssignments() const;
/*!
* Substitutes all variables in all expressions according to the given substitution.
Loading…
Cancel
Save