anchor.diff:              printfn "%s" (externalToString rulesIndexMap ext)
               newState
             )  
  -
  -  printfn "final exp: %s" (ccodegen.prettyprint (fst finalProg))
  +  let (finalProgRoot, _, _) = finalProg
  +  printfn "final exp: %s" (ccodegen.prettyprint finalProgRoot)
   
     best
   
  
positive.code:   | _  -> p @ [nextMove]
  
  let stepProg (prog: ProgramState) (step: Step): ProgramState = 
    let (e, pos) = prog
    match step with 
    | StepMove(m) -> 
      let (_, moves) = stateToMoves prog
      let moves' = movesUpdate moves m
      movesToState (e, moves')
    | StepRule(r) ->
      applyRuleAtParticularPosition e (pos, r), pos
  
  let deltaPos (p1: Move list) (p2: Move list): Move list = 
    let rec commonPrefix l1 l2 = 
  
negative.code:  
    let rulesIndexMap = rs |> List.mapi (fun x y -> snd y, x) |> Map.ofList
    //printfn ">> %A" (stateToExternal rs (e, 0))
    printfn "%s" (externalToString rulesIndexMap (stateToExternal rs (e, Some(e), 0)))
    let finalProg = 
      ((e, Some(e), 0), steps)
        ||> List.fold (fun (exp, sexp, pos) step ->
              let newState = stepProg (exp, sexp, pos) step
              let ext = stateToExternal rs newState
              //printfn "<< %A" step
              //printfn ">> %A" ext
  