Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
126
Issues
126
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
b09cd5a4
Commit
b09cd5a4
authored
Aug 02, 2012
by
Andrei Paskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whyml: fix wp_lambda
parent
2aa32944
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/whyml/mlw_wp.ml
src/whyml/mlw_wp.ml
+7
-4
No files found.
src/whyml/mlw_wp.ml
View file @
b09cd5a4
...
...
@@ -179,6 +179,8 @@ let wp_forall_post v p f =
|
Some
t
,
p
->
wp_let
v
t
(
wp_implies
p
f
)
|
_
->
wp_forall
[
v
]
(
wp_implies
p
f
)
(* regs_of_reads, and therefore regs_of_effect, only take into account
reads in program expressions and ignore the variables in specification *)
let
regs_of_reads
eff
=
Sreg
.
union
eff
.
eff_reads
eff
.
eff_ghostr
let
regs_of_writes
eff
=
Sreg
.
union
eff
.
eff_writes
eff
.
eff_ghostw
let
regs_of_effect
eff
=
Sreg
.
union
(
regs_of_reads
eff
)
(
regs_of_writes
eff
)
...
...
@@ -828,8 +830,10 @@ and wp_abstract env c_eff c_q c_xq q xq =
in
backstep
proceed
c_q
c_xq
and
wp_
lambda
env
lr
l
=
and
wp_
fun_defn
env
lr
{
fun_ps
=
ps
;
fun_lambda
=
l
}
=
let
lab
=
fresh_mark
()
in
let
regs
=
ps
.
ps_subst
.
ity_subst_reg
in
let
regs
=
Mreg
.
map
(
fun
_
->
()
)
regs
in
let
args
=
List
.
map
(
fun
pv
->
pv
.
pv_vs
)
l
.
l_args
in
let
env
=
if
lr
=
0
||
l
.
l_variant
=
[]
then
env
else
let
lab
=
t_var
lab
in
...
...
@@ -841,11 +845,10 @@ and wp_lambda env lr l =
let
conv
p
=
old_mark
lab
(
wp_expl
expl_xpost
p
)
in
let
f
=
wp_expr
env
l
.
l_expr
q
(
Mexn
.
map
conv
l
.
l_xpost
)
in
let
f
=
wp_implies
l
.
l_pre
(
erase_mark
lab
f
)
in
let
f
=
quantify
env
(
regs_of_effect
l
.
l_expr
.
e_effect
)
f
in
wp_forall
args
f
wp_forall
args
(
quantify
env
regs
f
)
and
wp_rec_defn
env
{
rec_defn
=
rdl
;
rec_letrec
=
lr
}
=
List
.
map
(
fun
rd
->
wp_lambda
env
lr
rd
.
fun_lambda
)
rdl
List
.
map
(
wp_fun_defn
env
lr
)
rdl
(***
let bool_to_prop env f =
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment