Exemple #1
0
/// propagate, but not until a fixpoint
/// returns a set of new clauses
std::vector<LinearLiteralPropagator::LinearConstraintClause>& LinearLiteralPropagator::propagateSingleStep()
{
    propClauses_.clear();
    while (!storage_.atFixPoint() && propClauses_.empty())
    {
        auto& lc = storage_.linearImpConstraints_[storage_.popConstraint()];
        if (s_.isTrue(lc.v))
            propagate_true(lc);
        else
            if (conf_.propStrength >= 2 && s_.isUnknown(lc.v))
                propagate_impl(lc);
    }
    return propClauses_;
}
Exemple #2
0
/// propagate, but not until a fixpoint
/// returns a set of new clauses
std::vector<LinearLiteralPropagator::LinearConstraintClause> LinearLiteralPropagator::propagateSingleStep()
{
    if (storage_.toProcess_.size())
    {
        auto& lc = storage_.linearImpConstraints_[storage_.toProcess_.back()];
        storage_.toProcess_.pop_back();
        lc.l.setFlag(false);
        if (s_.isTrue(lc.v))
            return propagate_true(lc);
        else
            if (s_.isUnknown(lc.v))
                return propagate_impl(lc);
    }
    return {};
}
Exemple #3
0
/// propagate, but not until a fixpoint
bool LinearPropagator::propagateSingleStep()
{
    if (!storage_.atFixPoint())
    {
        auto& lc = storage_.linearImpConstraints_[storage_.popConstraint()];
        if (s_.isTrue(lc.v))
        {
            if (!propagate_true(lc.l))
                return false;
        }
        else
        if (s_.isUnknown(lc.v))
        {
            if (!propagate_impl(lc))
                return false;
        }
    }
    return true;
}
Exemple #4
0
/// propagate, but not until a fixpoint
bool LinearPropagator::propagateSingleStep()
{
    if (storage_.toProcess_.size())
    {
        auto& lc = storage_.linearImpConstraints_[storage_.toProcess_.back()];
        storage_.toProcess_.pop_back();
        lc.l.setFlag(false);
        if (s_.isTrue(lc.v))
        {
            if (!propagate_true(lc.l))
                return false;
        }
        if (s_.isUnknown(lc.v))
        {
            if (!propagate_impl(lc))
                return false;
        }
    }
    return true;
}