src/hyperengine.cpp
//Analyze why did we fail at decision level 1
Analyze why did we fail at decision level 1
Analyze why did we fail at decision level 1
Lit HyperEngine::analyzeFail(const PropBy propBy)
{
    currAncestors.clear();
    switch(propBy.getType()) {
        case binary_t: {
            const Lit lit = ~propBy.lit2();
            if (varData[lit.var()].level != 0)
                currAncestors.push_back(lit);
            if (varData[failBinLit.var()].level != 0)
                currAncestors.push_back(~failBinLit);
            break;
        }
        case clause_t: {
            const uint32_t offset = propBy.get_offset();
            const Clause& cl = *cl_alloc.ptr(offset);
            for(size_t i = 0; i < cl.size(); i++) {
                if (varData[cl[i].var()].level != 0)
                    currAncestors.push_back(~cl[i]);
            }
            break;
        }
        case null_clause_t:
            assert(false);
            break;
    }
    Lit foundLit = deepest_common_ancestor();
    return foundLit;
}
Lit HyperEngine :: analyzeFail ( const PropBy propBy ) { currAncestors . clear ( ) ; switch ( propBy . getType ( ) ) { case binary_t : { const Lit lit = ~ propBy . lit2 ( ) ; if ( varData [ lit . var ( ) ] . level != 0 ) currAncestors . push_back ( lit ) ; if ( varData [ failBinLit . var ( ) ] . level != 0 ) currAncestors . push_back ( ~ failBinLit ) ; break ; } case clause_t : { const uint32_t offset = propBy . get_offset ( ) ; const Clause & cl = * cl_alloc . ptr ( offset ) ; for ( size_t i = 0 ; i < cl . size ( ) ; i ++ ) { if ( varData [ cl [ i ] . var ( ) ] . level != 0 ) currAncestors . push_back ( ~ cl [ i ] ) ; } break ; } case null_clause_t : assert ( false ) ; break ; } Lit foundLit = deepest_common_ancestor ( ) ; return foundLit ; }
Analyze why did we fail at decision level 1
Analyze why did we fail at decision level 1
//Clear out the datastructs we will be usin //First, we set the ancestors, based on the clause //Each literal in the clause is an ancestor. So just 'push' them inside the //'currAncestors' variable