Пример #1
0
BaseSemantics::SValuePtr
RiscOperators::Cursor::operator()(const BaseSemantics::SValuePtr &a_) const
{
    ASSERT_require(!at_end());
    SValuePtr a = SValue::promote(a_);
    return a->get_subvalue(idx_);
}
Пример #2
0
bool
SValue::may_equal(const BaseSemantics::SValuePtr &other_, const SmtSolverPtr &solver) const 
{
    SValuePtr other = SValue::promote(other_);
    for (size_t i=0; i<subvalues.size(); ++i) {
        if (is_valid(i) && other->is_valid(i) && get_subvalue(i)->may_equal(other->get_subvalue(i), solver))
            return true;
    }
    return false;
}
Пример #3
0
bool
SValue::must_equal(const BaseSemantics::SValuePtr &other_, const SmtSolverPtr &solver) const
{
    SValuePtr other = SValue::promote(other_);
    size_t nconsidered = 0;
    for (size_t i=0; i<subvalues.size(); ++i) {
        if (is_valid(i) && other->is_valid(i)) {
            if (!get_subvalue(i)->must_equal(other->get_subvalue(i), solver))
                return false;
            ++nconsidered;
        }
    }
    return nconsidered>0;
}