|
|
@ -163,7 +163,7 @@ TEST(SylvanDd, BddExistAbstractRepresentative) { |
|
|
|
EXPECT_TRUE(bddX0Y0Z0 == representative_xyz); |
|
|
|
} |
|
|
|
|
|
|
|
TEST(SylvanDd, AddMinExistAbstractRepresentative) { |
|
|
|
TEST(SylvanDd, AddMinAbstractRepresentative) { |
|
|
|
std::shared_ptr<storm::dd::DdManager<storm::dd::DdType::Sylvan>> manager(new storm::dd::DdManager<storm::dd::DdType::Sylvan>()); |
|
|
|
|
|
|
|
storm::dd::Bdd<storm::dd::DdType::Sylvan> bddZero; |
|
|
@ -268,7 +268,7 @@ TEST(SylvanDd, AddMinExistAbstractRepresentative) { |
|
|
|
EXPECT_TRUE(representative_complex_xyz == comparison_complex_xyz); |
|
|
|
} |
|
|
|
|
|
|
|
TEST(SylvanDd, AddMaxExistAbstractRepresentative) { |
|
|
|
TEST(SylvanDd, AddMaxAbstractRepresentative) { |
|
|
|
std::shared_ptr<storm::dd::DdManager<storm::dd::DdType::Sylvan>> manager(new storm::dd::DdManager<storm::dd::DdType::Sylvan>()); |
|
|
|
|
|
|
|
storm::dd::Bdd<storm::dd::DdType::Sylvan> bddZero; |
|
|
@ -431,12 +431,16 @@ TEST(SylvanDd, RationalFunctionLeaveReplacementNonVariable) { |
|
|
|
TEST(SylvanDd, RationalFunctionLeaveReplacementSimpleVariable) { |
|
|
|
std::shared_ptr<storm::dd::DdManager<storm::dd::DdType::Sylvan>> manager(new storm::dd::DdManager<storm::dd::DdType::Sylvan>()); |
|
|
|
|
|
|
|
// The cache that is used in case the underlying type needs a cache.
|
|
|
|
std::shared_ptr<carl::Cache<carl::PolynomialFactorizationPair<storm::RawPolynomial>>> cache = std::make_shared<carl::Cache<carl::PolynomialFactorizationPair<storm::RawPolynomial>>>(); |
|
|
|
|
|
|
|
storm::dd::Add<storm::dd::DdType::Sylvan, storm::RationalFunction> function; |
|
|
|
carl::Variable x = carl::freshRealVariable("x"); |
|
|
|
storm::RationalFunction variableX = storm::RationalFunction(typename storm::RationalFunction::PolyType(typename storm::RationalFunction::PolyType::PolyType(x), cache)); |
|
|
|
|
|
|
|
std::shared_ptr<storm::RawPolynomialCache> cache = std::make_shared<storm::RawPolynomialCache>(); |
|
|
|
|
|
|
|
carl::StringParser parser; |
|
|
|
parser.setVariables({"x"}); |
|
|
|
|
|
|
|
storm::RawPolynomial polyX = parser.parseMultivariatePolynomial<storm::RationalNumber>("x"); |
|
|
|
storm::RationalFunction variableX = storm::RationalFunction(storm::Polynomial(polyX, cache)); |
|
|
|
|
|
|
|
ASSERT_NO_THROW(function = manager->template getConstant<storm::RationalFunction>(variableX)); |
|
|
|
|
|
|
|
std::pair<storm::expressions::Variable, storm::expressions::Variable> xExpr; |
|
|
@ -445,7 +449,7 @@ TEST(SylvanDd, RationalFunctionLeaveReplacementSimpleVariable) { |
|
|
|
std::map<storm::RationalFunctionVariable, std::pair<storm::expressions::Variable, std::pair<storm::RationalNumber, storm::RationalNumber>>> replacementMap; |
|
|
|
storm::RationalNumber rnOneThird = storm::RationalNumber(1) / storm::RationalNumber(3); |
|
|
|
storm::RationalNumber rnTwoThird = storm::RationalNumber(2) / storm::RationalNumber(3); |
|
|
|
replacementMap.insert(std::make_pair(x, std::make_pair(xExpr.first, std::make_pair(rnOneThird, rnTwoThird)))); |
|
|
|
replacementMap.insert(std::make_pair(parser.variables().find("x")->second, std::make_pair(xExpr.first, std::make_pair(rnOneThird, rnTwoThird)))); |
|
|
|
|
|
|
|
storm::dd::Add<storm::dd::DdType::Sylvan, storm::RationalFunction> replacedAddSimpleX = function.replaceLeaves(replacementMap); |
|
|
|
|
|
|
@ -465,14 +469,13 @@ TEST(SylvanDd, RationalFunctionLeaveReplacementSimpleVariable) { |
|
|
|
TEST(SylvanDd, RationalFunctionLeaveReplacementTwoVariables) { |
|
|
|
std::shared_ptr<storm::dd::DdManager<storm::dd::DdType::Sylvan>> manager(new storm::dd::DdManager<storm::dd::DdType::Sylvan>()); |
|
|
|
|
|
|
|
// The cache that is used in case the underlying type needs a cache.
|
|
|
|
std::shared_ptr<carl::Cache<carl::PolynomialFactorizationPair<storm::RawPolynomial>>> cache = std::make_shared<carl::Cache<carl::PolynomialFactorizationPair<storm::RawPolynomial>>>(); |
|
|
|
|
|
|
|
storm::dd::Add<storm::dd::DdType::Sylvan, storm::RationalFunction> function; |
|
|
|
carl::Variable x = carl::freshRealVariable("x"); |
|
|
|
carl::Variable y = carl::freshRealVariable("y"); |
|
|
|
storm::RationalFunction variableX = storm::RationalFunction(typename storm::RationalFunction::PolyType(typename storm::RationalFunction::PolyType::PolyType(x), cache)); |
|