Exemplo n.º 1
0
static void prune_unfixed(sat::literal_vector& lambda, sat::model const& m) {
    for (unsigned i = 0; i < lambda.size(); ++i) {
        if ((m[lambda[i].var()] == l_false) != lambda[i].sign()) {
            lambda[i] = lambda.back();
            lambda.pop_back();
            --i;
        }
    }
}
Exemplo n.º 2
0
static void back_remove(sat::literal_vector& lits, sat::literal l) {
    for (unsigned i = lits.size(); i > 0; ) {
        --i;
        if (lits[i] == l) {
            lits[i] = lits.back();
            lits.pop_back();
            return;
        }
    }
    std::cout << "UNREACHABLE\n";
}