anchor.diff:          {env with map = Map.add id e env.map; reusable = l}, e
   
   // FIXME: handle 2-letter names
  -let optimizeContext env id =
  +let optimizeContext contextTable env id =
       let cid = char (1000 + int id)
  -    let newName = chooseIdent cid env.reusable
  +    let newName = chooseIdent contextTable cid env.reusable
       let l = env.reusable |> List.filter (fun x -> x.[0] <> newName.[0])
       {env with map = Map.add id newName env.map; reusable = l}, newName
   
  
positive.code: 
                                  (* ** Renamer ** *)
  
  // Environment for renamer
  // This object is useful to separate the AST walking from the renaming strategy.
  // Maybe we could use a single mutable object, instead of creating envs all the time.
  // TODO: create a real class.
  [<NoComparison; NoEquality>]
  type Env = {
      // Map from an old variable name to the new one.
      map: Map<Ident, Ident>
      // Used only for optimizeFrequency.
      max: int
      // Map from an old function name and function arity to the new name.
      fct: Map<Ident, Map<int, Ident>>
      // List of names that are still available.
      reusable: Ident list
      // Whether multiple functions can have the same name (but different arity).
      allowOverloading: bool
      // Function that decides a name (and returns the new Env).
      newId: Env -> Ident -> (Env * string)
      // Function called when we enter a function, optionally updates the Env.
      enterFunction: Env -> Stmt -> Env
      // Used only for alwaysNewName
      numberOfUsedIdents: int ref
  }
  
  let alwaysNewName env id =
      incr env.numberOfUsedIdents
      let newName = sprintf "%04d" !env.numberOfUsedIdents
      let env = {env with map = Map.add id newName env.map}
      env, newName
  
  let optimizeFrequency env id =
      match env.reusable with
      | [] -> // create a new variable
  
negative.code:         string(chars.[first]) + string(chars.[second])
  
  let computeContextTable text =
      let contextTable = new HashMultiMap<(char*char), int>(HashIdentity.Structural)
      Seq.pairwise text |> Seq.iter (fun (prev, next) ->
          match contextTable.TryFind (prev, next) with
          | Some n -> contextTable.[(prev, next)] <- n + 1
          | None -> contextTable.[(prev, next)] <- 1
      )
      contextTable
      //let chars, n = Seq.maxBy snd [for pair in contextTable -> pair.Key, pair.Value]
      //printfn "max occ: %A -> %d" chars n
  
  // /!\ This function is a performance bottleneck.
  let chooseIdent (contextTable: HashMultiMap<(char*char), int>) ident candidates =
      let allChars = [char 32 .. char 127] // printable chars
      let prevs = allChars |> Seq.choose (fun c ->
          match contextTable.TryFind (c, ident) with
  