bool Atpg::DDrive() { GateVec dfront; impl_->GetDFrontier(dfront); if (dfront.size()==0) return false; Gate *fg = &cir_->gates_[current_fault_->gate_]; assert(impl_->GetVal(fg->id_)==D || impl_->GetVal(fg->id_)==B); Gate *gtoprop = NULL; int observ = INT_MAX; for (size_t i=0; i<dfront.size(); i++) if(dfront[i]->co_o_<observ) { gtoprop = dfront[i]; observ = dfront[i]->co_o_; } assert(gtoprop->isUnary()==L); current_obj_.first = gtoprop->id_; current_obj_.second = gtoprop->getOutputCtrlValue(); return true; }