Browse Source

fixed wrong call in sylvan double to rational number conversion

tempestpy_adaptions
dehnert 7 years ago
parent
commit
b09cb95254
  1. 3
      resources/3rdparty/CMakeLists.txt
  2. 4
      resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c
  3. 2
      src/test/storm/storage/SylvanDdTest.cpp

3
resources/3rdparty/CMakeLists.txt

@ -436,9 +436,6 @@ ExternalProject_Add(
LOG_BUILD ON
DEPENDS ${sylvan_dep}
BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/sylvan/src/libsylvan${STATIC_EXT}
// FIXME: remove
BUILD_ALWAYS 1
)
ExternalProject_Get_Property(sylvan source_dir)

4
resources/3rdparty/sylvan/src/sylvan_mtbdd_storm.c

@ -639,14 +639,14 @@ TASK_IMPL_2(MTBDD, mtbdd_op_to_rational_number, MTBDD, a, size_t, p)
assert(0);
}
}
return mtbdd_invalid;
(void)p; // unused variable
}
TASK_IMPL_2(MTBDD, mtbdd_to_rational_number, MTBDD, dd, size_t, p)
{
return mtbdd_uapply(dd, TASK(mtbdd_to_rational_number), 0);
return mtbdd_uapply(dd, TASK(mtbdd_op_to_rational_number), 0);
}

2
src/test/storm/storage/SylvanDdTest.cpp

@ -868,7 +868,7 @@ TEST(SylvanDd, AddToRationalTest) {
std::map<storm::expressions::Variable, int_fast64_t> metaVariableToValueMap;
metaVariableToValueMap.emplace(x.first, 4);
ASSERT_EQ(storm::utility::convertNumber<storm::RationalNumber>(std::string("4/10")), rationalDd.getValue(metaVariableToValueMap));
ASSERT_EQ(storm::utility::convertNumber<storm::RationalNumber>(std::string("3602879701896397/9007199254740992")), rationalDd.getValue(metaVariableToValueMap));
}

Loading…
Cancel
Save