Browse Source

Added static_casts and changed some types to signed instead of unsigned to eliminate some warnings of MSVC.

tempestpy_adaptions
dehnert 12 years ago
parent
commit
6920e1ccdd
  1. 8
      src/adapters/SymbolicExpressionAdapter.h
  2. 8
      src/adapters/SymbolicModelAdapter.h

8
src/adapters/SymbolicExpressionAdapter.h

@ -158,12 +158,12 @@ public:
}
storm::utility::CuddUtility* cuddUtility = storm::utility::cuddUtilityInstance();
stack.push(new ADD(*cuddUtility->getConstant(expression->getValue())));
stack.push(new ADD(*cuddUtility->getConstant(static_cast<double>(expression->getValue()))));
}
virtual void visit(storm::ir::expressions::IntegerLiteral* expression) {
storm::utility::CuddUtility* cuddUtility = storm::utility::cuddUtilityInstance();
stack.push(new ADD(*cuddUtility->getConstant(expression->getValueAsInt(nullptr))));
stack.push(new ADD(*cuddUtility->getConstant(static_cast<double>(expression->getValueAsInt(nullptr)))));
}
virtual void visit(storm::ir::expressions::UnaryBooleanFunctionExpression* expression) {
@ -211,8 +211,8 @@ public:
int64_t low = expression->getLowerBound()->getValueAsInt(nullptr);
int64_t high = expression->getUpperBound()->getValueAsInt(nullptr);
for (uint_fast64_t i = low; i <= high; ++i) {
cuddUtility->setValueAtIndex(result, i - low, variables, i);
for (int_fast64_t i = low; i <= high; ++i) {
cuddUtility->setValueAtIndex(result, i - low, variables, static_cast<double>(i));
}
}

8
src/adapters/SymbolicModelAdapter.h

@ -81,8 +81,8 @@ public:
int_fast64_t low = integerVariable.getLowerBound()->getValueAsInt(nullptr);
int_fast64_t high = integerVariable.getUpperBound()->getValueAsInt(nullptr);
for (uint_fast64_t i = low; i <= high; ++i) {
cuddUtility->setValueAtIndex(temporary, i - low, variableToColumnDecisionDiagramVariableMap[assignmentPair.first], i);
for (int_fast64_t i = low; i <= high; ++i) {
cuddUtility->setValueAtIndex(temporary, i - low, variableToColumnDecisionDiagramVariableMap[assignmentPair.first], static_cast<double>(i));
}
ADD* result = new ADD(*updateExpr * *guard);
@ -194,7 +194,7 @@ private:
cuddUtility->dumpDotToFile(newReachableStates, "reach1.add");
newReachableStates = cuddUtility->permuteVariables(newReachableStates, allColumnDecisionDiagramVariables, allRowDecisionDiagramVariables, allDecisionDiagramVariables.size());
newReachableStates = cuddUtility->permuteVariables(newReachableStates, allColumnDecisionDiagramVariables, allRowDecisionDiagramVariables, static_cast<int>(allDecisionDiagramVariables.size()));
*newReachableStates += *reachableStates;
newReachableStates = new ADD(newReachableStates->GreaterThan(*cuddUtility->getZero()));
@ -232,7 +232,7 @@ private:
int_fast64_t low = integerVariable.getLowerBound()->getValueAsInt(nullptr);
int_fast64_t high = integerVariable.getUpperBound()->getValueAsInt(nullptr);
for (uint_fast64_t i = low; i <= high; ++i) {
for (int_fast64_t i = low; i <= high; ++i) {
cuddUtility->setValueAtIndices(identity, i - low, i - low,
variableToRowDecisionDiagramVariableMap[integerVariable.getName()],
variableToColumnDecisionDiagramVariableMap[integerVariable.getName()], 1);

Loading…
Cancel
Save