@Test public void testGetValueSatisfying() { BDDInteger dstIp = new BDDPacket().getDstIp(); BDD bdd = dstIp.geq(1).and(dstIp.leq(0)); assertThat(dstIp.getValueSatisfying(bdd), equalTo(Optional.empty())); bdd = dstIp.geq(1).and(dstIp.leq(1)); assertThat(dstIp.getValueSatisfying(bdd), equalTo(Optional.of((long) 1))); }
public Optional<Long> getValueSatisfying(BDD bdd) { if (bdd.isZero()) { return Optional.empty(); } if (_hasVariablesOnly) { return Optional.of(satAssignmentToLong(bdd.minAssignmentBits())); } return Optional.of(satAssignmentToLong(bdd.satOne())); }
BDDInteger { public Optional<Long> getValueSatisfying(BDD bdd) { if (bdd.isZero()) { return Optional.empty(); } if (_hasVariablesOnly) { return Optional.of(satAssignmentToLong(bdd.minAssignmentBits())); } return Optional.of(satAssignmentToLong(bdd.satOne())); } }
BDDInteger { public Optional<Long> getValueSatisfying(BDD bdd) { if (bdd.isZero()) { return Optional.empty(); } if (_hasVariablesOnly) { return Optional.of(satAssignmentToLong(bdd.minAssignmentBits())); } return Optional.of(satAssignmentToLong(bdd.satOne())); } private  BDDInteger(BDDFactory factory, int length);  BDDInteger(BDDInteger other); }
BDDInteger { public Optional<Long> getValueSatisfying(BDD bdd) { if (bdd.isZero()) { return Optional.empty(); } if (_hasVariablesOnly) { return Optional.of(satAssignmentToLong(bdd.minAssignmentBits())); } return Optional.of(satAssignmentToLong(bdd.satOne())); } 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 Optional<Long> getValueSatisfying(BDD bdd) { if (bdd.isZero()) { return Optional.empty(); } if (_hasVariablesOnly) { return Optional.of(satAssignmentToLong(bdd.minAssignmentBits())); } return Optional.of(satAssignmentToLong(bdd.satOne())); } 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();  }