Frama-C API - Logic_inout
Functions used by the Inout and From plugins to interpret predicate and assigns clauses. This API may change according to these plugins development.
val predicate_deps : pre:Frama_c_kernel.Cvalue.Model.t -> here:Frama_c_kernel.Cvalue.Model.t -> Frama_c_kernel.Cil_types.predicate -> Frama_c_kernel.Locations.Zone.t optionpredicate_deps ~pre ~here p computes the logic dependencies needed to evaluate the predicate p in cvalue state here, in a function whose pre-state is pre. Returns None on either an evaluation error or on unsupported construct.
val valid_behaviors : Frama_c_kernel.Cil_types.kernel_function -> Frama_c_kernel.Cvalue.Model.t -> Frama_c_kernel.Cil_types.behavior listReturns the list of behaviors of the given function that are active for the given initial state.
val assigns_inputs_to_zone : Frama_c_kernel.Cvalue.Model.t -> Frama_c_kernel.Cil_types.assigns -> Frama_c_kernel.Locations.Zone.tEvaluation of the memory zone read by the \from part of an assigns clause, in the given cvalue state.
val assigns_outputs_to_zone : result:Frama_c_kernel.Cil_types.varinfo option -> Frama_c_kernel.Cvalue.Model.t -> Frama_c_kernel.Cil_types.assigns -> Frama_c_kernel.Locations.Zone.tEvaluation of the memory zone written by an assigns clauses, in the given cvalue state.
type tlval_zones = {under : Frama_c_kernel.Locations.Zone.t;(*Under-approximation of the memory zone.
*)over : Frama_c_kernel.Locations.Zone.t;(*Over-approximation of the memory zone.
*)deps : Frama_c_kernel.Locations.Zone.t;(*Dependencies needed to evaluate the address.
*)
}Zones of an lvalue term of an assigns clause.
Context of an evaluation: in a statement annotation or an assigns clause.
val tlval_to_zones : annotation -> Frama_c_kernel.Cvalue.Model.t -> Frama_c_kernel.Locations.access -> Frama_c_kernel.Cil_types.term -> tlval_zones optionEvaluation of the memory zones and dependencies of an lvalue term, in the given cvalue state for a read or write access.
val verify_assigns : Frama_c_kernel.Cil_types.kernel_function -> pre:Frama_c_kernel.Cvalue.Model.t -> Assigns.t -> unitEvaluate the assigns clauses of the given function in its given pre-state, and compare them with the dependencies computed by the from plugin. Emits warnings if needed, and sets statuses to the assigns clauses.
val accept_base : formals:bool -> locals:bool -> Frama_c_kernel.Kernel_function.t -> Frama_c_kernel.Base.t -> boolaccept_base ~formals ~locals kf b returns true if and only if b is:
- a global except if it represents a string literal
- a formal or local of one of the callers of
kf - a formal or local of
kfand the corresponding argument istrue.
