|
|
@ -355,14 +355,19 @@ namespace storm { |
|
|
|
thenOffset = 1 - thenOffset; |
|
|
|
} |
|
|
|
|
|
|
|
return std::make_shared<Odd>(nullptr, elseOffset, nullptr, thenOffset); |
|
|
|
auto oddNode = std::make_shared<Odd>(nullptr, elseOffset, nullptr, thenOffset); |
|
|
|
uniqueTableForLevels[currentLevel].emplace(std::make_pair(dd, complement), oddNode); |
|
|
|
return oddNode; |
|
|
|
} else if (ddVariableIndices[currentLevel] < Cudd_NodeReadIndex(dd)) { |
|
|
|
// If we skipped the level in the DD, we compute the ODD just for the else-successor and use the same
|
|
|
|
// node for the then-successor as well.
|
|
|
|
std::shared_ptr<Odd> elseNode = createOddRec(dd, manager, currentLevel + 1, complement, maxLevel, ddVariableIndices, uniqueTableForLevels); |
|
|
|
std::shared_ptr<Odd> thenNode = elseNode; |
|
|
|
uint_fast64_t totalOffset = elseNode->getElseOffset() + elseNode->getThenOffset(); |
|
|
|
return std::make_shared<Odd>(elseNode, totalOffset, thenNode, totalOffset); |
|
|
|
|
|
|
|
auto oddNode = std::make_shared<Odd>(elseNode, totalOffset, thenNode, totalOffset); |
|
|
|
uniqueTableForLevels[currentLevel].emplace(std::make_pair(dd, complement), oddNode); |
|
|
|
return oddNode; |
|
|
|
} else { |
|
|
|
// Otherwise, we compute the ODDs for both the then- and else successors.
|
|
|
|
DdNode const* thenDdNode = Cudd_T_const(dd); |
|
|
@ -375,7 +380,9 @@ namespace storm { |
|
|
|
std::shared_ptr<Odd> elseNode = createOddRec(Cudd_Regular(elseDdNode), manager, currentLevel + 1, elseComplemented, maxLevel, ddVariableIndices, uniqueTableForLevels); |
|
|
|
std::shared_ptr<Odd> thenNode = createOddRec(Cudd_Regular(thenDdNode), manager, currentLevel + 1, thenComplemented, maxLevel, ddVariableIndices, uniqueTableForLevels); |
|
|
|
|
|
|
|
return std::make_shared<Odd>(elseNode, elseNode->getElseOffset() + elseNode->getThenOffset(), thenNode, thenNode->getElseOffset() + thenNode->getThenOffset()); |
|
|
|
auto oddNode = std::make_shared<Odd>(elseNode, elseNode->getElseOffset() + elseNode->getThenOffset(), thenNode, thenNode->getElseOffset() + thenNode->getThenOffset()); |
|
|
|
uniqueTableForLevels[currentLevel].emplace(std::make_pair(dd, complement), oddNode); |
|
|
|
return oddNode; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|