Browse Source

make storm compile with latest version of carl

tempestpy_adaptions
Sebastian Junges 8 years ago
parent
commit
c46ce03e60
  1. 4
      resources/3rdparty/sylvan/src/storm_wrapper.cpp
  2. 2
      src/storm/storage/expressions/ToRationalNumberVisitor.cpp
  3. 8
      src/storm/utility/constants.cpp

4
resources/3rdparty/sylvan/src/storm_wrapper.cpp

@ -202,7 +202,7 @@ storm_rational_number_ptr storm_rational_number_pow(storm_rational_number_ptr a,
storm::RationalNumber const& srn_a = *(storm::RationalNumber const*)a;
storm::RationalNumber const& srn_b = *(storm::RationalNumber const*)b;
uint64_t exponentAsInteger = carl::toInt<unsigned long>(srn_b);
carl::uint exponentAsInteger = carl::toInt<carl::uint>(srn_b);
storm::RationalNumber* result_srn = new storm::RationalNumber(carl::pow(srn_a, exponentAsInteger));
return (storm_rational_number_ptr)result_srn;
}
@ -515,7 +515,7 @@ storm_rational_function_ptr storm_rational_function_pow(storm_rational_function_
storm::RationalFunction const& srf_a = *(storm::RationalFunction const*)a;
storm::RationalFunction const& srf_b = *(storm::RationalFunction const*)b;
uint64_t exponentAsInteger = carl::toInt<unsigned long>(srf_b.nominatorAsNumber());
carl::uint exponentAsInteger = carl::toInt<carl::uint>(srf_b.nominatorAsNumber());
storm::RationalFunction* result_srf = new storm::RationalFunction(carl::pow(srf_a, exponentAsInteger));
return (storm_rational_function_ptr)result_srf;
}

2
src/storm/storage/expressions/ToRationalNumberVisitor.cpp

@ -75,7 +75,7 @@ namespace storm {
break;
case BinaryNumericalFunctionExpression::OperatorType::Power:
STORM_LOG_THROW(storm::utility::isInteger(secondOperandAsRationalNumber), storm::exceptions::InvalidArgumentException, "Exponent of power operator must be a positive integer.");
uint_fast64_t exponentAsInteger = storm::utility::convertNumber<uint_fast64_t>(secondOperandAsRationalNumber);
uint_fast64_t exponentAsInteger = storm::utility::convertNumber<carl::uint>(secondOperandAsRationalNumber);
result = storm::utility::pow(firstOperandAsRationalNumber, exponentAsInteger);
return result;
break;

8
src/storm/utility/constants.cpp

@ -256,7 +256,7 @@ namespace storm {
template<>
uint_fast64_t convertNumber(ClnRationalNumber const& number) {
return carl::toInt<unsigned long>(number);
return carl::toInt<carl::uint>(number);
}
template<>
@ -386,7 +386,7 @@ namespace storm {
template<>
uint_fast64_t convertNumber(GmpRationalNumber const& number){
return carl::toInt<unsigned long>(number);
return carl::toInt<carl::uint>(number);
}
template<>
@ -549,8 +549,8 @@ namespace storm {
#endif
template<>
uint_fast64_t convertNumber(RationalFunction const& func) {
return carl::toInt<unsigned long>(convertNumber<RationalFunctionCoefficient>(func));
carl::uint convertNumber(RationalFunction const& func) {
return carl::toInt<carl::uint>(convertNumber<RationalFunctionCoefficient>(func));
}
template<>
Loading…
Cancel
Save