encoding of 1 with BitVectors failed

Issue #2 resolved
Franck Cassez repo owner created an issue

The following skink test fails when bits is 32:

1.withUBits(bits)

Comments (5)

  1. Franck Cassez reporter

    Added new tests in ScalaSMT with:

    1.withUbits(32)
    

    and reproduced problem. Line 149 of require in BitVectors.scala triggers an error.

  2. Franck Cassez reporter

    Cause of the problem: with 32 bits there is an overflow in the computation of (1 << 32) - 1 which yields 0 instead of 4294967295.

    Now use BigInt to perform this check and inside apply at 117 and 146. This fixes the problem.

  3. Log in to comment