Bdd^ Bdd::GetThenBranch() { Bdd^ tempBdd = nullptr; tempBdd = gcnew Bdd(); tempBdd->UnmanagedBdd = bdd_then(m_Manager, m_BDD); tempBdd->UnmangedBddManager = m_Manager; return tempBdd; }
Bdd^ Bdd::GetBddRootVariable() { Bdd^ tempBdd =nullptr; tempBdd = gcnew Bdd(); tempBdd->UnmanagedBdd = bdd_if(m_Manager, m_BDD); tempBdd->UnmangedBddManager = m_Manager; return tempBdd; }
Bdd SystemParser::computeStateSpace(const Bdd& transitions, const Mtbdd& markov_transitions) const { LACE_ME; Bdd markovs; if (leaf_type == mpq_type) markovs = Bdd(gmp_strict_threshold_d(markov_transitions.GetMTBDD(), 0)); else markovs = markov_transitions.BddStrictThreshold(0); // Compute all transitions const Bdd all_trans = transitions.ExistAbstract(varA) + markovs; // Take all transitions. Bdd states = Bdd::bddOne().RelNext(all_trans, varS*varT); // all "to" states states += all_trans.ExistAbstract(varT); // all "from" states return states; }
} Bdd^ Bdd::GetBddRootVariable() { Bdd^ tempBdd =nullptr; tempBdd = gcnew Bdd(); tempBdd->UnmanagedBdd = bdd_if(m_Manager, m_BDD); tempBdd->UnmangedBddManager = m_Manager; return tempBdd; } Bdd ^Bdd::Exists(array<Bdd^> ^bddVariables) { Bdd^ tempBdd = gcnew Bdd(); array<bdd> ^unmanagedBddArray = gcnew array<bdd>(bddVariables->Length+1); for(int i=0; i<bddVariables->Length; i++) unmanagedBddArray[i] = bddVariables[i]->UnmanagedBdd; unmanagedBddArray[bddVariables->Length] = nullptr; pin_ptr<bdd> pp = &unmanagedBddArray[0]; bdd_temp_assoc(m_Manager, pp, 0); bdd_assoc(m_Manager, -1); tempBdd->UnmanagedBdd = bdd_exists(m_Manager, m_BDD); tempBdd->UnmangedBddManager = m_Manager;