Skip to content

Commit

Permalink
Merge pull request #8241 from tautschnig/cleanup/multiplier-invariant
Browse files Browse the repository at this point in the history
Add invariant that multiplication uses operands of the same size
  • Loading branch information
kroening authored Apr 20, 2024
2 parents 1ca18f2 + f0b0aa2 commit e8ebba3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/solvers/flattening/bv_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,11 @@ bvt bv_utilst::multiplier(
const bvt &op1,
representationt rep)
{
// We determine the result size from the operand size, and the implementation
// liberally swaps the operands, so we need to arrive at the same size
// whatever the order of the operands.
PRECONDITION(op0.size() == op1.size());

switch(rep)
{
case representationt::SIGNED: return signed_multiplier(op0, op1);
Expand Down

0 comments on commit e8ebba3

Please sign in to comment.