Module C2Codex.Make
Parameters
module CallingContext : CallingContextSignature
val iter_on_alarms :
(Frama_c_kernel.Alarms.t ->
Frama_c_kernel.Cil_types.location ->
Codex.Lattices.Quadrivalent.t ->
unit) ->
unitIterate on all registered alarms.
Delete all the registered alarms, use only if you know what you are doing
Delete all the registered assertions, use only if you know what you are doing
Iterate f on all registered assertions. f receives the location of the assertion, and strings indicating the status and method to solve the assertion.
type context = {loop_nesting_level : int;kinstr : Frama_c_kernel.Cil_types.kinstr;ctx : Domain.Context.t;
}type state = {mem : Domain.memory;var_addresses : Domain.binary VarMap.t;string_addresses : Domain.binary StringMap.t;context : context;
}type funcall =
Frama_c_kernel.Kernel_function.t ->
(Units.In_bits.t * Domain.binary) list ->
state ->
(Units.In_bits.t * Domain.binary) option * state optionval analyze_summary :
Types.TypedC.typ ->
(Units.In_bits.t * Domain.binary) list ->
state ->
(Units.In_bits.t * Domain.binary) option * stateval init_function_args :
state ->
Frama_c_kernel.Kernel_function.t ->
(Units.In_bits.t * Domain.binary) list ->
statetype return_result = | Return_fails| Return_result of {return_state : state;return_value : (Units.In_bits.t * Domain.binary) option;
}
Result of the analysis of a return instruction:
Return_failsmeans that the execution always trigger an undefined behaviour (e.g. return 1/0).Return_result{state;return_value=None}is forreturn;statements;Return_result{state;return_value=(size,value)}is forreturn value;statements, where size=8*sizeof(value) (i.e. the size of value in bits).
Transitions can be a regular instruction or a return instruction:
- return instructions return a
return_result; - normal instruction return (State None) when the result is Bottom, or State(Some _) otherwise.
val transition :
funcall:funcall ->
Frama_c_kernel.Interpreted_automata.vertex
Frama_c_kernel.Interpreted_automata.transition ->
state ->
ret_transitionval cond_node :
Frama_c_kernel.Cil_types.exp ->
state ->
(Domain.boolean * state) optionval expression :
Frama_c_kernel.Cil_types.exp ->
state ->
(Domain.binary * state) optionval initial_state_ret :
Frama_c_kernel.Kernel_function.t ->
CallingContext.t ->
state option * (Units.In_bits.t * Domain.binary) list * Types.TypedC.typinitial_state_ret kf root receives a kernel function and the root calling context, and returns the initial state, the arguments and the expected return type.
val pretty_state : Stdlib.Format.formatter -> state -> unitval pretty_state_option : Stdlib.Format.formatter -> state option -> unit