@Test public void testEnterCycle() { Edge edge1 = new Edge(STATE1, STATE2, CONSTRAINT0); Edge edge2 = new Edge(STATE2, STATE3, CONSTRAINT1); Edge edge3 = new Edge(STATE3, STATE1, CONSTRAINT2); Edge edge4 = new Edge(STATE4, STATE1, CONSTRAINT3); assertThat( optimize( ImmutableSet.of(edge1, edge2, edge3, edge4), ImmutableSet.of(STATE4, STATE2), false), containsInAnyOrder( new Edge(STATE4, STATE1, CONSTRAINT3), new Edge(STATE1, STATE2, CONSTRAINT0), new Edge(STATE2, STATE1, constraint(BDD1.and(BDD2))))); }
public static Collection<Edge> optimize( Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops) { BDDReachabilityGraphOptimizer opt = new BDDReachabilityGraphOptimizer(edges, statesToKeep, keepSelfLoops); opt.optimize(); return opt._edges.cellSet().stream() .map(cell -> new Edge(cell.getRowKey(), cell.getColumnKey(), cell.getValue())) .collect(ImmutableList.toImmutableList()); }
BDDReachabilityGraphOptimizer { public static Collection<Edge> optimize( Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops) { BDDReachabilityGraphOptimizer opt = new BDDReachabilityGraphOptimizer(edges, statesToKeep, keepSelfLoops); opt.optimize(); return opt._edges.cellSet().stream() .map(cell -> new Edge(cell.getRowKey(), cell.getColumnKey(), cell.getValue())) .collect(ImmutableList.toImmutableList()); } }
BDDReachabilityGraphOptimizer { public static Collection<Edge> optimize( Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops) { BDDReachabilityGraphOptimizer opt = new BDDReachabilityGraphOptimizer(edges, statesToKeep, keepSelfLoops); opt.optimize(); return opt._edges.cellSet().stream() .map(cell -> new Edge(cell.getRowKey(), cell.getColumnKey(), cell.getValue())) .collect(ImmutableList.toImmutableList()); } private  BDDReachabilityGraphOptimizer(
      Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops); }
BDDReachabilityGraphOptimizer { public static Collection<Edge> optimize( Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops) { BDDReachabilityGraphOptimizer opt = new BDDReachabilityGraphOptimizer(edges, statesToKeep, keepSelfLoops); opt.optimize(); return opt._edges.cellSet().stream() .map(cell -> new Edge(cell.getRowKey(), cell.getColumnKey(), cell.getValue())) .collect(ImmutableList.toImmutableList()); } private  BDDReachabilityGraphOptimizer(
      Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops); static Collection<Edge> optimize(
      Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops); }
BDDReachabilityGraphOptimizer { public static Collection<Edge> optimize( Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops) { BDDReachabilityGraphOptimizer opt = new BDDReachabilityGraphOptimizer(edges, statesToKeep, keepSelfLoops); opt.optimize(); return opt._edges.cellSet().stream() .map(cell -> new Edge(cell.getRowKey(), cell.getColumnKey(), cell.getValue())) .collect(ImmutableList.toImmutableList()); } private  BDDReachabilityGraphOptimizer(
      Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops); static Collection<Edge> optimize(
      Collection<Edge> edges, Set<StateExpr> statesToKeep, boolean keepSelfLoops);  }