@Test public void testLoopWithConstraint() { BDD dst1 = PKT.getDstIpSpaceToBDD().toBDD(Prefix.parse("128.0.0.0/1")); ImmutableTable<StateExpr, StateExpr, Transition> table = ImmutableTable.<StateExpr, StateExpr, Transition>builder() .put(A, B, IDENTITY) .put(B, A, constraint(dst1)) .build(); List<BDDTrace> traces = BDDTracer.getTraces(table, A, ONE); assertThat( traces, containsInAnyOrder( trace(TERMINATED, hop(A), hop(B), hop(B, dst1.not())), trace(LOOPED, hop(A), hop(B), hop(A, dst1)))); }
public static List<BDDTrace> getTraces( Table<StateExpr, StateExpr, Transition> reachabilityGraph, StateExpr initialState, BDD initialBdd) { ImmutableList.Builder<BDDTrace> traces = ImmutableList.builder(); new BDDTracer(reachabilityGraph, traces::add).generateTraces(initialState, initialBdd); return traces.build(); }
BDDTracer { public static List<BDDTrace> getTraces( Table<StateExpr, StateExpr, Transition> reachabilityGraph, StateExpr initialState, BDD initialBdd) { ImmutableList.Builder<BDDTrace> traces = ImmutableList.builder(); new BDDTracer(reachabilityGraph, traces::add).generateTraces(initialState, initialBdd); return traces.build(); } }
BDDTracer { public static List<BDDTrace> getTraces( Table<StateExpr, StateExpr, Transition> reachabilityGraph, StateExpr initialState, BDD initialBdd) { ImmutableList.Builder<BDDTrace> traces = ImmutableList.builder(); new BDDTracer(reachabilityGraph, traces::add).generateTraces(initialState, initialBdd); return traces.build(); } BDDTracer(
      Table<StateExpr, StateExpr, Transition> reachabilityGraph, Consumer<BDDTrace> traces); }
BDDTracer { public static List<BDDTrace> getTraces( Table<StateExpr, StateExpr, Transition> reachabilityGraph, StateExpr initialState, BDD initialBdd) { ImmutableList.Builder<BDDTrace> traces = ImmutableList.builder(); new BDDTracer(reachabilityGraph, traces::add).generateTraces(initialState, initialBdd); return traces.build(); } BDDTracer(
      Table<StateExpr, StateExpr, Transition> reachabilityGraph, Consumer<BDDTrace> traces); static List<BDDTrace> getTraces(
      Table<StateExpr, StateExpr, Transition> reachabilityGraph,
      StateExpr initialState,
      BDD initialBdd); }
BDDTracer { public static List<BDDTrace> getTraces( Table<StateExpr, StateExpr, Transition> reachabilityGraph, StateExpr initialState, BDD initialBdd) { ImmutableList.Builder<BDDTrace> traces = ImmutableList.builder(); new BDDTracer(reachabilityGraph, traces::add).generateTraces(initialState, initialBdd); return traces.build(); } BDDTracer(
      Table<StateExpr, StateExpr, Transition> reachabilityGraph, Consumer<BDDTrace> traces); static List<BDDTrace> getTraces(
      Table<StateExpr, StateExpr, Transition> reachabilityGraph,
      StateExpr initialState,
      BDD initialBdd);  }