Module Nullsafe__EradicateChecks

module L = IBase.Logging
val explain_expr : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> string option
val is_virtual : Nullsafe.AnnotatedSignature.param_signature list -> bool
val check_object_dereference : Absint.IntraproceduralAnalysis.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IR.Procdesc.Node.t -> Nullsafe.TypeErr.InstrRef.t -> IR.Exp.t -> Nullsafe.DereferenceRule.ReportableViolation.dereference_type -> Nullsafe.InferredNullability.t -> IBase.Location.t -> unit
val check_condition_for_redundancy : Absint.IntraproceduralAnalysis.t -> is_always_true:bool -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IR.Procdesc.Node.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> IR.Exp.t -> IR.Typ.t -> Nullsafe.InferredNullability.t -> Nullsafe.IDEnv.t -> IBase.LineReader.t -> IBase.Location.t -> Nullsafe.TypeErr.InstrRef.t -> unit

expr is an expression that was explicitly compared with `null`. At the same time, expr had inferred_nullability before the comparision. Check if the comparision is redundant and emit an issue, if this is the case.

val check_field_assignment : Absint.IntraproceduralAnalysis.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> 'a -> Nullsafe.TypeErr.InstrRef.t -> 'b -> expr_rhs:'c -> field_type:IR.Typ.t -> IBase.Location.t -> IR.Fieldname.t -> Nullsafe.AnnotatedField.t -> ('a -> Nullsafe.TypeErr.InstrRef.t -> 'b -> 'c -> (IR.Typ.t * Nullsafe.InferredNullability.t) -> IBase.Location.t -> 'd * Nullsafe.InferredNullability.t) -> unit

Check an assignment to a field.

val is_field_declared_as_nonnull : Nullsafe.AnnotatedField.t option -> bool
val lookup_field_in_typestate : IR.Procname.t -> IR.Fieldname.t -> Nullsafe.TypeState.t -> Nullsafe.TypeState.range option
val convert_predicate : (Nullsafe.TypeState.range -> bool) -> IR.Fieldname.t -> (IR.Procname.t * Nullsafe.TypeState.t) -> bool
val predicate_holds_for_some_typestate : (IR.Procname.t * Nullsafe.TypeState.t) list -> IR.Fieldname.t -> predicate:(Nullsafe.TypeState.range -> bool) -> bool
val get_nullability_upper_bound_for_typestate : IR.Procname.t -> IR.Fieldname.t -> Nullsafe.TypeState.t -> Nullsafe.Nullability.t
val get_nullability_upper_bound : IR.Fieldname.t -> (IR.Procname.t * Nullsafe.TypeState.t) list -> Nullsafe.Nullability.t
val is_generated_field : IR.Fieldname.t -> bool
val check_constructor_initialization : Absint.IntraproceduralAnalysis.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IR.Procdesc.Node.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> typestates_for_curr_constructor_and_all_initializer_methods:(IR.Procname.t * Nullsafe.TypeState.t) list IStdlib.IStd.Lazy.t -> typestates_for_all_constructors_incl_current:(IR.Procname.t * Nullsafe.TypeState.t) list IStdlib.IStd.Lazy.t -> IBase.Location.t -> unit

Check field initialization for a given constructor

val check_return_not_nullable : Absint.IntraproceduralAnalysis.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> java_pname:IR.Procname.Java.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IBase.Location.t -> Nullsafe.AnnotatedSignature.ret_signature -> Nullsafe.InferredNullability.t -> unit
val check_return_overrannotated : java_pname:IR.Procname.Java.t -> Absint.IntraproceduralAnalysis.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IBase.Location.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> Nullsafe.AnnotatedSignature.ret_signature -> Nullsafe.InferredNullability.t -> unit
val check_return_annotation : Absint.IntraproceduralAnalysis.t -> java_pname:IR.Procname.Java.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> ('a * Nullsafe.InferredNullability.t) option -> Nullsafe.AnnotatedSignature.t -> bool -> IBase.Location.t -> unit

Check the annotations when returning from a method.

val check_call_receiver : Absint.IntraproceduralAnalysis.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IR.Procdesc.Node.t -> 'a -> ((IR.Exp.t * 'b) * 'c) list -> IR.Procname.Java.t -> Nullsafe.TypeErr.InstrRef.t -> IBase.Location.t -> (IR.Procdesc.Node.t -> Nullsafe.TypeErr.InstrRef.t -> 'a -> 'b -> ('c * Nullsafe.InferredNullability.t) -> IBase.Location.t -> 'd * Nullsafe.InferredNullability.t) -> unit

Check the receiver of a virtual call.

type resolved_param = {
num : int;
formal : Nullsafe.AnnotatedSignature.param_signature;
actual : IR.Exp.t * Nullsafe.InferredNullability.t;
is_formal_propagates_nullable : bool;
}
val check_call_parameters : Absint.IntraproceduralAnalysis.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> callee_pname:IR.Procname.Java.t -> callee_annotated_signature:Nullsafe.AnnotatedSignature.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IR.Procdesc.Node.t -> resolved_param list -> IBase.Location.t -> Nullsafe.TypeErr.InstrRef.t -> unit

Check the parameters of a call.

val check_inheritance_rule_for_return : Absint.IntraproceduralAnalysis.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IBase.Location.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> overridden_proc_name:IR.Procname.Java.t -> base_proc_name:IR.Procname.Java.t -> base_nullability:Nullsafe.Nullability.t -> overridden_nullability:Nullsafe.Nullability.t -> unit
val check_inheritance_rule_for_param : Absint.IntraproceduralAnalysis.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IBase.Location.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> overridden_param_name:IR.Mangled.t -> base_proc_name:IR.Procname.Java.t -> param_position:int -> base_nullability:Nullsafe.Nullability.t -> overridden_nullability:Nullsafe.Nullability.t -> overridden_proc_name:IR.Procname.Java.t -> unit
val check_inheritance_rule_for_params : Absint.IntraproceduralAnalysis.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IBase.Location.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> base_proc_name:IR.Procname.Java.t -> base_signature:Nullsafe.AnnotatedSignature.t -> overridden_signature:Nullsafe.AnnotatedSignature.t -> overridden_proc_name:IR.Procname.Java.t -> unit
val check_inheritance_rule_for_signature : Absint.IntraproceduralAnalysis.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> IBase.Location.t -> nullsafe_mode:Nullsafe.NullsafeMode.t -> base_proc_name:IR.Procname.Java.t -> base_signature:Nullsafe.AnnotatedSignature.t -> overridden_signature:Nullsafe.AnnotatedSignature.t -> overridden_proc_name:IR.Procname.Java.t -> unit

Check both params and return values for complying for co- and contravariance

val check_overridden_annotations : Absint.IntraproceduralAnalysis.t -> (IR.Procdesc.Node.t -> IR.Procdesc.Node.t) -> Nullsafe.AnnotatedSignature.t -> proc_name:IR.Procname.Java.t -> unit

Checks if the annotations are consistent with the derived classes and with the implemented interfaces