Frama-C:
Plug-ins:
Libraries:

Frama-C API - Domain_mode

This module defines the mode to restrict an abstract domain on specific functions.

type permission = {
  1. read : bool;
  2. write : bool;
}

Permission for an abstract domain to read/write its state. If write is true, the domain infers new properties when interpreting assignments, assumptions, and logical assertions. Otherwise, it only propagates already known properties as long as they hold. If read is true, the domain uses its inferred properties to improve the evaluation of expressions by extracting information from its state. It can also evaluate logical assertions.

type mode = {
  1. current : permission;
  2. calls : permission;
}

Mode for the analysis of a function f:

  • current is the read/write permission for f.
  • calls is the read/write permission for all functions called from f.
module Mode : sig ... end

Datatype for modes.

type function_mode = Frama_c_kernel.Kernel_function.t * mode

A function associated with an analysis mode.

Analysis mode for a domain.

include Frama_c_kernel.Datatype.S with type t = function_mode list
include Frama_c_kernel.Datatype.S_no_copy with type t = function_mode list
val datatype_name : string

Unique name of the datatype.

val datatype_descr : t Frama_c_kernel.Descr.t

Datatype descriptor.

Packed version of the descriptor.

val reprs : t list

List of representants of the descriptor.

val equal : t -> t -> bool
val compare : t -> t -> int

Comparison: same spec than Stdlib.compare.

val hash : t -> int

Hash function: same spec than Hashtbl.hash.

val pretty : Stdlib.Format.formatter -> t -> unit

Pretty print each value in an user-friendly way.

val mem_project : (Frama_c_kernel.Project_skeleton.t -> bool) -> t -> bool

mem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.

val copy : t -> t

Deep copy: no possible sharing between x and copy x.