Module Checks

Implements a method described in this paper from Raphaël Monat, Abdelraouf Ouadjaout and Antoine Miné : https://inria.hal.science/hal-04652657v2

This allows to track checks performed during the analysis, and to mark whether they are safe, unsafe or unknown (resp. Safe, Error, Warning).

module Kind : sig ... end
module Category : sig ... end
module Check : sig ... end
module CheckMap : sig ... end
module CategoryLocationMap : sig ... end
val checks_list : (bool Stdlib.ref * unit CheckMap.t) CategoryLocationMap.t

Store the list of checks raised by the analysis. The bool ref stores whether all checks in the map are safe. The unit CheckMap.t is the set of checks associated with the given Category.t * CilType.Location.t pair. The bool is a reference to avoid having to use the update function when updating the value. The CheckMap.t is mutable anyway so it is not a problem.

val add_check : Check.t -> unit
val check : Kind.t -> Category.t -> ('a, unit, GoblintCil.Pretty.doc, unit) Stdlib.format4 -> 'a
val export : unit -> [> `List of [> `Assoc of (string * [> `Assoc of (string * [> `Assoc of (string * [> `Int of int | `String of string ]) list ]) list | `Null | `String of string ]) list ] list ]
val error : Category.t -> ('a, unit, GoblintCil.Pretty.doc, unit) Stdlib.format4 -> 'a
val warn : Category.t -> ('a, unit, GoblintCil.Pretty.doc, unit) Stdlib.format4 -> 'a
val safe : Category.t -> unit
val safe_msg : Category.t -> ('a, unit, GoblintCil.Pretty.doc, unit) Stdlib.format4 -> 'a