@Test public void testIsRelevantFor_range32() { BDDRoute bddRoute = _anyRoute; PrefixRange range = new PrefixRange(Prefix.parse("0.0.0.0/0"), SubRange.singleton(32)); BDD rangeBdd = isRelevantFor(bddRoute, range); BDD len0 = bddRoute.getPrefixLength().value(0); BDD len32 = bddRoute.getPrefixLength().value(32); assertTrue(len0.imp(rangeBdd.not()).isOne()); assertTrue(len32.imp(rangeBdd).isOne()); }
public static BDD isRelevantFor(BDDRoute record, PrefixRange range) { Prefix p = range.getPrefix(); BDD prefixMatch = firstBitsEqual(record.getPrefix().getBitvec(), p, p.getPrefixLength()); BDDInteger prefixLength = record.getPrefixLength(); SubRange r = range.getLengthRange(); int lower = r.getStart(); int upper = r.getEnd(); BDD lenMatch = prefixLength.range(lower, upper); return lenMatch.and(prefixMatch); }
TransferBDD { public static BDD isRelevantFor(BDDRoute record, PrefixRange range) { Prefix p = range.getPrefix(); BDD prefixMatch = firstBitsEqual(record.getPrefix().getBitvec(), p, p.getPrefixLength()); BDDInteger prefixLength = record.getPrefixLength(); SubRange r = range.getLengthRange(); int lower = r.getStart(); int upper = r.getEnd(); BDD lenMatch = prefixLength.range(lower, upper); return lenMatch.and(prefixMatch); } }
TransferBDD { public static BDD isRelevantFor(BDDRoute record, PrefixRange range) { Prefix p = range.getPrefix(); BDD prefixMatch = firstBitsEqual(record.getPrefix().getBitvec(), p, p.getPrefixLength()); BDDInteger prefixLength = record.getPrefixLength(); SubRange r = range.getLengthRange(); int lower = r.getStart(); int upper = r.getEnd(); BDD lenMatch = prefixLength.range(lower, upper); return lenMatch.and(prefixMatch); } TransferBDD(Graph g, Configuration conf, List<Statement> statements); }
TransferBDD { public static BDD isRelevantFor(BDDRoute record, PrefixRange range) { Prefix p = range.getPrefix(); BDD prefixMatch = firstBitsEqual(record.getPrefix().getBitvec(), p, p.getPrefixLength()); BDDInteger prefixLength = record.getPrefixLength(); SubRange r = range.getLengthRange(); int lower = r.getStart(); int upper = r.getEnd(); BDD lenMatch = prefixLength.range(lower, upper); return lenMatch.and(prefixMatch); } TransferBDD(Graph g, Configuration conf, List<Statement> statements); static BDD firstBitsEqual(BDD[] bits, Prefix p, int length); static BDD isRelevantFor(BDDRoute record, PrefixRange range); TransferResult compute(@Nullable Set<Prefix> ignoredNetworks); Map<CommunityVar, Set<Integer>> getCommunityAtomicPredicates(); Configuration getConfiguration(); Graph getGraph(); }
TransferBDD { public static BDD isRelevantFor(BDDRoute record, PrefixRange range) { Prefix p = range.getPrefix(); BDD prefixMatch = firstBitsEqual(record.getPrefix().getBitvec(), p, p.getPrefixLength()); BDDInteger prefixLength = record.getPrefixLength(); SubRange r = range.getLengthRange(); int lower = r.getStart(); int upper = r.getEnd(); BDD lenMatch = prefixLength.range(lower, upper); return lenMatch.and(prefixMatch); } TransferBDD(Graph g, Configuration conf, List<Statement> statements); static BDD firstBitsEqual(BDD[] bits, Prefix p, int length); static BDD isRelevantFor(BDDRoute record, PrefixRange range); TransferResult compute(@Nullable Set<Prefix> ignoredNetworks); Map<CommunityVar, Set<Integer>> getCommunityAtomicPredicates(); Configuration getConfiguration(); Graph getGraph();  }