IR.SubtypeThe Smallfoot Intermediate Language: Subtypes
include Ppx_compare_lib.Comparable.S with type t := tval compare : t Base__Ppx_compare_lib.compareinclude Ppx_compare_lib.Equal.S with type t := tval equal : t Base__Ppx_compare_lib.equalval pp : F.formatter -> t -> unitval exact : tval subtypes : tdenotes the current type only
val subtypes_cast : tdenotes the current type and any subtypes
val subtypes_instof : tval case_analysis :
Tenv.t ->
(Typ.Name.t * t) ->
(Typ.Name.t * t) ->
t option * t optioncase_analysis tenv (c1, st1) (c2, st2) performs case analysis on c1 <: c2 according to st1 and st2. case_analysis returns a pair:
st1 and st2 admit c1 <: c2, and in case returns the updated subtype st1st1 and st2 admit not(c1 <: c2), and in case returns the updated subtype st1val is_known_subtype : Tenv.t -> Typ.Name.t -> Typ.Name.t -> boolis_known_subtype tenv c1 c2 returns true if there is enough information in tenv to prove that c1 is a subtype of c2. Note that not (is_known_subtype tenv c1 c2) == true does not imply that is_known_not_subtype tenv c1 c2 == true
val is_cast : t -> boolval is_instof : t -> bool