Skip to content

Optimise propositional encoding of object_size #7029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/solvers/flattening/bv_pointers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,26 @@ void bv_pointerst::do_postponed(
PRECONDITION(size_bv.size() == postponed.bv.size());

literalt l1=bv_utils.equal(bv, saved_bv);
if(l1.is_true())
{
for(std::size_t i = 0; i < postponed.bv.size(); ++i)
prop.set_equal(postponed.bv[i], size_bv[i]);
break;
}
else if(l1.is_false())
continue;
#define COMPACT_OBJECT_SIZE_EQ
#ifndef COMPACT_OBJECT_SIZE_EQ
literalt l2=bv_utils.equal(postponed.bv, size_bv);

prop.l_set_to_true(prop.limplies(l1, l2));
#else
for(std::size_t i = 0; i < postponed.bv.size(); ++i)
{
prop.lcnf({!l1, !postponed.bv[i], size_bv[i]});
prop.lcnf({!l1, postponed.bv[i], !size_bv[i]});
}
#endif
}
}
else
Expand Down