Commit 9874f16a authored by MARCHE Claude's avatar MARCHE Claude
Browse files

add function

parent 67ffdc8a
...@@ -384,6 +384,15 @@ module WP ...@@ -384,6 +384,15 @@ module WP
ident ident
{ fresh_in_fmla result q } { fresh_in_fmla result q }
val abstract_effects (i:stmt) (f:fmla) :
{ }
fmla
{ forall sigma pi sigma' pi':env .
eval_fmla sigma pi f /\
assigns sigma pi (stmt_writes i) sigma' pi' ->
eval_fmla sigma' pi' f
}
let rec wp (i:stmt) (q:fmla) = let rec wp (i:stmt) (q:fmla) =
{ true } { true }
match i with match i with
...@@ -399,9 +408,10 @@ module WP ...@@ -399,9 +408,10 @@ module WP
(* Fand f q *) (* strict wp, termination required *) (* Fand f q *) (* strict wp, termination required *)
| Swhile e inv i -> | Swhile e inv i ->
Fand inv Fand inv
((*Fforall*) (Fand (abstract_effects i
(Fimplies (Fand (Fterm e) inv) (wp i inv)) (Fand
(Fimplies (Fand (Fnot (Fterm e)) inv) q))) (Fimplies (Fand (Fterm e) inv) (wp i inv))
(Fimplies (Fand (Fnot (Fterm e)) inv) q)))
end end
{ valid_triple result i q } { valid_triple result i q }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment