| 72 |
|
|
| 73 |
(* List of non-empty rectangles *) |
(* List of non-empty rectangles *) |
| 74 |
type t = (descr * descr) list |
type t = (descr * descr) list |
| 75 |
|
val is_empty: t -> bool |
| 76 |
val get: descr -> t |
val get: descr -> t |
| 77 |
val pi1: t -> descr |
val pi1: t -> descr |
| 78 |
val pi2: t -> descr |
val pi2: t -> descr |
| 83 |
(* List of non-empty rectangles whose first projection |
(* List of non-empty rectangles whose first projection |
| 84 |
are pair-wise disjunct *) |
are pair-wise disjunct *) |
| 85 |
type normal = t |
type normal = t |
| 86 |
val normal: descr -> t |
val normal: descr -> normal |
| 87 |
|
|
| 88 |
|
val need_second: t -> bool |
| 89 |
|
(* Is there more than a single rectangle ? *) |
| 90 |
end |
end |
| 91 |
|
|
| 92 |
module Record : sig |
module Record : sig |
| 114 |
module Arrow : sig |
module Arrow : sig |
| 115 |
val any : descr |
val any : descr |
| 116 |
|
|
| 117 |
|
val check_strenghten: descr -> descr -> descr |
| 118 |
|
(* [check_strenghten t s] |
| 119 |
|
Assume that [t] is an intersection of arrow types |
| 120 |
|
representing the interface of an abstraction; |
| 121 |
|
check that this abstraction has type [s] (otherwise raise Not_found) |
| 122 |
|
and returns a refined type for this abstraction. |
| 123 |
|
*) |
| 124 |
|
|
| 125 |
type t |
type t |
| 126 |
|
val is_empty: t -> bool |
| 127 |
val get: descr -> t |
val get: descr -> t |
| 128 |
(* Always succeed; no check <= Arrow.any *) |
(* Always succeed; no check <= Arrow.any *) |
| 129 |
|
|
| 130 |
val domain: t -> descr |
val domain: t -> descr |
| 131 |
val apply: t -> descr -> descr |
val apply: t -> descr -> descr |
| 132 |
(* Always succeed; no check on the domain *) |
(* Always succeed; no check on the domain *) |
| 133 |
|
|
| 134 |
|
val need_arg : t -> bool |
| 135 |
|
(* True if the type of the argument is needed to obtain |
| 136 |
|
the type of the result (must use [apply]; otherwise, |
| 137 |
|
[apply_noarg] is enough *) |
| 138 |
|
val apply_noarg : t -> descr |
| 139 |
end |
end |
| 140 |
|
|
| 141 |
|
|