Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
30779d95
Commit
30779d95
authored
4 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Fixes formals scope
parent
4831554b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/wp/cfgCalculus.ml
+14
-15
14 additions, 15 deletions
src/plugins/wp/cfgCalculus.ml
with
14 additions
and
15 deletions
src/plugins/wp/cfgCalculus.ml
+
14
−
15
View file @
30779d95
...
@@ -347,13 +347,6 @@ struct
...
@@ -347,13 +347,6 @@ struct
if
not
(
is_default_bhv
mode
)
then
[]
if
not
(
is_default_bhv
mode
)
then
[]
else
CfgAnnot
.
get_disjoint_behaviors
kf
else
CfgAnnot
.
get_disjoint_behaviors
kf
let
body
env
~
ensures
~
exits
w
=
let
rw
=
List
.
fold_right
(
prove_property
env
)
ensures
w
in
let
rk
=
List
.
fold_right
(
prove_property
env
)
exits
env
.
wk
in
Vhash
.
add
env
.
wp
env
.
cfg
.
return_point
(
Some
rw
)
;
env
.
wk
<-
rk
;
wp
env
env
.
cfg
.
entry_point
(* Putting everything together *)
(* Putting everything together *)
let
compute
~
mode
~
props
=
let
compute
~
mode
~
props
=
let
kf
=
mode
.
kf
in
let
kf
=
mode
.
kf
in
...
@@ -386,16 +379,22 @@ struct
...
@@ -386,16 +379,22 @@ struct
(* frame-in *)
(* frame-in *)
W
.
scope
env
.
we
xs
SC_Frame_in
@@
W
.
scope
env
.
we
xs
SC_Frame_in
@@
(* function body *)
(* function body *)
body
env
begin
fun
w
->
~
ensures
:
bhv
.
bhv_ensures
Vhash
.
add
env
.
wp
env
.
cfg
.
return_point
(
Some
w
)
;
~
exits
:
bhv
.
bhv_exits
@@
wp
env
env
.
cfg
.
entry_point
end
@@
(* frame-out *)
(* frame-out *)
W
.
label
env
.
we
None
Clabels
.
post
@@
(
fun
t
->
if
not
has_exit
then
env
.
wk
<-
t
else
env
.
wk
<-
prove_assigns
env
bhv
.
bhv_exit_assigns
t
;
prove_assigns
env
bhv
.
bhv_post_assigns
t
)
@@
W
.
scope
env
.
we
xs
SC_Frame_out
@@
W
.
scope
env
.
we
xs
SC_Frame_out
@@
(* Post-conds*)
W
.
label
env
.
we
None
Clabels
.
post
@@
begin
fun
w
->
env
.
wk
<-
List
.
fold_right
(
prove_property
env
)
bhv
.
bhv_exits
@@
if
not
has_exit
then
w
else
prove_assigns
env
bhv
.
bhv_exit_assigns
w
;
List
.
fold_right
(
prove_property
env
)
bhv
.
bhv_ensures
@@
prove_assigns
env
bhv
.
bhv_post_assigns
w
end
@@
(* wp-end *)
(* wp-end *)
W
.
empty
W
.
empty
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment