Module Op.Records

Operations on record types.

type t = Records.t
val as_union : t -> atom list

as_union t over-approximates t as an union of non-empty atoms.

val of_union : atom list -> t

of_union atoms returns the record component composed of the union atoms.

val approx : t -> atom

approx t over-approximates t as a non-empty atom.

val proj : Label.t -> t -> Ty.t * bool

proj l t returns the (possibly absent) type resulting from the projection on the label l of t.

val merge : atom -> atom -> t

merge t1 t2 returns the atom resulting from the merging of t1 and t2 (non-absent fields in t2 override those in t1).

val remove : atom -> Label.t -> t

remove t l returns the atom obtained by making the field l absent in t.