module Eval: sig
.. end
Analysis for values and pointers
type
cond = {
}
val check_comparable : with_alarms:CilE.warn_mode ->
Locations.Location_Bytes.t ->
Locations.Location_Bytes.t ->
Locations.Location_Bytes.t * Locations.Location_Bytes.t
module type Domain = sig
.. end
module PtrRelational: sig
.. end
module UseRelations: Computation.Ref
(
sig
end
)
(
sig
end
)
val compute_call_ref : (Kernel_function.t ->
call_kinstr:Cil_types.kinstr ->
Db.Value.state ->
(Cil_types.exp * Cvalue_type.V.t) list ->
Cvalue_type.V_Offsetmap.Datatype.t option * Relations_type.Model.t *
Locations.Location_Bits.Top_Param.t)
Pervasives.ref
val remember_bases_with_locals : Locations.Location_Bits.Top_Param.t Pervasives.ref ->
Locations.location -> Cvalue_type.V.t -> unit
val timer : int Pervasives.ref
val warn_all_quiet_mode : unit -> CilE.warn_mode
val set_loc : Cil_types.kinstr -> unit
exception Leaf
exception Not_an_exact_loc
exception Reduce_to_bottom
type
called_function = {
}
val call_stack : called_function list Pervasives.ref
val pretty_call_stack : Format.formatter -> called_function list -> unit
val pop_call_stack : unit -> unit
val push_call_stack : called_function -> unit
val current_kf : unit -> Db_types.kernel_function
module Got_Imprecise_Value: Computation.Ref
(
sig
end
)
(
sig
end
)
module Location_list: Datatype.List
(
Locations.Location.Datatype
)
module Non_linear_assignments: Cil_computation.VarinfoHashtbl
(
Cil_datatype.InstrHashtbl
(
Location_list
)
)
(
sig
end
)
val do_degenerate : Cil_types.lval option -> unit
val for_callbacks_stack : unit -> (Db_types.kernel_function * Cil_types.kinstr) list
val pretty_current_cfunction_name : Format.formatter -> unit
exception Offset_not_based_on_Null of Locations.Zone.t option * Locations.Location_Bytes.t
val warn_locals_escape : bool -> Cil_types.fundec -> Base.t -> unit
val warn_locals_escape_result : Cil_types.fundec -> unit
val do_cast : with_alarms:CilE.warn_mode ->
Cil_types.typ -> Cvalue_type.V.t -> Cvalue_type.V.t
val do_promotion : with_alarms:CilE.warn_mode ->
src_typ:Cil_types.typ ->
dest_type:Cil_types.typ -> Cvalue_type.V.t -> Cvalue_type.V.t
exception Cannot_find_lv
exception Too_linear
val warn_lval_read : Cil_types.lval -> Locations.location -> Locations.Location_Bytes.z -> unit
val lval_to_loc : with_alarms:CilE.warn_mode ->
Db.Value.state -> Cil_types.lval -> Locations.location
val lval_to_loc_deps_option : with_alarms:CilE.warn_mode ->
deps:Locations.Zone.t option ->
Db.Value.state ->
reduce_valid_index:Parameters.SafeArrays.t ->
Cil_types.lval ->
Db.Value.state * Locations.Zone.t option * Locations.location
val lval_to_loc_with_offset_deps_only : deps:Locations.Zone.t ->
Db.Value.state ->
Cil_types.lval ->
with_alarms:CilE.warn_mode ->
Db.Value.state * Locations.Zone.t option * Locations.location
val lval_to_loc_with_deps : deps:Locations.Zone.t ->
Db.Value.state ->
Cil_types.lval ->
with_alarms:CilE.warn_mode ->
reduce_valid_index:Parameters.SafeArrays.t ->
Db.Value.state * Locations.Zone.t option * Locations.location
val lval_to_loc_with_offset_deps_only_option : with_alarms:CilE.warn_mode ->
deps:Locations.Zone.t option ->
Db.Value.state ->
Cil_types.lval ->
Db.Value.state * Locations.Zone.t option * Locations.location
Detects if an expression can be considered as a lvalue even though
it is hidden by a cast that does not change the lvalue.
Raises exn
if it is not an lvalue.
TODO: When the goal is to recognize the form (cast)l-value == expr,
it would be better and more powerful to have chains of inverse functions
val pass_cast : with_alarms:CilE.warn_mode ->
Db.Value.state -> exn -> Cil_types.typ -> Cil_types.exp -> unit
val find_lv : with_alarms:CilE.warn_mode ->
Db.Value.state -> Cil_types.exp -> Cil_types.lval
val find_lv_plus : with_alarms:CilE.warn_mode ->
Db.Value.state -> Cil_types.exp -> (Cil_types.lval * Ival.t) list
val base_to_loc : with_alarms:CilE.warn_mode ->
?deps:Locations.Zone.t ->
Db.Value.state ->
Cil_types.lval ->
Cil_types.lhost ->
Ival.t -> Db.Value.state * Locations.Zone.t option * Locations.location
val eval_expr : with_alarms:CilE.warn_mode ->
Db.Value.state -> Cil_types.exp -> Cvalue_type.V.t
val get_vars : with_alarms:CilE.warn_mode ->
Db.Value.state -> Cil_types.exp -> Locations.location list
val reduce_by_valid_expr : with_alarms:'a ->
positive:bool -> Cil_types.exp -> Db.Value.state -> Db.Value.state
val eval_expr_with_deps : with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Db.Value.state -> Cil_types.exp -> Locations.Zone.t option * Cvalue_type.V.t
val eval_BinOp : with_alarms:CilE.warn_mode ->
Cil_types.binop ->
Cil_types.exp ->
Cil_types.exp ->
Cil_types.typ ->
Locations.Zone.t option ->
Db.Value.state -> Db.Value.state * Locations.Zone.t option * Cvalue_type.V.t
val eval_expr_with_deps_state : with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Db.Value.state ->
Cil_types.exp ->
Db.Value.state * Locations.Zone.t option * Locations.Location_Bytes.t
val eval_expr_with_deps_state_subdiv : with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Db.Value.state ->
Cil_types.exp ->
Db.Value.state * Locations.Zone.t option * Locations.Location_Bytes.t
val eval_lval_using_main_memory : with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Db.Value.state ->
Cil_types.lval ->
Db.Value.state * Locations.Zone.t option * Locations.Location_Bytes.t
val eval_lval : with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Db.Value.state ->
Cil_types.lval -> Db.Value.state * Locations.Zone.t option * Cvalue_type.V.t
val eval_offset : reduce_valid_index:Parameters.SafeArrays.t ->
with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Cil_types.typ ->
Db.Value.state ->
Cil_types.offset -> Db.Value.state * Locations.Zone.t option * Ival.t
val topify_offset : with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Db.Value.state ->
Cvalue_type.V.t ->
Cil_types.offset -> Locations.Zone.t option * Cvalue_type.V.t
val eval_cond : with_alarms:CilE.warn_mode -> Db.Value.state -> cond -> Db.Value.state
raises Reduce_to_bottom
and never returns Relations_type.Model.bottom
exception Ignore
val resolv_func_vinfo : with_alarms:CilE.warn_mode ->
Locations.Zone.t option ->
Db.Value.state ->
Cil_types.exp -> Locations.Zone.t option * Db_types.kernel_function list
val make_well : Int_Base.l ->
Cvalue_type.V.Top_Param.O.elt ->
Relations_type.Model.t -> Locations.location -> Relations_type.Model.t
val initialize_var_using_type : Cil_types.varinfo -> Relations_type.Model.t -> Relations_type.Model.t
initialize_var_using_type varinfo state
uses the type of varinfo
to create an initial value in state
.
val initial_state_only_globals : unit -> Db.Value.state
type
predicate_value =
exception Stop
val lop_to_cop : Cil_types.relation -> Cil_types.binop
val fold_on_disjunction : (Cil_types.predicate Cil_types.named -> 'a -> 'a) ->
Cil_types.predicate Cil_types.named -> 'a -> 'a
val count_disjunction : Cil_types.predicate Cil_types.named -> int
exception Predicate_alarm
val raise_predicate_alarm : unit -> 'a
val warn_raise_mode : CilE.warn_mode
val reduce_by_predicate : Db.Value.state ->
bool -> Cil_types.predicate Cil_types.named -> Db.Value.state
exception Does_not_improve
val reduce_by_disjunction : State_set.t -> int -> Cil_types.predicate Cil_types.named -> State_set.t
val eval_predicate : State_set.t -> Cil_types.predicate Cil_types.named -> predicate_value
val string_of_status : predicate_value -> string
val check_postconditions : string -> State_set.t -> Cil_types.funbehavior list -> State_set.t
val check_fct_postconditions : Kernel_function.t -> State_set.t -> State_set.t
val check_precondition : Kernel_function.t -> Db.Value.state -> Db.Value.state
val extract_valid_behaviors : State_set.t ->
('a, Cil_types.identified_predicate, 'b) Cil_types.spec ->
(Cil_types.identified_predicate, 'b) Cil_types.behavior list
val valid_behaviors : Kernel_function.t ->
Relations_type.Model.t ->
(Cil_types.identified_predicate, Cil_types.identified_term)
Cil_types.behavior list
val copy_offsetmap_from_virtual : with_alarms:CilE.warn_mode ->
Locations.location ->
Cil_types.lhost * Cil_types.offset ->
Locations.location -> Db.Value.state -> Cvalue_type.V_Offsetmap.t
val copy_paste_locations : with_alarms:CilE.warn_mode ->
exp_lv:Cil_types.lval ->
left:Locations.Location_Bits.t ->
right:Locations.Location_Bits.t ->
Int_Base.l -> Db.Value.state -> Relations_type.Model.t
May raise Lmap.Cannot_copy
.
val need_cast : Cil_types.typ -> Cil_types.typ -> bool
module Computer: functor (
REACH
:
sig
end
) ->
sig
.. end
val dummy_non_linear_assignment : Location_list.t Cilutil.InstrHashtbl.t
module Loc_hashtbl: Hashtbl.Make
(
Locations.Location_Bits
)
class do_non_linear_assignments :
object
.. end
val compute_non_linear_assignments : Cil_types.fundec -> Location_list.t Cilutil.InstrHashtbl.t
val compute_using_cfg : Kernel_function.t ->
call_kinstr:Cil_types.kinstr ->
State_set.t Pervasives.ref ->
Cvalue_type.V_Offsetmap.t option * Relations_type.Model.t *
Locations.Location_Bits.Top_Param.t
module Leaf_Table: Kernel_function.Make_Table
(
Base.Datatype
)
(
sig
end
)
Associates kernel_function
to a fresh base for the address returned by
the kernel_function
.
val return_value : Cil_types.typ ->
Leaf_Table.key ->
Relations_type.Model.t -> Cvalue_type.V.t * Relations_type.Model.t
exception Deref_lvals of Cil_types.lval list
val compute_using_prototype : Kernel_function.t ->
state_with_formals:Db.Value.state ->
Cvalue_type.V_Offsetmap.t option * Relations_type.Model.t *
Locations.Location_Bits.Top_Param.t
val compute_using_mem : 'a ->
Relations_type.Model.t ->
'b * Relations_type.Model.t ->
Locations.Zone.t ->
Cvalue_type.Model.instanciation ->
'b * Relations_type.Model.t * Locations.Location_Bits.Top_Param.t
val initial_state_contextfree_only_globals : unit -> Relations_type.Model.Datatype.t
Compute only once the initial values for globals and NULL
val initial_state_formals : Db_types.kernel_function -> Relations_type.Model.t -> Relations_type.Model.t
val fold_left2_best_effort : ('a -> 'b -> 'c -> 'a) -> 'a -> 'b list -> 'c list -> 'a
val actualize_formals : Kernel_function.t ->
Relations_type.Model.t ->
('a * Locations.Location_Bytes.t) list -> Relations_type.Model.t
val compute_with_initial_state : Kernel_function.t ->
Db.Value.state ->
call_kinstr:Cil_types.kinstr ->
Cvalue_type.V_Offsetmap.t option * Relations_type.Model.t *
Locations.Location_Bits.Top_Param.t
val compute_entry_point : Kernel_function.t ->
library:bool ->
Cvalue_type.V_Offsetmap.t option * Relations_type.Model.t *
Locations.Location_Bits.Top_Param.t
exception Not_modular
exception Invalid_CEA_alloc
exception Invalid_CEA_memcpy
module Dynamic_Alloc_Table: Computation.Hashtbl
(
sig
type
t = string
val hash : 'a -> int
val equal : 'a -> 'a -> bool
end
)
(
Locations.Location_Bytes.Datatype
)
(
sig
end
)
module Mem_Exec_Datatype: sig
.. end
module Mem_Exec: Kernel_function.Make_Table
(
Mem_Exec_Datatype
)
(
sig
end
)
exception Not_found_lonely_key
exception Found_misaligned_base
val wrap_int : Cvalue_type.V.t -> Cvalue_type.V_Offsetmap.t option
val wrap_double : Cvalue_type.V.t -> Cvalue_type.V_Offsetmap.t option
val wrap_ptr : Cvalue_type.V.t -> Cvalue_type.V_Offsetmap.t option
val compute_call : Kernel_function.t ->
call_kinstr:Cil_types.kinstr ->
Relations_type.Model.t ->
(Cil_types.exp * Cvalue_type.V.z) list ->
Mem_Exec_Datatype.V_Offsetmap_option.t * Relations_type.Model.t *
Locations.Location_Bits.Top_Param.t
val memoize : Mem_Exec.key -> unit
val force_compute : unit -> unit