Module InferModules__EradicateChecks

Module for the checks called by Eradicate.

val get_field_annotation : InferIR.Tenv.t -> InferIR__Typ.Fieldname.t -> InferIR__Typ.typ -> (InferIR__Typ.typ * InferIR.Annot.Item.t) option
val report_error : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferModules.TypeErr.err_instance -> InferModules.TypeErr.InstrRef.t option -> InferBase.Location.t -> InferIR.Procdesc.t -> unit
val explain_expr : InferIR.Tenv.t -> InferIR.Procdesc.Node.t -> InferIR.Exp.t -> string option
val is_virtual : (InferIR.Mangled.t * 'a * 'b) list -> bool
val check_field_access : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> InferModules.TypeErr.InstrRef.t -> InferIR.Exp.t -> InferIR.Typ.Fieldname.t -> InferModules.TypeAnnotation.t -> InferBase.Location.t -> unit

Check an access (read or write) to a field.

val check_array_access : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> InferModules.TypeErr.InstrRef.t -> InferIR.Exp.t -> InferIR.Typ.Fieldname.t -> InferModules.TypeAnnotation.t -> InferBase.Location.t -> bool -> unit

Check an access to an array

type from_call =
| From_condition

Direct condition

| From_instanceof

x instanceof C

| From_is_false_on_null

returns false on null

| From_is_true_on_null

returns true on null

| From_optional_isPresent

x.isPresent

| From_containsKey

x.containsKey

Where the condition is coming from

val compare_from_call : from_call -> from_call -> int
val equal_from_call : from_call -> from_call -> bool
val check_condition : InferIR.Tenv.t -> bool -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> InferIR.Exp.t -> InferIR.Typ.t -> InferModules.TypeAnnotation.t -> bool -> from_call -> InferModules.Idenv.t -> InferModules.Printer.LineReader.t -> InferBase.Location.t -> InferModules.TypeErr.InstrRef.t -> unit

Check the normalized "is zero" or "is not zero" condition of a prune instruction.

val check_zero : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> InferIR.Exp.t -> InferIR.Typ.t -> InferModules.TypeAnnotation.t -> bool -> from_call -> InferModules.Idenv.t -> InferModules.Printer.LineReader.t -> InferBase.Location.t -> InferModules.TypeErr.InstrRef.t -> unit

Check an "is zero" condition.

val check_nonzero : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> InferIR.Exp.t -> InferIR.Typ.t -> InferModules.TypeAnnotation.t -> bool -> from_call -> InferModules.Idenv.t -> InferModules.Printer.LineReader.t -> InferBase.Location.t -> InferModules.TypeErr.InstrRef.t -> unit

Check an "is not zero" condition.

val check_field_assignment : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> 'a -> InferModules.TypeErr.InstrRef.t -> 'b -> 'c -> 'c -> 'd -> InferBase.Location.t -> InferIR.Typ.Fieldname.t -> ('e * InferIR.Annot.Item.t) option -> ('a -> InferModules.TypeErr.InstrRef.t -> InferIR.Procdesc.t -> 'b -> 'c -> ('d * InferModules.TypeAnnotation.t * InferBase.Location.t list) -> InferBase.Location.t -> InferIR.Typ.t * InferModules.TypeAnnotation.t * 'f) -> unit

Check an assignment to a field.

val check_constructor_initialization : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Typ.Procname.t -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> (InferIR.Typ.Procname.t * InferModules.TypeState.t) InferStdlib.IStd.List.t InferStdlib.IStd.Lazy.t -> (InferIR.Typ.Procname.t * InferModules.TypeState.t) InferStdlib.IStd.List.t InferStdlib.IStd.Lazy.t -> InferBase.Location.t -> unit

Check that nonnullable fields are initialized in constructors.

val check_return_annotation : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> ('a * InferModules.TypeAnnotation.t * 'b) option -> InferModules.AnnotatedSignature.t -> bool -> InferBase.Location.t -> unit

Check the annotations when returning from a method.

val check_call_receiver : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> 'a -> ((InferIR.Exp.t * 'b) * 'c) list -> InferIR.Typ.Procname.t -> InferModules.TypeErr.InstrRef.t -> InferBase.Location.t -> (InferIR.Tenv.t -> InferIR.Procdesc.Node.t -> InferModules.TypeErr.InstrRef.t -> InferIR.Procdesc.t -> 'a -> 'b -> ('c * InferModules.TypeAnnotation.t * 'd list) -> InferBase.Location.t -> 'e * InferModules.TypeAnnotation.t * 'f) -> unit

Check the receiver of a virtual call.

type resolved_param = {
num : int;
formal : InferIR.Mangled.t * InferModules.TypeAnnotation.t * InferIR.Typ.t;
actual : InferIR.Exp.t * InferModules.TypeAnnotation.t;
propagates_nullable : bool;
}
val check_call_parameters : InferIR.Tenv.t -> (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Procdesc.t -> InferIR.Procdesc.Node.t -> InferIR.ProcAttributes.t -> resolved_param InferStdlib.IStd.List.t -> InferBase.Location.t -> InferModules.TypeErr.InstrRef.t -> unit

Check the parameters of a call.

val check_overridden_annotations : (InferIR.Procdesc.Node.t -> InferIR.Procdesc.Node.t) -> InferIR.Tenv.t -> InferIR.Typ.Procname.t -> InferIR.Procdesc.t -> InferModules.AnnotatedSignature.t -> unit

Checks if the annotations are consistent with the inherited class or with the implemented interfaces