anchor.diff:                    routerToEsb <- cbgpExport pi routerToEsb peer acts
                     routerToEsb <- addRuleToPeer peer routerToEsb exitStr
   
  -let getCBGPConfig (config : T) (vertex: CGraph.CgState) (routerNameToIp : Map<String, String>) =
  +let getCBGPConfig (config : T) (vertex: CGraph.CgState) (routerNameToIp : Map<string, string>) =
     let routerConfig = Map.find vertex.Node.Loc config.RConfigs
     let ti = config.PolInfo.Ast.TopoInfo
     let routerName = Topology.router vertex.Node.Loc ti
  
positive.code:       for f in fs do
           i <- i + 1
           match f with
           | Deny -> let denystr = "\n        add-rule" +
            "\n            match \"prefix in " + predStr + "\"" +
            "\n            action deny" + exitStr
            Map.map (fun k v -> bprintf v denystr) routerToEsb
           | Allow((m, lp), es) -> 
              let comm = 23768 - i
              routerToIsb <- cbgpImport pi routerToISb (m, lp) comm predStr
              let matchStr = sprintf ("\n        add-rule" +
            "\n            match \"community is %d\"") comm
              match es with
              | [ (peer, acts) ] -> 
                routerToEsb <- addRuleToPeer peer routerToEsb matchStr
  
negative.code:       bprintf sb "\n\n"
     sb.ToString()
  
   let addRuleToPeer peer routerTosb (actStr : string) = 
    let updateRule k (v : System.Text.StringBuilder) = v.Append actStr 
  
    // update dictionary
    let newmap = 
      match peer with
      | Any -> Map.map updateRule routerTosb
      | In -> routerTosb// what is to be done
      | Out -> routerTosb //what is to be done
      | Router x -> 
        let v = Map.find x routerTosb
        Map.add x (v.Append actStr)  routerTosb
    newmap
  
  let cbgpExport pi routerTosb peer acts = 
     let cbgpString a = 
      match a with 
      | SetComm(is) -> sprintf "\n            action \"community add %s\"" is
      | SetMed i -> sprintf "\n            action \"metric %d\"" i
      | PrependPath i -> sprintf "\n            action \"as-path prepend %d\"" i
     let actStr = 
        if acts <> [] then Util.List.joinBy " " (List.map cbgpString acts)
        else "\n            allow"
  