Mlsem_common.GREnvSame as REnv, but holding gradual types.
include Env.Env with type ty := Mlsem_types.GTy.tval empty : tval is_empty : t -> boolWhether the environment has no binding at all.
val singleton : Variable.t -> Mlsem_types.GTy.t -> tval construct : (Variable.t * Mlsem_types.GTy.t) list -> tval add : Variable.t -> Mlsem_types.GTy.t -> t -> tBinds a variable that is not already bound; use replace otherwise.
val replace : Variable.t -> Mlsem_types.GTy.t -> t -> tBinds a variable, overriding any previous binding.
val domain : t -> Variable.t listval bindings : t -> (Variable.t * Mlsem_types.GTy.t) listval mem : Variable.t -> t -> boolval find : Variable.t -> t -> Mlsem_types.GTy.tval find_opt : Variable.t -> t -> Mlsem_types.GTy.t optionval map : (Mlsem_types.GTy.t -> Mlsem_types.GTy.t) -> t -> tval rm : Variable.t -> t -> tRemoves a binding. The result is not necessarily a weaker environment, as the set of type variables captured tvars may decrease.
val filter : (Variable.t -> Mlsem_types.GTy.t -> bool) -> t -> tFilters bindings. The result is not necessarily a weaker environment, as the set of type variables captured tvars may decrease.
val tvars : t -> Mlsem_types.MVarSet.tAn over-approximation of the type variables occurring in the environment: it is maintained incrementally and not recomputed when a binding is combined with another. Sound wherever it is used to build a set of monomorphic variables, but not a reliable "occurs" test.
leq env1 env2 holds when env1 is at least as precise as env2: it binds at least the same variables, at smaller types.
val show : t -> stringval pp : Stdlib.Format.formatter -> t -> unitval find' : Variable.t -> t -> Mlsem_types.GTy.tLike find, returning any instead of raising Not_found for an unbound variable. This is the reading that matches the partiality of an REnv.
Negation, as a disjunction: negating a conjunction of constraints yields one alternative per constraint. The empty environment (true) negates to the empty list (false).
Over-approximation of the disjunction of two refinements: a variable constrained in only one of them becomes unconstrained, since nothing can be assumed about it in the other branch.
neg followed by disj_approx; ~unsat represents the unsatisfiable refinement, whose representation may depend on the variables in scope.