anchor.diff:          let env = {env with varRenames = Map.add id newName env.varRenames}
           env, newName
   
  -    // TODO: expose this renaming strategy
  -    let optimizeFrequency env id =
  -        match env.reusableNames with
  -        | [] -> // create a new variable
  -            let newName = sprintf "%04d" env.nextID
  -            let env = {env with varRenames = Map.add id newName env.varRenames; nextID = env.nextID + 1}
  -            env, newName
  -        | e::l -> // reuse a variable name
  -            {env with varRenames = Map.add id e env.varRenames; reusableNames = l}, e
  -
       // FIXME: handle 2-letter names
       let optimizeContext contextTable env id =
           let cid = char (1000 + int id)
  -        let newName = chooseIdent contextTable cid env.reusableNames
  -        let l = env.reusableNames |> List.filter (fun x -> x <> newName)
  -        {env with varRenames = Map.add id newName env.varRenames; reusableNames = l}, newName
  +        let newName = chooseIdent contextTable cid env.availableNames
  +        let l = env.availableNames |> List.filter (fun x -> x <> newName)
  +        {env with varRenames = Map.add id newName env.varRenames; availableNames = l}, newName
   
       let dontRename env name =
  -        let names = env.reusableNames |> List.filter ((<>) name)
  -        {env with varRenames = env.varRenames.Add(name, name); reusableNames = names}
  +        let names = env.availableNames |> List.filter ((<>) name)
  +        {env with varRenames = env.varRenames.Add(name, name); availableNames = names}
   
       let dontRenameList env names =
           let mutable env = env
  
positive.code:         varRenames: Map<Ident, Ident>
          // Map from a new function name and function arity to the old name.
          funRenames: Map<Ident, Map<int, Ident>>
          // List of names that are still available after having been used before.
          reusableNames: Ident list
  
          // Used only for optimizeFrequency.
          nextID: int
  
          // Whether multiple functions can have the same name (but different arity).
          allowOverloading: bool
  
negative.code:         onEnterFunction: Env -> Stmt -> Env
      }
      with
          static member Create(availableNames, allowOverloading, newName, onEnterFunction) = {
              varRenames = Map.empty
              funRenames = Map.empty
              availableNames = availableNames
              allowOverloading = allowOverloading
              newName = newName
              onEnterFunction = onEnterFunction
  