anchor.diff:  
                   for notPushedPref in notPushedPrefs do
                       if not <| commonNonterms.Any(fun ast -> nonTermsAstToPrefixes.[ast].Any(fun astPrefix -> 
  +                                                                                                            let wasAstStarts = new ResizeArray<_>()
  +                                                                                                            wasAstStarts.Add(ast)
                                                                                                               let wasAst = new ResizeArray<_>()
  -                                                                                                            wasAst.Add(ast)
  -                                                                                                            isContainPref (Some ast) astPrefix (Some wasAst) None notPushedPref None))
  +                                                                                                            let wasFind = new ResizeArray<_>()
  +                                                                                                            isContainPref (Some ast) astPrefix (Some wasAstStarts) None notPushedPref None wasAst wasFind))
                       then
                           if not <| errorEdges.ContainsKey(e)
                               then
  
positive.code:         |Some old -> oldAst
          |None -> Some newAst
  
      let rec isContainPref (ast:AstNode option) (curAstPrefix:LabledPrefix<_>) (wasAstStarts:ResizeArray<AstNode> option) (findAst:AstNode option) (findPrefix:LabledPrefix<_>) (wasFindStarts:ResizeArray<AstNode> option) =    //to do
          if curAstPrefix = findPrefix    //bad compare
          then
              true
          else
              match (curAstPrefix, findPrefix) with
              |(Pref astPref, Pref findPref) ->
                  if astPref.Head = findPref.Head
                  then
                      findPref.Tail.All(fun findTail -> astPref.Tail.Any(fun astTail -> isContainPref ast astTail None findAst findTail None))
                  else
                      false
              |(Pref astPref, NontermStart (curFindAst, findAstPrefixes)) ->
                  let nextFindAst = getNewAst findAst curFindAst
                  match wasFindStarts with
                  |Some starts ->
                      if starts.Contains(curFindAst)
                      then
                          true
                      else
                          starts.Add(curFindAst)
                          findAstPrefixes.All(fun findAstPrefix -> isContainPref ast curAstPrefix wasAstStarts nextFindAst findAstPrefix wasFindStarts)
                  |None ->
                      let newWasFindStarts = new ResizeArray<_>()
                      newWasFindStarts.Add(curFindAst)
                      findAstPrefixes.All(fun findAstPrefix -> isContainPref ast curAstPrefix wasAstStarts nextFindAst findAstPrefix (Some newWasFindStarts))
              |(Pref astPref, NontermEnd (curFindAst, findAstPrefixes)) ->
                  match findAst with
                  |Some fast ->
                      if fast = curFindAst
                      then
                          findAstPrefixes.All(fun findAstPrefix -> isContainPref ast curAstPrefix None None findAstPrefix None)
                      else
                          true
                  |None ->
                      true
              |(Pref astPref, End) ->
                  false
              |(NontermStart (newAst, newAstPrefixes), Pref findPref) ->
                  let nextAst = getNewAst ast newAst
                  match wasAstStarts with
                  |Some starts ->
                      if starts.Contains(newAst)
                      then
                          false
                      else
                          starts.Add(newAst)
                          newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix wasAstStarts findAst findPrefix wasFindStarts)
                  |None ->
                      let newWasAstStarts = new ResizeArray<_>()
                      newWasAstStarts.Add(newAst)
                      newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix (Some newWasAstStarts) findAst findPrefix wasFindStarts)
              |(NontermStart (newAst, newAstPrefixes), NontermStart (curFindAst, findAstPrefixes)) ->
                  let nextFindAst = getNewAst findAst curFindAst
                  let nextAst = getNewAst ast newAst
                  match (wasAstStarts, wasFindStarts) with
                  |(Some astStarts, Some findStarts) ->
                      if findStarts.Contains(curFindAst)
                      then
                          true
                      else
                          if astStarts.Contains(newAst)
                          then
                              false
                          else
                              findStarts.Add(curFindAst)
                              astStarts.Add(newAst)
                              findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix wasAstStarts nextFindAst findAstPrefix wasFindStarts))
                  |(Some astStarts, None) ->
                      if astStarts.Contains(newAst)
                      then
                          false
                      else
                          astStarts.Add(newAst)
                          let newWasFindStarts = new ResizeArray<_>()
                          newWasFindStarts.Add(curFindAst)
                          findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix wasAstStarts nextFindAst findAstPrefix (Some newWasFindStarts)))
                  |(None, Some findStarts) ->
                      if findStarts.Contains(curFindAst)
                      then
                          true
                      else
                          findStarts.Add(curFindAst)
                          let newWasAstStarts = new ResizeArray<_>()
                          newWasAstStarts.Add(newAst)
                          findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix (Some newWasAstStarts) nextFindAst findAstPrefix wasFindStarts))
  
                  |(None, None) ->
                      let newWasFindStarts = new ResizeArray<_>()
                      newWasFindStarts.Add(curFindAst)
                      let newWasAstStarts = new ResizeArray<_>()
                      newWasAstStarts.Add(newAst)
                      findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix (Some newWasAstStarts) nextFindAst findAstPrefix (Some newWasFindStarts)))
              |(NontermStart (newAst, newAstPrefixes), NontermEnd (curFindAst, findAstPrefixes)) ->
                  let nextAst = getNewAst ast newAst
                  match findAst with
                  |Some fast ->
                      if fast = curFindAst
                      then
                          match wasAstStarts with
                          |Some starts ->
                              if starts.Contains(newAst)
                              then
                                  false
                              else
                                  starts.Add(newAst)
                                  findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix wasAstStarts None findAstPrefix wasFindStarts))
                          |None ->
                              let newWasAstStarts = new ResizeArray<_>()
                              newWasAstStarts.Add(newAst)
                              findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref nextAst newAstPrefix (Some newWasAstStarts) None findAstPrefix wasFindStarts))
                      else 
                          true
                  |None ->
                      true
              |(NontermStart (newAst, newAstPrefixes), End) ->
                  false //can newAst contain empty path?
              |(NontermEnd (newAst, newAstPrefixes), Pref findPref) ->
                  match ast with
                  |Some xast ->
                      if xast = newAst
                      then
                          newAstPrefixes.Any(fun newAstPrefix -> isContainPref None newAstPrefix None findAst findPrefix None)
                      else
                          false
                  |None ->
                      false
              |(NontermEnd (newAst, newAstPrefixes), NontermStart (curFindAst, findAstPrefixes)) ->
                  let nextFindAst = getNewAst findAst curFindAst
                  match ast with
                  |Some xast ->
                      if xast = newAst
                      then
                          match wasFindStarts with
                          |Some starts ->
                              if starts.Contains(curFindAst)
                              then
                                  true
                              else
                                  starts.Add(curFindAst)
                                  findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref None newAstPrefix wasAstStarts nextFindAst findAstPrefix wasFindStarts))
                          |None ->
                              let newWasFindStarts = new ResizeArray<_>()
                              newWasFindStarts.Add(curFindAst)
                              findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref None newAstPrefix wasAstStarts nextFindAst findAstPrefix (Some newWasFindStarts)))
                      else
                          false
                  |None ->
                      false
              |(NontermEnd (newAst, newAstPrefixes), NontermEnd (curFindAst, findAstPrefixes)) ->
                  match (ast, findAst) with
                  |(Some xast, Some fast) ->
                      if xast = newAst
                      then
                          if fast = curFindAst
                          then
                              findAstPrefixes.All(fun findAstPrefix -> newAstPrefixes.Any(fun newAstPrefix -> isContainPref None newAstPrefix None None findAstPrefix None))
                          else
                              true
                      else
                          if fast = curFindAst
                          then
                              false
                          else
                              true
  
                  |(Some xast, None) ->
                      true
                  |(None, Some fast) ->
                      if fast = curFindAst
                      then
                          false
                      else
                          true
                  |(None , None) ->
                      true
              |(NontermEnd (newAst, newAstPrefixes), End) ->
                  match ast with
                  |Some xast ->
                      if xast = newAst
                      then
                          newAstPrefixes.Contains(End)
                      else
                          false
                  |None ->
                      false
              |(End, Pref findPref) ->
                  false
              |(End, NontermStart (curFindAst, findAstPrefixes)) ->
                  match wasFindStarts with
                  |Some starts ->
                      if starts.Contains(curFindAst)
                      then
                          true
                      else
                          false   //can curFindAst contain empty path?
                  |None ->
                      false   //can curFindAst contain empty path?
              |(End, NontermEnd (curFindAst, findAstPrefixes)) ->
                  match findAst with
                  |Some fast ->
                      if fast = curFindAst
                      then
                          findAstPrefixes.Contains(End)
                      else
                          true
                  |None ->
                      true
              |(End, End) ->
                  true
  
      let collectErrors (starts:ResizeArray<VInfo<_>>)=
          let was = new ResizeArray<_>()
  
negative.code:             dfs(v)
  
          for e in innerGraph.Edges |> Seq.filter (fun e -> e.Target = finalV) do
              let accPrefs = new ResizeArray<_>()
              let notAccPrefs = new ResizeArray<_>()
              let accNonterms = new ResizeArray<AstNode>()
  