module type S =sig..end
Signature for the abstract domains of the analysis.
type state
include Datatype.S_with_collections
include Abstract_domain.Lattice
include Abstract_domain.Queries
module Transfer:functor (Valuation:Abstract_domain.Valuationwith type value = value and type origin = origin and type loc = location) ->Abstract_domain.Transferwith type state := t and type value := value and type location := location and type valuation := Valuation.t
Transfer functions from the result of evaluations.
Logical evaluation. This API is subject to changes.
val logic_assign : Eval.logic_assign ->
location ->
pre:state ->
state -> statelogic_assign from loc_asgn pre state applies the effect of the
assigns ... \from ... clause from to state. pre is the state
before the assign clauses, in which the terms of the clause are evaluated.
loc_asgn is the result of the evaluation of the assigns part of from
in pre.
val evaluate_predicate : state Abstract_domain.logic_environment ->
state -> Cil_types.predicate -> Alarmset.statusEvaluates a predicate to a logical status in the current state.
The logic_environment contains the states at some labels and the
potential variable for \result.
val reduce_by_predicate : state Abstract_domain.logic_environment ->
state ->
Cil_types.predicate -> bool -> state Eval.or_bottomreduce_by_predicate env state pred b reduces the current state by
assuming that the predicate pred evaluates to b. env contains the
states at some labels and the potential variable for \result.
val enter_scope : Cil_types.kernel_function -> Cil_types.varinfo list -> t -> tScoping: abstract transformers for entering and exiting blocks.
kf is the englobing function, and the variables of the list vars
should be added or removed from the abstract state here.
Note that the formals of a function enter the scope through the transfer
function Abstract_domain.Transfer.start_call, but leave it through a
call to Abstract_domain.S.leave_scope.
val leave_scope : Cil_types.kernel_function -> Cil_types.varinfo list -> t -> t
val enter_loop : Cil_types.stmt -> state -> state
val incr_loop_counter : Cil_types.stmt -> state -> state
val leave_loop : Cil_types.stmt -> state -> stateInitialization
val empty : unit -> tThe initial state with which the analysis start.
val introduce_globals : Cil_types.varinfo list -> t -> tIntroduces the list of global variables in the state. At this point, these variables are uninitialized: they will be initialized through the two functions below.
val initialize_variable : Cil_types.lval ->
location -> initialized:bool -> Abstract_domain.init_value -> t -> tinitialize_variable lval loc ~initialized init_value state initializes
the value of the location loc of lvalue lval in state with:
val initialize_variable_using_type : Abstract_domain.init_kind -> Cil_types.varinfo -> t -> tInitializes a variable according to its type. TODO: move some parts of the cvalue implementation of this function in the generic engine.
include Abstract_domain.Recycle