anchor.diff:      let glueNames { InEdge.Name = a } { OutEdge.Name = b } =
           String.concat "__" [ a ; b ]
   
  +    /// <summary>
  +    ///     Decides whether a command is local.
  +    /// </summary>
  +    /// <param name="tVars">
  +    ///     A <c>VarMap</c> of thread-local variables.
  +    /// </param>
  +    /// <returns>
  +    ///     A function returning True only if (but not necessarily if)
  +    ///     the given command is local (uses only local variables).
  +    /// </returns>
  +    let isLocalCommand tVars : Command -> bool =
  +        // A command is local if, for all of its funcs...
  +        List.forall
  +            (fun { Params = ps } ->
  +                 // ...for all of the parameters in said funcs...
  +                 Seq.forall
  +                     (// ...for all of the variables in said parameters...
  +                      varsIn
  +                      >> Set.toSeq
  +                      >> Seq.forall
  +                             (// ...the variable is thread-local.
  +                              fun c ->
  +                                  match (Map.tryFind (stripMark c) tVars) with
  +                                  | Some _ -> true
  +                                  | _ -> false))
  +                     ps)
   
       /// <summary>
       ///     Removes a node if it is an ITE-guarded view.
  
positive.code:                     else (removed, g, Some nName)
                  | _ -> (removed, g, Some nName)
  
  
      /// <summary>
      ///     Performs a node-wise optimisation on every node in the graph.
  
negative.code:         // TODO(CaptainHayashi): Use the model for something.
          onNodes (Utils.optimiseWith optR optA verbose
                       [ ("graph-collapse-nops", true, collapseNops)
                         ("graph-collapse-ites", true, collapseITEs)
                         ("x-graph-drop-local-midview",
                          false,
                          dropLocalMidView model.Locals) ] )
  
      /// <summary>
      ///     Optimises a model over graphs.
  