module WP: Calculus.Cfg
(
PO
)
val do_labels : W.t_env -> Cil2cfg.edge -> W.t_prop -> W.t_prop
Before storing something at a program point, we have to process the label
at that point.
val add_hyp : W.t_env -> W.t_prop -> WpAnnot.t_id_pred -> W.t_prop
val add_goal : W.t_env -> W.t_prop -> WpAnnot.t_id_pred -> W.t_prop
val add_assigns_goal : W.t_env -> WpAnnot.t_id_assigns -> W.t_prop -> W.t_prop
val add_inv_hyp : W.t_env -> W.t_prop -> W.t_prop -> W.t_prop
Similar to add_hyp
and add_goal
except that h
and g
already
come from computations, so they are already represented in the memory model
(no translation needed)
val add_inv_goal : W.t_env -> W.t_prop -> W.t_prop -> W.t_prop
module R: sig
.. end
to store the results of computations :
we store a result for each edge, and also a list of proof obligations.
val wp_call : W.t_env ->
WpAnnot.strategy ->
Cil_types.stmt ->
Cil_types.lval option ->
Cil_types.exp -> Cil_types.exp list -> W.t_prop -> W.t_prop -> W.t_prop
val wp_stmt : W.t_env -> Cil_types.stmt -> W.t_prop -> W.t_prop
val wp_scope : W.t_env -> Cil_types.varinfo list -> Mcfg.scope -> W.t_prop -> W.t_prop
val get_wp_edge : Kernel_function.t * Cil2cfg.t * WpAnnot.strategy * R.t * W.t_env ->
Cil2cfg.edge -> W.t_prop
Returns the WP stored for edge e
. Compute it if it is not already
there. Also handle the Acut annotations.
val get_only_succ : Kernel_function.t * Cil2cfg.t * WpAnnot.strategy * R.t * W.t_env ->
Cil2cfg.t -> Cil2cfg.node -> W.t_prop
val compute_wp_edge : Kernel_function.t * Cil2cfg.t * WpAnnot.strategy * R.t * W.t_env ->
Cil2cfg.edge -> W.t_prop
val process_global_init : W.t_env -> W.t_prop -> W.t_prop
WP of global initialisations.
val do_main_init_if_needed : W.t_env -> Kernel_function.t -> W.t_prop -> W.t_prop
If kf
is the 'main' function, process global initialisations
as if they were a kind of prelude of the 'main'.
val get_weakest_precondition : Cil2cfg.t ->
Kernel_function.t * Cil2cfg.t * WpAnnot.strategy * R.t * W.t_env ->
W.t_prop list
val add_axiom : WpAnnot.prop_id *
(string * Cil_types.logic_label list * Cil_types.predicate Cil_types.named) ->
unit
val compute : Cil2cfg.t ->
WpAnnot.strategy ->
W.t_prop list * (Format.formatter -> Cil2cfg.edge -> unit)