Commit 2a8c6752 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-12-27 17:11:30 by afrisch] Small opt

Original author: afrisch
Date: 2004-12-27 17:11:30+00:00
parent cdb733b0
......@@ -465,9 +465,8 @@ x=(1,2)
if (IdSet.is_empty xs) || (Types.is_empty t) then xs
else match d with
| Cup ((a1,_,_) as p1,p2) ->
IdSet.cap
approx_var seen p2 (Types.diff t a1)
(approx_var seen p1 (Types.cap t a1) xs)
(approx_var seen p2 (Types.diff t a1) xs)
| Cap ((_,fv1,_) as p1,((_,fv2,_) as p2)) ->
IdSet.cup
(approx_var seen p1 t (IdSet.cap fv1 xs))
......@@ -494,16 +493,16 @@ x=(1,2)
then xs
else approx_var (NodeSet.add q seen) q.descr t xs
(* Obviously not complete ! *)
let rec approx_nil seen ((a,fv,d) as p) t xs =
(* assert (Types.subtype t a);
assert (IdSet.subset xs fv); *)
if (IdSet.is_empty xs) || (Types.is_empty t) then xs
else match d with
| Cup ((a1,_,_) as p1,p2) ->
IdSet.cap
approx_nil seen p2 (Types.diff t a1)
(approx_nil seen p1 (Types.cap t a1) xs)
(approx_nil seen p2 (Types.diff t a1) xs)
| Cap ((_,fv1,_) as p1,((_,fv2,_) as p2)) ->
IdSet.cup
(approx_nil seen p1 t (IdSet.cap fv1 xs))
......
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