Commit 6a5dea60 authored by Pietro Abate's avatar Pietro Abate

[r2005-06-01 05:57:53 by afrisch] Use OCaml comparison for abstract values

Original author: afrisch
Date: 2005-06-01 05:57:53+00:00
parent 41c7dfd9
......@@ -385,18 +385,24 @@ struct
let n = deserialize t in
(cap_atom x true p) ++ i ++ (cap_atom x false n)
(* split x p i n is not ok, because order of keys might have changed! *)
(*
(*
let not_triv = function
| True | False -> false
| _ -> true
let diff x y =
let d = diff x y in
Format.fprintf Format.std_formatter "X = %a@\nY = %a@\nX\\Z = %a@\n"
dump x dump y dump d;
if (not_triv x) && (not_triv y) then
Format.fprintf Format.std_formatter "X = %a@\nY = %a@\nX\\Z = %a@\n"
dump x dump y dump d;
d
let cap x y =
let d = cap x y in
Format.fprintf Format.std_formatter "X = %a@\nY = %a@\nX**Z = %a@\n"
dump x dump y dump d;
if (not_triv x) && (not_triv y) then
Format.fprintf Format.std_formatter "X = %a@\nY = %a@\nX**Z = %a@\n"
dump x dump y dump d;
d
*)
end
......
......@@ -419,7 +419,8 @@ let rec compare x y =
raise (CDuceExn (string_latin1 "comparing functional values"))
| Abstract (s1,v1), Abstract (s2,v2) ->
let c = Types.Abstract.T.compare s1 s2 in if c <> 0 then c
else raise (CDuceExn (string_latin1 "comparing abstract values"))
else Pervasives.compare (Obj.magic v1 : float) (Obj.magic v2 : float)
(* raise (CDuceExn (string_latin1 "comparing abstract values")) *)
| Absent,_ | _,Absent ->
Format.fprintf Format.std_formatter
"ERR: Compare %a %a@." print x print y;
......
......@@ -842,7 +842,7 @@ module Normal = struct
RecNolabel ((if x then Some empty_res else None),
(if y then Some empty_res else None))
| Some l ->
RecLabel (l,aux (Types.Record.split_normal t l)) in
RecLabel (l,aux (Types.Record.split (*_normal*) t l)) in
{ (nempty lab) with
na = t;
nbasic = single_basic empty_res (Types.cap t any_basic);
......
......@@ -1155,6 +1155,7 @@ struct
| `XML -> normal_xml d.xml
(*
let merge_same_2 r =
let r =
List.fold_left
......@@ -1163,7 +1164,7 @@ struct
DescrMap.add t2 (cup t t1) accu
) DescrMap.empty r in
DescrMap.fold (fun t2 t1 accu -> (t1,t2)::accu) r []
*)
let constraint_on_2 n t1 =
List.fold_left
......
......@@ -29,11 +29,11 @@ the same as for OCaml (<tt>configure, make world, make install</tt>).
<ul>
<li><a
href="http://pauillac.inria.fr/~frisch/ocamlcduce/download/cduce-ocaml-0.0.2.tar.gz">Compiler,
version 0.0.2</a></li>
href="http://pauillac.inria.fr/~frisch/ocamlcduce/download/cduce-ocaml-0.0.4.tar.gz">Compiler,
version 0.0.4</a></li>
<li><a
href="http://pauillac.inria.fr/~frisch/ocamlcduce/download/xml-support-0.0.2.tar.gz">Support
library, version 0.0.2</a></li>
href="http://pauillac.inria.fr/~frisch/ocamlcduce/download/xml-support-0.0.3.tar.gz">Support
library, version 0.0.3</a></li>
</ul>
<p>
......
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