anchor.diff:                          for family in children.other do
                               handle family
           res.ToArray()
  +    
  +    let checkFamilyIsGivenNonterminal nonterminalInd (family : Family) = 
  +        match leftSide with 
  +        | None -> failwith "leftSide is not specified"
  +        | Some ls -> nonterminalInd = ls.[family.prod]
  +
  +    let checkAstIsGivenNonterminal nonterminalInd (ast : AST) = 
  +        let arr = ast.map <| checkFamilyIsGivenNonterminal nonterminalInd
  +        let isAllFamiliesOfOneNonterm = 
  +            match arr.Length with
  +            | 0 -> failwith "No families in ast"
  +            | _ -> Array.forall (fun x -> x = arr.[0]) arr
  +        match isAllFamiliesOfOneNonterm with
  +        | false -> failwith "SPPF is incorrect!" 
  +        | true -> arr.[0]
  +
  +    let getNonterminalIndex nonterminal =
  +        match numToString with
  +        | None -> failwith "numToString is not specified"
  +        | Some nts ->
  +            match leftSide with 
  +            | None -> failwith "leftSide is not specified"
  +            | Some ls -> ls |> Array.tryFind (fun x -> String.Equals (nts x, nonterminal))
  +
  +    let getNonterminalIndexValue nonterminal = 
  +        match getNonterminalIndex nonterminal with 
  +        | None -> failwith <| sprintf "The grammar does not contain nonterminal %s" nonterminal
  +        | Some ind -> ind
  +
  +    let getNonterminalStringByProd prod =
  +        match numToString with
  +        | None -> failwith "numToString is not specified"
  +        | Some nts ->
  +            match leftSide with 
  +            | None -> failwith "leftSide is not specified"
  +            | Some ls -> nts <| ls.[prod]
  +
  +    new (tokens : array<'TokenType>, root : AstNode, rules : int[][]) =
  +        Tree<'TokenType>(tokens, root, rules, None, None)
   
       member this.Order = order
       member this.Root = root
  
positive.code: 
          find root
  
      member this.CalculateStatistics nonterminal (leftSide : array<int>) (numToString : int -> string) =
          let remembered = new Dictionary<AstNode, (int * int * double) option>()
  
          let nontermInd =
              leftSide |> Array.find (fun x -> String.Equals (numToString x, nonterminal))
  
          let calculateStat (arr : ((int * int * double) option)[]) =
              let filtered = arr |> Array.filter (fun x -> x.IsSome)
  
              if filtered.Length = 0
              then None
              elif filtered.Length = 1
              then filtered.[0]
              else
                  let curMax = ref System.Int32.MinValue
                  let curMin = ref System.Int32.MaxValue
                  let curSum = ref 0.0
  
                  for a in filtered do
                      match a with 
                      | Some (max, min, ave) -> 
                          if max > !curMax then curMax := max
                          if min < !curMin then curMin := min
                          curSum := !curSum + ave
                      | None -> failwith "Seems that Array.filter does not work"
                  Some (!curMax, !curMin, (!curSum / double filtered.Length))
  
          let rec count (node : AstNode) : (int * int * double) option = 
  
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.
  