module R:to store the results of computations : we store a result for each edge, and also a list of proof obligations.sig
..end
Be careful that there are two modes of computation :
the first one (Pass1
) is used to collect arbitrary invariants,
while the second (after change_mode
) is the "normal" mode.
See Calculus.Cfg.R.set
for more details.
type
t = {
|
mutable mode : |
|
keep_res : |
|
cfg : |
|
tbl : |
|
inv : |
|
mutable obligs : |
val empty : keep:bool -> Cil2cfg.t -> t
val add_oblig : t -> Cil_types.logic_label -> W.t_prop -> unit
val find : t -> Cil2cfg.edge -> W.t_prop
val change_mode : t -> unit
val set : WpAnnot.strategy ->
W.t_env -> t -> Cil2cfg.edge -> W.t_prop -> W.t_prop
collect_inv
as Ahyp and Agoal to the loop edges. H => [ B /\ (B => (G /\ P)) ]
val wp_loop : Cil2cfg.t ->
WpAnnot.strategy ->
t ->
Cil2cfg.node ->
Cil2cfg.edge ->
(Cil2cfg.node -> W.t_prop) -> (W.t_prop -> W.t_prop) -> W.t_prop
nloop
.
Be very careful not to make an infinite loop by calling get_loop_head
...