Commit 8ebed49b authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2006-09-11 09:14:02 by afrisch] Empty log message

Original author: afrisch
Date: 2006-09-11 09:14:02+00:00
parent 1d45eb39
...@@ -371,8 +371,7 @@ binary_op_warning2 "mod" ...@@ -371,8 +371,7 @@ binary_op_warning2 "mod"
binary_op_gen "@" binary_op_gen "@"
(fun arg1 arg2 constr precise -> (fun arg1 arg2 constr precise ->
let constr' = Sequence.star let constr' = Sequence.ub_concat constr in
(Sequence.approx (Types.cap Sequence.any constr)) in
let exact = Types.subtype constr' constr in let exact = Types.subtype constr' constr in
if exact then if exact then
let t1 = arg1 constr' precise let t1 = arg1 constr' precise
......
...@@ -243,3 +243,4 @@ let any_xtransformable = ...@@ -243,3 +243,4 @@ let any_xtransformable =
let t = Types.cons (Types.cup elt non_elt) in let t = Types.cons (Types.cup elt non_elt) in
Types.cup nil_type (Types.times t n))) Types.cup nil_type (Types.times t n)))
let ub_concat t = star (approx (Types.cap any t))
...@@ -19,7 +19,6 @@ val concat: Types.t -> Types.t -> Types.t ...@@ -19,7 +19,6 @@ val concat: Types.t -> Types.t -> Types.t
val flatten: Types.t -> Types.t val flatten: Types.t -> Types.t
val map: (Types.t -> Types.t) -> Types.t -> Types.t val map: (Types.t -> Types.t) -> Types.t -> Types.t
val map_tree: val map_tree:
Types.t -> (Types.t -> Types.t -> Types.t * Types.t) -> Types.t -> Types.t Types.t -> (Types.t -> Types.t -> Types.t * Types.t) -> Types.t -> Types.t
(* maximal output type -> input type -> (result, residual) *) (* maximal output type -> input type -> (result, residual) *)
...@@ -49,6 +48,9 @@ val approx: Types.t -> Types.t ...@@ -49,6 +48,9 @@ val approx: Types.t -> Types.t
t <= (X where X = (s, X) | Any \ (Any,Any)) t <= (X where X = (s, X) | Any \ (Any,Any))
*) *)
val ub_concat: Types.t -> Types.t
(* Returns [star (approx t)] *)
(* Added this interface needed in cdo2cmo -- Julien *) (* Added this interface needed in cdo2cmo -- Julien *)
val star_node : Types.Node.t -> Types.Node.t val star_node : Types.Node.t -> Types.Node.t
......
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