Skip to content

#458 Add two's complement CIF/BDD bit vector + some changes to non-negative CIF/BDD bit vector

Dennis Hendriks requested to merge 458-cifbdd-twos-complement-bit-vector into develop
  • Best to review per commit.
  • No end-user visible changes.
  • This merge request is a first step in #458:
    • Original commits:
      • I first made some improvements/fixes to the current non-negative CIF/BDD bit vector and its tests. This covers most of the commits, as I took small steps.
      • I then copied the non-negative CIF/BDD bit vector related classes for two's complement. I adapt some class names as well, before making any logic changes. This is covered by two commits.
      • Finally, I update the two's complement CIF/BDD bit vector related classes to actually represent two's complement. This is covered by the last commit. It allows to see in the diff where the implementation differs from the non-negative CIF/BDD bit vector implementation/tests.
    • Changes after review:
      • Require at least one bit for non-negative bit vector, and at least two for two's complement bit vector.
      • setDomain now requires that the domain is non-empty and fits the bit vector.
      • BddUtils.getMinimum(*)Bits methods moved to bit vector classes, and renamed.
      • Various renamings of methods and local variables, improved JavaDocs/comments, improved method order, etc. Mostly in the test classes.
      • Fixed createInt test for negative value with non-negative bit vector, that tested the wrong thing. This exposed a bug in the bit vector API that got fixed.
      • Added some tests. Merged some tests. Split some tests.
      • Reduced for some test the number of bit vector lengths that are tested.
  • I have not yet renamed the non-negative CIF/BDD bit vector related classes. I've also not yet created a common base class for both CIF/BDD bit vector representations. That is for a next step.

Addresses #458

Edited by Dennis Hendriks

Merge request reports

Loading