Exemplo n.º 1
0
 public MeetOverPaths(ControlFlowGraph controlFlowGraph,
                      ITransmissionFunction <TacNode> transmissionFunction,
                      ICollectionOperator <TacNode> collectionOperator,
                      HashSet <TacNode> initSet,
                      bool isForwardDirection = true
                      )
 {
     TransmissionFunction = transmissionFunction;
     ControlFlowGraph     = controlFlowGraph;
     CollectionOperator   = collectionOperator;
     IsForwardDirection   = isForwardDirection;
     InitSet = initSet;
     InOut   = new InOutContainer <TacNode>();
 }
Exemplo n.º 2
0
 protected IterationAlgorithm(
     ControlFlowGraph cfg,
     ITransmissionFunction func,
     bool forwardDirection = true)
 {
     controlFlowGraph   = cfg;
     TransmissionFunc   = func.Calculate;
     isForwardDirection = forwardDirection;
     if (forwardDirection)
     {
         GetPredVertices = x => controlFlowGraph.InEdges(x).Select(e => e.Source);
     }
     else
     {
         GetPredVertices = x => controlFlowGraph.OutEdges(x).Select(e => e.Target);
     }
 }