Module Nullsafe.Models
val get_modelled_annotated_signature : is_callee_in_trust_list:bool -> IR.Tenv.t -> IR.ProcAttributes.t -> AnnotatedSignature.t
Return the annotated signature of the procedure, taking into account models. External models take precedence over internal ones.
val is_check_not_null : IR.Procname.Java.t -> bool
Check if the procedure is one of the known methods asserting nullability of the object. Nullsafe should understand that both the argument and return value are non-nullable after the call.
val get_check_not_null_parameter : IR.Procname.Java.t -> int option
Parameter number (starting from 1) for a procedure known to produce a non-nullable assertion.
None
if the function is not known to be an aseertion OR the parameter number is not known
val is_check_state : IR.Procname.Java.t -> bool
Check if the procedure is one of the known Preconditions.checkState.
val is_check_argument : IR.Procname.Java.t -> bool
Check if the procedure is one of the known Preconditions.checkArgument.
val is_noreturn : IR.Procname.Java.t -> bool
Check if the procedure does not return.
val is_true_on_null : IR.Procname.Java.t -> bool
Check if the procedure returns true on null.
val is_false_on_null : IR.Procname.Java.t -> bool
Check if the procedure returns false on null.
val is_containsKey : IR.Procname.Java.t -> bool
Check if the procedure is Map.containsKey().
val is_mapPut : IR.Procname.Java.t -> bool
Check if the procedure is Map.put().
val find_nonnullable_alternative : IR.Procname.Java.t -> ModelTables.nonnull_alternative_method option
Check if a (nullable) method has a non-nullable alternative: A method that does the same as
proc_name
but asserts the result is not null before returning to the caller.
val is_field_nonnullable : IR.Fieldname.t -> bool option
Check if a given field has known nullability: true = nonnull, false = null