diff --git a/src/builder/DdPrismModelBuilder.cpp b/src/builder/DdPrismModelBuilder.cpp index 2d4abe95f..fb0707e77 100644 --- a/src/builder/DdPrismModelBuilder.cpp +++ b/src/builder/DdPrismModelBuilder.cpp @@ -1033,7 +1033,7 @@ namespace storm { // If we were asked to treat some states as terminal states, we cut away their transitions now. if (options.terminalStates || options.negatedTerminalStates) { - storm::dd::Add terminalStatesAdd = generationInfo.manager->template getAddZero(); + storm::dd::Bdd terminalStatesBdd = generationInfo.manager->getBddZero(); if (options.terminalStates) { storm::expressions::Expression terminalExpression; if (options.terminalStates.get().type() == typeid(storm::expressions::Expression)) { @@ -1044,7 +1044,7 @@ namespace storm { } STORM_LOG_TRACE("Making the states satisfying " << terminalExpression << " terminal."); - terminalStatesAdd = generationInfo.rowExpressionAdapter->translateExpression(terminalExpression); + terminalStatesBdd = generationInfo.rowExpressionAdapter->translateExpression(terminalExpression).toBdd(); } if (options.negatedTerminalStates) { storm::expressions::Expression nonTerminalExpression; @@ -1056,10 +1056,10 @@ namespace storm { } STORM_LOG_TRACE("Making the states *not* satisfying " << nonTerminalExpression << " terminal."); - terminalStatesAdd |= !generationInfo.rowExpressionAdapter->translateExpression(nonTerminalExpression); + terminalStatesBdd |= !generationInfo.rowExpressionAdapter->translateExpression(nonTerminalExpression).toBdd(); } - transitionMatrix *= !terminalStatesAdd; + transitionMatrix *= (!terminalStatesBdd).template toAdd(); } // Cut the transitions and rewards to the reachable fragment of the state space. @@ -1095,7 +1095,10 @@ namespace storm { // For MDPs, however, we need to select an action associated with the self-loop, if we do not // want to attach a lot of self-loops to the deadlock states. storm::dd::Add action = generationInfo.manager->template getAddOne(); - std::for_each(generationInfo.allNondeterminismVariables.begin(), generationInfo.allNondeterminismVariables.end(), [&action,&generationInfo] (storm::expressions::Variable const& metaVariable) { action *= !generationInfo.manager->template getIdentity(metaVariable); } ); + std::for_each(generationInfo.allNondeterminismVariables.begin(), generationInfo.allNondeterminismVariables.end(), + [&action, &generationInfo] (storm::expressions::Variable const& metaVariable) { + action *= generationInfo.manager->template getIdentity(metaVariable); + }); // Make sure that global variables do not change along the introduced self-loops. for (auto const& var : generationInfo.allGlobalVariables) { action *= generationInfo.variableToIdentityMap.at(var); diff --git a/src/storage/dd/Add.cpp b/src/storage/dd/Add.cpp index 1b48238e4..b3a504956 100644 --- a/src/storage/dd/Add.cpp +++ b/src/storage/dd/Add.cpp @@ -36,10 +36,10 @@ namespace storm { return Add(this->getDdManager(), internalAdd.ite(thenAdd.internalAdd, elseAdd.internalAdd), metaVariables); } - template - Add Add::operator!() const { - return Add(this->getDdManager(), !internalAdd, this->getContainedMetaVariables()); - } +// template +// Add Add::operator!() const { +// return Add(this->getDdManager(), !internalAdd, this->getContainedMetaVariables()); +// } template Add Add::operator||(Add const& other) const { diff --git a/src/storage/dd/Add.h b/src/storage/dd/Add.h index 356336a1e..36cd2d98e 100644 --- a/src/storage/dd/Add.h +++ b/src/storage/dd/Add.h @@ -81,7 +81,7 @@ namespace storm { * * @return The resulting ADD. */ - Add operator!() const; +// Add operator!() const; /*! * Performs a logical or of the current anBd the given ADD. As a prerequisite, the operand ADDs need to be diff --git a/test/functional/storage/CuddDdTest.cpp b/test/functional/storage/CuddDdTest.cpp index 106b52d43..f5a7c1f6d 100644 --- a/test/functional/storage/CuddDdTest.cpp +++ b/test/functional/storage/CuddDdTest.cpp @@ -113,6 +113,7 @@ TEST(CuddDd, OperatorTest) { storm::dd::Add dd1 = manager->template getAddOne(); storm::dd::Add dd2 = manager->template getAddOne(); storm::dd::Add dd3 = dd1 + dd2; + storm::dd::Bdd bdd; EXPECT_TRUE(dd3 == manager->template getConstant(2)); dd3 += manager->template getAddZero(); @@ -133,14 +134,14 @@ TEST(CuddDd, OperatorTest) { dd3 /= manager->template getConstant(2); EXPECT_TRUE(dd3.isOne()); - dd3 = !dd3; - EXPECT_TRUE(dd3.isZero()); + bdd = !dd3.toBdd(); + EXPECT_TRUE(bdd.isZero()); - dd1 = !dd3; - EXPECT_TRUE(dd1.isOne()); + bdd = !bdd; + EXPECT_TRUE(bdd.isOne()); - dd3 = dd1 || dd2; - EXPECT_TRUE(dd3.isOne()); + bdd = dd1.toBdd() || dd2.toBdd(); + EXPECT_TRUE(bdd.isOne()); dd1 = manager->template getIdentity(x.first); dd2 = manager->template getConstant(5);