@Test public void testGetValuesSatisfying() { BDDInteger dstIp = new BDDPacket().getDstIp(); BDD bdd = dstIp.geq(1).and(dstIp.leq(0)); assertThat(dstIp.getValuesSatisfying(bdd, 10), hasSize(0)); long max = 0xFFFFFFFFL; long min = 0xFFFFFFFAL; bdd = dstIp.geq(min).and(dstIp.leq(max)); assertThat( dstIp.getValuesSatisfying(bdd, 10), containsInAnyOrder( 0xFFFFFFFAL, 0xFFFFFFFBL, 0xFFFFFFFCL, 0xFFFFFFFDL, 0xFFFFFFFEL, 0xFFFFFFFFL)); }
public List<Long> getValuesSatisfying(BDD bdd, int max) { ImmutableList.Builder<Long> values = new ImmutableList.Builder<>(); checkArgument(max > 0, "max must be > 0"); int num = 0; BDD pred = bdd; while (num < max) { if (pred.isZero()) { break; } long val = satAssignmentToLong(pred.satOne()); values.add(val); pred = pred.diff(value(val)); num++; } return values.build(); }
BDDInteger { public List<Long> getValuesSatisfying(BDD bdd, int max) { ImmutableList.Builder<Long> values = new ImmutableList.Builder<>(); checkArgument(max > 0, "max must be > 0"); int num = 0; BDD pred = bdd; while (num < max) { if (pred.isZero()) { break; } long val = satAssignmentToLong(pred.satOne()); values.add(val); pred = pred.diff(value(val)); num++; } return values.build(); } }
BDDInteger { public List<Long> getValuesSatisfying(BDD bdd, int max) { ImmutableList.Builder<Long> values = new ImmutableList.Builder<>(); checkArgument(max > 0, "max must be > 0"); int num = 0; BDD pred = bdd; while (num < max) { if (pred.isZero()) { break; } long val = satAssignmentToLong(pred.satOne()); values.add(val); pred = pred.diff(value(val)); num++; } return values.build(); } private  BDDInteger(BDDFactory factory, int length);  BDDInteger(BDDInteger other); }
BDDInteger { public List<Long> getValuesSatisfying(BDD bdd, int max) { ImmutableList.Builder<Long> values = new ImmutableList.Builder<>(); checkArgument(max > 0, "max must be > 0"); int num = 0; BDD pred = bdd; while (num < max) { if (pred.isZero()) { break; } long val = satAssignmentToLong(pred.satOne()); values.add(val); pred = pred.diff(value(val)); num++; } return values.build(); } private  BDDInteger(BDDFactory factory, int length);  BDDInteger(BDDInteger other); boolean hasVariablesOnly(); int size(); static BDDInteger makeFromIndex(
      BDDFactory factory, int length, int start, boolean reverse); Optional<Long> getValueSatisfying(BDD bdd); Long satAssignmentToLong(BDD satAssignment); Long satAssignmentToLong(BitSet bits); List<Long> getValuesSatisfying(BDD bdd, int max); static BDDInteger makeFromValue(BDDFactory factory, int length, long value); BDDInteger ite(BDD b, BDDInteger other); BDD value(long val); BDD leq(long val); BDD geq(long val); BDD range(long a, long b); void setValue(long val); void setValue(BDDInteger other); BDDInteger add(BDDInteger other); BDDInteger sub(BDDInteger var1); BDD[] getBitvec(); @Nonnull BDD getVars(); BDDFactory getFactory(); @Override boolean equals(Object o); @Override int hashCode(); }
BDDInteger { public List<Long> getValuesSatisfying(BDD bdd, int max) { ImmutableList.Builder<Long> values = new ImmutableList.Builder<>(); checkArgument(max > 0, "max must be > 0"); int num = 0; BDD pred = bdd; while (num < max) { if (pred.isZero()) { break; } long val = satAssignmentToLong(pred.satOne()); values.add(val); pred = pred.diff(value(val)); num++; } return values.build(); } private  BDDInteger(BDDFactory factory, int length);  BDDInteger(BDDInteger other); boolean hasVariablesOnly(); int size(); static BDDInteger makeFromIndex(
      BDDFactory factory, int length, int start, boolean reverse); Optional<Long> getValueSatisfying(BDD bdd); Long satAssignmentToLong(BDD satAssignment); Long satAssignmentToLong(BitSet bits); List<Long> getValuesSatisfying(BDD bdd, int max); static BDDInteger makeFromValue(BDDFactory factory, int length, long value); BDDInteger ite(BDD b, BDDInteger other); BDD value(long val); BDD leq(long val); BDD geq(long val); BDD range(long a, long b); void setValue(long val); void setValue(BDDInteger other); BDDInteger add(BDDInteger other); BDDInteger sub(BDDInteger var1); BDD[] getBitvec(); @Nonnull BDD getVars(); BDDFactory getFactory(); @Override boolean equals(Object o); @Override int hashCode();  }