Commit 579437b8 authored by Pietro Abate's avatar Pietro Abate

[r2005-06-13 15:25:20 by afrisch] Simplifications

Original author: afrisch
Date: 2005-06-13 15:25:20+00:00
parent 58c7c621
......@@ -918,10 +918,10 @@ module Normal = struct
let vs_nil = facto Factorize.nil t0 xs pl in
(vs_var,vs_nil,(pl,t,xs))
let normal f l t pl xs =
let normal l t pl xs =
let a = nconstr l t in
let vs_var = facto Factorize.var t xs pl in
(* let vs_var = facto Factorize.var t xs pl in
let xs = IdSet.diff xs vs_var in
let vs_var,a =
if f then vs_var,a
......@@ -937,16 +937,13 @@ module Normal = struct
IdSet.empty,
List.fold_left
(fun a x -> ncap a (nconstant l x Sequence.nil_cst)) a vs_nil in
*)
vs_var,vs_nil,
List.fold_left (fun a p -> ncap a (nnormal l (descr p) xs)) a pl
let nnf facto lab t0 (pl,t,xs) =
let t =
if Types.subtype t t0 then t else Types.cap t t0 in
(* let ppf = Format.std_formatter in
Format.fprintf ppf "normal nnf=%a@." Nnf.print (pl,t,xs); *)
normal facto lab t (NodeSet.get pl) xs
let nnf lab t0 (pl,t,xs) =
let t = if Types.subtype t t0 then t else Types.cap t t0 in
normal lab t (NodeSet.get pl) xs
(*
......@@ -1416,10 +1413,7 @@ struct
match disp.actions with
| Some a -> a
| None ->
let pl =
Array.map
(fun n -> let _,_,p = Normal.nnf false disp.label disp.t n in p)
disp.pl in
let pl = Array.map (Normal.nnf disp.label disp.t) disp.pl in
let a = combine_kind
(dispatch_basic disp pl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment