Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
b6464fac
Commit
b6464fac
authored
Jan 21, 2013
by
Jean-Christophe Filliâtre
Browse files
verifythis_fm2012_treedel: left and right are ghost functions
parent
4d1a93e2
Changes
1
Show whitespace changes
Inline
Side-by-side
examples/programs/verifythis_fm2012_treedel.mlw
View file @
b6464fac
...
@@ -66,12 +66,12 @@ module Treedel
...
@@ -66,12 +66,12 @@ module Treedel
forall z "induction": zipper 'a, x: 'a, l r: tree 'a.
forall z "induction": zipper 'a, x: 'a, l r: tree 'a.
inorder (zip (Node l x r) z) = inorder l ++ Cons x (inorder (zip r z))
inorder (zip (Node l x r) z) = inorder l ++ Cons x (inorder (zip r z))
let left (t: tree pointer) =
let
ghost
left (t: tree pointer) =
requires { t <> Empty }
requires { t <> Empty }
ensures { match t with Empty -> false | Node l _ _ -> result = l end }
ensures { match t with Empty -> false | Node l _ _ -> result = l end }
match t with Empty -> absurd | Node l _ _ -> l end
match t with Empty -> absurd | Node l _ _ -> l end
let right (t: tree pointer) =
let
ghost
right (t: tree pointer) =
requires { t <> Empty }
requires { t <> Empty }
ensures { match t with Empty -> false | Node _ _ r -> result = r end }
ensures { match t with Empty -> false | Node _ _ r -> result = r end }
match t with Empty -> absurd | Node _ _ r -> r end
match t with Empty -> absurd | Node _ _ r -> r end
...
...
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