anchor.diff:  
   //--Преобразование в КНФ---------------------------------------------------------------------------
   
  +let cnf rules =    
  +    let i = ref 0
  +    let list2 = ref []
  +    let rec newRule (rule: Rule.t<_, _>) =  
  +        let elements = match rule.body with PSeq(e, a, l) -> e | x -> [] 
  +        let addRule elem1 elem2 =
  +            incr i
  +            list2 :=
  +                [{
  +                    name = Source.t("newCnfRule" + (!i).ToString())
  +                    args = rule.args
  +                    _public = false
  +                    metaArgs = rule.metaArgs 
  +                    body = PSeq([elem1; elem2], None, None)
  +                }] @ !list2
  +            "newCnfRule" + (!i).ToString()
  +        let cutRule = 
  +            if elements.Length > 2 then
  +                ((elements |> List.rev).Tail.Tail |> List.rev) @ 
  +                    [{
  +                        omit = false
  +                        rule = PRef(Source.t(addRule elements.[elements.Length - 2] elements.[elements.Length - 1]), None)
  +                        binding = None
  +                        checker = None
  +                    }]
  +            else []       
  +        if elements.Length > 2 then
  +            newRule 
  +                {
  +                    name = rule.name
  +                    args = rule.args
  +                    _public = rule._public
  +                    metaArgs = rule.metaArgs
  +                    body = PSeq(cutRule, 
  +                            (match rule.body with PSeq(e, a, l) -> a | x -> None),
  +                            (match rule.body with PSeq(e, a, l) -> l | x -> None))
  +                }
  +        else 
  +            [rule]
  +
  +    ( rules |> List.collect (fun rule -> newRule rule) ) @ !list2
  +
  +
   let toCNF (ruleList: Rule.t<_, _> list) = 
  -
  -    let cnf rules =    
  -        let i = ref 0
  -        let list2 = ref []
  -        let rec newRule (rule: Rule.t<_, _>) =  
  -            let elements = match rule.body with PSeq(e, a, l) -> e | x -> [] 
  -            let addRule elem1 elem2 =
  -                incr i
  -                list2 :=
  -                    [{
  -                        name = Source.t("newCnfRule" + (!i).ToString())
  -                        args = rule.args
  -                        _public = false
  -                        metaArgs = rule.metaArgs 
  -                        body = PSeq([elem1; elem2], None, None)
  -                    }] @ !list2
  -                "newCnfRule" + (!i).ToString()
  -            let cutRule = 
  -                if elements.Length > 2 then
  -                    ((elements |> List.rev).Tail.Tail |> List.rev) @ 
  -                        [{
  -                            omit = false
  -                            rule = PRef(Source.t(addRule elements.[elements.Length - 2] elements.[elements.Length - 1]), None)
  -                            binding = None
  -                            checker = None
  -                        }]
  -                else []       
  -            if elements.Length > 2 then
  -                newRule 
  -                    {
  -                        name = rule.name
  -                        args = rule.args
  -                        _public = rule._public
  -                        metaArgs = rule.metaArgs
  -                        body = PSeq(cutRule, 
  -                                (match rule.body with PSeq(e, a, l) -> a | x -> None),
  -                                (match rule.body with PSeq(e, a, l) -> l | x -> None))
  -                    }
  -            else 
  -                [rule]
  -
  -        ( rules |> List.collect (fun rule -> newRule rule) ) @ !list2
  -
       ruleList
       |> cnf
       |> deleteEpsRule
       |> deleteChainRule
       |> renameTerm
   
  +type CNF() = 
  +    inherit Convertion()
  +        override this.Name = "CNF"
  +        override this.ConvertList (ruleList,_) = cnf ruleList
  +        override this.EliminatedProductionTypes = [""]
  +
   type ToCNF() = 
       inherit Convertion()
           override this.Name = "ToCNF"
  
positive.code:                 newRule rule (epsInRule elements) @ [rule]
              |x -> []
          )
  
  //--Функция для удаления цепных правил-------------------------------------------------------------
                  
  
negative.code:                             }]
                          |x -> [elem]
                      )
              let numberBody =
                  match rule.body with
                  |PSeq(elements, _, _) -> 
                      PSeq(newBody elements, ac, lbl)
  