/**
   * Computes the state resulting from flipping the bits of the values represented by this state.
   *
   * @return the state resulting from flipping the bits of the values represented by this state.
   */
public CompoundBitVectorInterval binaryNot(
      boolean pAllowSignedWrapAround, final OverflowEventHandler pOverflowEventHandler) {
    if (isBottom()) {
      return bottom(info);
    }
    CompoundBitVectorInterval result = bottom(info);
    for (BitVectorInterval interval : intervals) {
      if (!interval.isSingleton()) {
        // TODO maybe a more exact implementation is possible?
        return getInternal(info.getRange());
      }
      final BitVectorInterval partialResult;
      if (info.isSigned()) {
        partialResult =
            BitVectorInterval.cast(
                info,
                interval.getLowerBound().not(),
                pAllowSignedWrapAround,
                pOverflowEventHandler);
      } else {
        partialResult =
            BitVectorInterval.cast(
                info,
                new BigInteger(1, interval.getLowerBound().not().toByteArray()),
                pAllowSignedWrapAround,
                pOverflowEventHandler);
      }
      result = result.unionWith(partialResult);
    }
    return result;
  }
public CompoundBitVectorInterval binaryNot(
boolean pAllowSignedWrapAround, final OverflowEventHandler pOverflowEventHandler) {
if (isBottom()) {
return bottom(info);
}
CompoundBitVectorInterval result = bottom(info);
for (BitVectorInterval interval : intervals) {
if (!interval.isSingleton()) {
// TODO maybe a more exact implementation is possible?
return getInternal(info.getRange());
}
final BitVectorInterval partialResult;
if (info.isSigned()) {
partialResult =
BitVectorInterval.cast(
info,
interval.getLowerBound().not(),
pAllowSignedWrapAround,
pOverflowEventHandler);
} else {
partialResult =
BitVectorInterval.cast(
info,
new BigInteger(1, interval.getLowerBound().not().toByteArray()),
pAllowSignedWrapAround,
pOverflowEventHandler);
}
result = result.unionWith(partialResult);
}
return result;
}
public CompoundBitVectorInterval binaryNot(
boolean pAllowSignedWrapAround, final OverflowEventHandler pOverflowEventHandler) {
if (isBottom()) {
return bottom(info);
}
CompoundBitVectorInterval result = bottom(info);
for (BitVectorInterval interval : intervals) {
if (!interval.isSingleton()) {
// TODO maybe a more exact implementation is possible?
return getInternal(info.getRange());
}
final BitVectorInterval partialResult;
if (info.isSigned()) {
partialResult =
BitVectorInterval.cast(
info,
interval.getLowerBound().not(),
pAllowSignedWrapAround,
pOverflowEventHandler);
} else {
partialResult =
BitVectorInterval.cast(
info,
new BigInteger(1, interval.getLowerBound().not().toByteArray()),
pAllowSignedWrapAround,
pOverflowEventHandler);
}
result = result.unionWith(partialResult);
}
return result;
}
public CompoundBitVectorInterval binaryNot(
boolean pAllowSignedWrapAround, final OverflowEventHandler pOverflowEventHandler) {
if (isBottom()) {
return bottom(info);
}
CompoundBitVectorInterval result = bottom(info);
for (BitVectorInterval interval : intervals) {
if (!interval.isSingleton()) {
// TODO maybe a more exact implementation is possible?
return getInternal(info.getRange());
}
final BitVectorInterval partialResult;
if (info.isSigned()) {
partialResult =
BitVectorInterval.cast(
info,
interval.getLowerBound().not(),
pAllowSignedWrapAround,
pOverflowEventHandler);
} else {
partialResult =
BitVectorInterval.cast(
info,
new BigInteger(1, interval.getLowerBound().not().toByteArray()),
pAllowSignedWrapAround,
pOverflowEventHandler);
}
result = result.unionWith(partialResult);
}
return result;
}