anchor.diff:          AstCfgMap: Dictionary<ITreeNode, IControlFlowElement> }
   
   let rec build (cfgNode: IControlFlowElement) (varName: string) (state: BuildState) =
  -    let addNode treeNode label (state: BuildState) =
  +    let addNodeUsingFun treeNode label addFunc (state: BuildState) =
           let nodeId, provider' = NodeIdProviderFuncs.getId state.Provider treeNode
           let nodeInfo = { Label = label; AstElem = treeNode }
  -        let graph' = ImmutableDDGFuncs.addEdgeFrom state.Graph (nodeId, InnerNode(nodeInfo))
  +        let graph' = addFunc state.Graph nodeId (InnerNode(nodeInfo))
           nodeId, {state with Graph = graph'; Provider = provider'}
  +
  +    let addNode treeNode label (state: BuildState) =
  +        let addFun = ImmutableDDGFuncs.addNodeAndEdge
  +        addNodeUsingFun treeNode label addFun state
  +
  +    let addPreroot treeNode label (state: BuildState) =
  +        let addFun = ImmutableDDGFuncs.addPrerootAndEdge
  +        addNodeUsingFun treeNode label addFun state
   
       let setGraphConnectionNode nodeId (state: BuildState) =
           let graph' = { state.Graph with ConnectionNode = nodeId }
  
positive.code:             Graph = new AdjacencyGraph<int, Edge<int>>()
              NodeIdInfoDict = new Dictionary<int, DDNode>()
              ConnectionNode = finalNodeId
              FinalNode = finalNodeId }
          addNode ddGraph finalNodeId finalNodeInfo
  
      let addEdgeFrom (ddGraph: ImmutableDDG) (srcNodeId, srcNodeInfo) =
          let ddg = addNode ddGraph srcNodeId srcNodeInfo
          addEdge ddg srcNodeId ddg.ConnectionNode
  
      let merge (dstGraph: ImmutableDDG) (srcGraph: ImmutableDDG) =
          srcGraph.NodeIdInfoDict 
          |> List.ofSeq
          |> List.iter (fun entry -> dstGraph.NodeIdInfoDict.Add (entry.Key, entry.Value))
          dstGraph.Graph.AddEdgeRange srcGraph.Graph.Edges |> ignore
          addEdge dstGraph srcGraph.FinalNode dstGraph.ConnectionNode
  
      let toDot (ddGraph: ImmutableDDG) name path =
          use file = FileInfo(path).CreateText()
  
negative.code:     let graph = ImmutableDDGFuncs.create(finalNodeId, InnerNode(finalNodeInfo))
      let cfgNode = astCfgMap.[varRef]
      let initState = { Graph = graph; Provider = provider; AstCfgMap = astCfgMap }
      let resState = build cfgNode varName initState
      let root = RootNode
      let rootId = resState.Provider.NextId
      ImmutableDDGFuncs.foldPreroots resState.Graph rootId root