@Test public void testInsufficientInfo() { StateExpr stateExpr = new NodeInterfaceInsufficientInfo("NODE", "IFACE"); BidirectionalReachabilityReturnPassInstrumentation instrumentation = new BidirectionalReachabilityReturnPassInstrumentation( ImmutableMap.of(stateExpr, _constraint)); Edge origEdge = new Edge(stateExpr, Query.INSTANCE); Edge newEdge = new Edge(stateExpr, Query.INSTANCE, _constraint.not()); assertEquals(instrumentation.instrumentReturnPassEdge(origEdge), newEdge); }
Edge instrumentReturnPassEdge(Edge edge) { StateExpr preState = edge.getPreState(); if (!(preState instanceof NodeInterfaceInsufficientInfo || preState instanceof NodeInterfaceNeighborUnreachable)) { return edge; } BDD successFlows = _returnPassSuccessConstraints.get(preState); if (successFlows == null) { return edge; } return new Edge( preState, edge.getPostState(), compose(edge.getTransition(), constraint(successFlows.not()))); }
BidirectionalReachabilityReturnPassInstrumentation { Edge instrumentReturnPassEdge(Edge edge) { StateExpr preState = edge.getPreState(); if (!(preState instanceof NodeInterfaceInsufficientInfo || preState instanceof NodeInterfaceNeighborUnreachable)) { return edge; } BDD successFlows = _returnPassSuccessConstraints.get(preState); if (successFlows == null) { return edge; } return new Edge( preState, edge.getPostState(), compose(edge.getTransition(), constraint(successFlows.not()))); } }
BidirectionalReachabilityReturnPassInstrumentation { Edge instrumentReturnPassEdge(Edge edge) { StateExpr preState = edge.getPreState(); if (!(preState instanceof NodeInterfaceInsufficientInfo || preState instanceof NodeInterfaceNeighborUnreachable)) { return edge; } BDD successFlows = _returnPassSuccessConstraints.get(preState); if (successFlows == null) { return edge; } return new Edge( preState, edge.getPostState(), compose(edge.getTransition(), constraint(successFlows.not()))); } BidirectionalReachabilityReturnPassInstrumentation(
      Map<StateExpr, BDD> returnPassSuccessConstraints); }
BidirectionalReachabilityReturnPassInstrumentation { Edge instrumentReturnPassEdge(Edge edge) { StateExpr preState = edge.getPreState(); if (!(preState instanceof NodeInterfaceInsufficientInfo || preState instanceof NodeInterfaceNeighborUnreachable)) { return edge; } BDD successFlows = _returnPassSuccessConstraints.get(preState); if (successFlows == null) { return edge; } return new Edge( preState, edge.getPostState(), compose(edge.getTransition(), constraint(successFlows.not()))); } BidirectionalReachabilityReturnPassInstrumentation(
      Map<StateExpr, BDD> returnPassSuccessConstraints);  }
BidirectionalReachabilityReturnPassInstrumentation { Edge instrumentReturnPassEdge(Edge edge) { StateExpr preState = edge.getPreState(); if (!(preState instanceof NodeInterfaceInsufficientInfo || preState instanceof NodeInterfaceNeighborUnreachable)) { return edge; } BDD successFlows = _returnPassSuccessConstraints.get(preState); if (successFlows == null) { return edge; } return new Edge( preState, edge.getPostState(), compose(edge.getTransition(), constraint(successFlows.not()))); } BidirectionalReachabilityReturnPassInstrumentation(
      Map<StateExpr, BDD> returnPassSuccessConstraints);   }