anchor.diff:  
               this.FilterChildren handleChildren
   
  -    member this.FindNonterminalsByInd nonterminal (leftSide : array<int>) =
  -        order |> Array.filter (fun x -> nonterminal = leftSide.[x.first.prod])
  -
  -    member this.FindNonterminalsByString nonterminal (leftSide : array<int>) (numToString : int -> string) =
  -        let nontermInd = leftSide |> Array.tryFind (fun x -> String.Equals (numToString x, nonterminal))
  +    member this.FindNonterminalsByInd nonterminal =
  +        order |> Array.filter (checkAstIsGivenNonterminal nonterminal)
  +
  +    member this.FindNonterminalsByString nonterminal =
  +        let nontermInd = getNonterminalIndex nonterminal
           match nontermInd with
  -        | Some n -> this.FindNonterminalsByInd n leftSide
  +        | Some n -> this.FindNonterminalsByInd n
           | None -> [||]
      
  -    member this.GetTypeOfExpression nonterminals (leftSide : array<int>) (numToString : int -> string) =
  +    member this.GetTypeOfExpression nonterminals =
           let visited = new Dictionary<_,_>()
           let nonterminalsInd = 
               nonterminals 
  -            |> Array.map (fun n -> leftSide |> Array.find (fun x -> String.Equals (numToString x, n)))
  +            |> Array.choose getNonterminalIndex
           
           let isWanted (f : Family) =
  -            Array.exists (fun x -> x = leftSide.[f.prod]) nonterminalsInd
  +            Array.exists (fun x -> checkFamilyIsGivenNonterminal x f) nonterminalsInd
           
           let rec find (node : AstNode) = 
               if not <| visited.ContainsKey(node)
  
positive.code:                 | :? AST as ast -> 
                      let wanted = ast.filterFamilies isWanted
                      if wanted <> null && wanted.Count > 0
                      then Array.init wanted.Count (fun i -> numToString(leftSide.[wanted.[i].prod]))
                      else 
                          let res = new ResizeArray<_>()
                          ast.doForAllFamilies (fun x -> x.nodes.doForAll (fun y -> res.AddRange(find y)))
  
negative.code:                     | :? Terminal -> None
                      | :? Epsilon -> None
                      | :? AST as ast -> 
                          let inc = if checkAstIsGivenNonterminal nontermInd ast then 1 else 0
                          let statistics = 
                              ast.map(fun f -> 
                                          f.nodes.map (fun a -> let prev = count a
                                                                let updated = 
                                                                    match prev with 
                                                                    | Some (max, min, ave) -> Some (max + inc, min + inc, ave + double inc)
                                                                    | _ -> None
                                                                updated)
                                          |> calculateStat)
                              |> calculateStat
                          if statistics.IsNone 
                          then 
                              Some (inc, inc, double inc) 
                          else statistics 
                      | _ -> failwith "Unexpected AstNode"
                  remembered.Add(node, stat)
                  stat
  
          (count this.Root).Value
  
      /// handleCycleNode is used for handling nodes, contained in cycles
      ///   and having no children family, where each node has smaller position.
  