Skip to content
Snippets Groups Projects
Commit 5f7ced90 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[wp] remove useless parameter in W.use_assigns

parent 3da9bb08
No related branches found
No related tags found
No related merge requests found
...@@ -76,12 +76,12 @@ module Cfg (W : Mcfg.S) = struct ...@@ -76,12 +76,12 @@ module Cfg (W : Mcfg.S) = struct
let add_assigns_hyp wenv obj h_assigns = match h_assigns with let add_assigns_hyp wenv obj h_assigns = match h_assigns with
| WpPropId.AssignsLocations (h_id, a) -> | WpPropId.AssignsLocations (h_id, a) ->
let hid = Some h_id in let hid = Some h_id in
let obj = W.use_assigns wenv a.WpPropId.a_stmt hid a obj in let obj = W.use_assigns wenv hid a obj in
Some a.WpPropId.a_label, obj Some a.WpPropId.a_label, obj
| WpPropId.AssignsAny a -> | WpPropId.AssignsAny a ->
Wp_parameters.warning ~current:true ~once:true Wp_parameters.warning ~current:true ~once:true
"Missing assigns clause (assigns 'everything' instead)" ; "Missing assigns clause (assigns 'everything' instead)" ;
let obj = W.use_assigns wenv a.WpPropId.a_stmt None a obj in let obj = W.use_assigns wenv None a obj in
Some a.WpPropId.a_label, obj Some a.WpPropId.a_label, obj
| WpPropId.NoAssignsInfo -> None, obj | WpPropId.NoAssignsInfo -> None, obj
...@@ -476,7 +476,7 @@ module Cfg (W : Mcfg.S) = struct ...@@ -476,7 +476,7 @@ module Cfg (W : Mcfg.S) = struct
| (Set (lv, e, _)) -> W.assign wenv s lv e obj | (Set (lv, e, _)) -> W.assign wenv s lv e obj
| (Asm _) -> | (Asm _) ->
let asm = WpPropId.mk_asm_assigns_desc s in let asm = WpPropId.mk_asm_assigns_desc s in
W.use_assigns wenv asm.WpPropId.a_stmt None asm obj W.use_assigns wenv None asm obj
| (Call _) -> assert false | (Call _) -> assert false
| Skip _ | Code_annot _ -> obj | Skip _ | Code_annot _ -> obj
end end
...@@ -652,7 +652,7 @@ module Cfg (W : Mcfg.S) = struct ...@@ -652,7 +652,7 @@ module Cfg (W : Mcfg.S) = struct
let obj = let obj =
if WpStrategy.isInitConst () if WpStrategy.isInitConst ()
then process_global_const wenv obj else obj in then process_global_const wenv obj else obj in
let obj = W.use_assigns wenv None None WpPropId.mk_init_assigns obj in let obj = W.use_assigns wenv None WpPropId.mk_init_assigns obj in
let obj = W.label wenv None Clabels.init obj in let obj = W.label wenv None Clabels.init obj in
compute_global_init wenv `All obj compute_global_init wenv `All obj
end end
......
...@@ -124,7 +124,7 @@ struct ...@@ -124,7 +124,7 @@ struct
Format.fprintf !out " %a -> %a [ style=dotted ] ;@." pretty u pretty k ; Format.fprintf !out " %a -> %a [ style=dotted ] ;@." pretty u pretty k ;
merge env u k merge env u k
let use_assigns _env _stmt region d k = let use_assigns _env region d k =
let u = node () in let u = node () in
begin match region with begin match region with
| None -> | None ->
......
...@@ -598,9 +598,9 @@ struct ...@@ -598,9 +598,9 @@ struct
let sequence = { pre=s0 ; post=s1 } in let sequence = { pre=s0 ; post=s1 } in
sequence , assigned sequence , assigned
let use_assigns wenv stmt hpid ainfo wp = in_wenv wenv wp let use_assigns wenv hpid ainfo wp = in_wenv wenv wp
begin fun env wp -> begin fun env wp ->
assert (stmt == ainfo.a_stmt) ; let stmt = ainfo.a_stmt in
match ainfo.a_assigns with match ainfo.a_assigns with
| WritesAny -> | WritesAny ->
......
...@@ -73,8 +73,8 @@ module type S = sig ...@@ -73,8 +73,8 @@ module type S = sig
(** [use_assigns env hid kind assgn goal] performs the havoc on the goal. (** [use_assigns env hid kind assgn goal] performs the havoc on the goal.
* [hid] should be [None] iff [assgn] is [WritesAny], * [hid] should be [None] iff [assgn] is [WritesAny],
* and tied to the corresponding identified_property otherwise.*) * and tied to the corresponding identified_property otherwise.*)
val use_assigns : t_env -> stmt option -> WpPropId.prop_id option -> val use_assigns : t_env ->
WpPropId.assigns_desc -> t_prop -> t_prop WpPropId.prop_id option -> WpPropId.assigns_desc -> t_prop -> t_prop
val label : t_env -> stmt option -> Clabels.c_label -> t_prop -> t_prop val label : t_env -> stmt option -> Clabels.c_label -> t_prop -> t_prop
val init : t_env -> varinfo -> init option -> t_prop -> t_prop val init : t_env -> varinfo -> init option -> t_prop -> t_prop
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment