public void addDeferredInvocation(DeferredInvocation di, DFG functionGraph, List <List <Identifier> > sources) { // create invocation node //DFGNode dfgni = new DFGNode(invc); Guid subgraphId = Guid.NewGuid(); //addNode(dfgni); // add the copied graph nodes to this graph foreach (DFGNode dfgn in functionGraph.nodes) { dfgn.subGraphId = subgraphId; addNode(dfgn); } // hook up the return node to the invocation node //functionGraph.returnNode.addEdge(dfgni); //if (functionGraph.returnNode == null) //{ // functionGraph.returnNode //} functionGraph.returnNode.addEdge(di.invocationNode); // hook up actual args to formal args for (int i = 0; i < sources.Count; i++) { List <Identifier> paramSources = sources[i]; foreach (Identifier ident in paramSources) { DFGNode source = _findNode(ident); source.addEdge(functionGraph._formalParams[i]); } } }
public void visitDeferredInvocation(DeferredInvocation di) { Invocation i = di.invocation; DFG fdfg = _getGraph(i, di.inComponent); //fdfg.high = _dfg.high; //fdfg.low = _dfg.low; if (_isVerification) { fdfg.replaceHigh(_dfg.high); fdfg.replaceLow(_dfg.low); } //foreach (DFGNode n in fdfg.nodes) //{ // if (n.parents.Contains(fdfg.high)) // { // fdfg.high.addEdge(n); // } // else if (n.parents.Contains(fdfg.low)) // { // fdfg.low.addEdge(n); // } //} fdfg.resetIds(); i.expressionList.accept(this); _dfg.addDeferredInvocation(di, fdfg, _exprList); }