Skip to content
Snippets Groups Projects
Commit c6d61b96 authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[wp] Prove main requires

parent 94f2f7cc
No related branches found
No related tags found
No related merge requests found
...@@ -363,6 +363,11 @@ struct ...@@ -363,6 +363,11 @@ struct
let req = default_requires mode kf in let req = default_requires mode kf in
let bhv = CfgAnnot.get_behavior kf Kglobal has_exit ~active:[] mode.bhv in let bhv = CfgAnnot.get_behavior kf Kglobal has_exit ~active:[] mode.bhv in
let prove_if_main env ps =
if not @@ WpStrategy.is_main_init kf then Extlib.id
else List.fold_right (prove_property env) ps
in
env.we , env.we ,
(* global init *) (* global init *)
W.close env.we @@ W.close env.we @@
...@@ -372,6 +377,7 @@ struct ...@@ -372,6 +377,7 @@ struct
W.label env.we None Clabels.pre @@ W.label env.we None Clabels.pre @@
List.fold_right (use_property env) req @@ List.fold_right (use_property env) req @@
List.fold_right (use_property env) bhv.bhv_assumes @@ List.fold_right (use_property env) bhv.bhv_assumes @@
prove_if_main env bhv.bhv_requires @@
List.fold_right (use_property env) bhv.bhv_requires @@ List.fold_right (use_property env) bhv.bhv_requires @@
List.fold_right (use_property env) (behaviors kf) @@ List.fold_right (use_property env) (behaviors kf) @@
List.fold_right (prove_property env) (complete mode kf) @@ List.fold_right (prove_property env) (complete mode kf) @@
......
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