Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Why3
why3
Commits
e6e5f3f0
Commit
e6e5f3f0
authored
12 years ago
by
MARCHE Claude
Browse files
Options
Downloads
Patches
Plain Diff
linked_list_rev: use of ghost variables
parent
6d9c66b4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/linked_list_rev.mlw
+3
-3
3 additions, 3 deletions
examples/linked_list_rev.mlw
with
3 additions
and
3 deletions
examples/linked_list_rev.mlw
+
3
−
3
View file @
e6e5f3f0
...
...
@@ -70,14 +70,14 @@ module InPlaceRev
val next : ref (map loc loc)
let in_place_reverse (l:loc) (lM:list loc) : loc
let in_place_reverse (l:loc) (
ghost
lM:list loc) : loc
requires { list_seg l !next lM null }
ensures { list_seg result !next (reverse lM) null }
= 'Init:
let p = ref l in
let pM = ref lM in
let
ghost
pM = ref lM in
let r = ref null in
let rM = ref (Nil : list loc) in
let
ghost
rM = ref (Nil : list loc) in
while !p <> null do
invariant { list_seg !p !next !pM null }
invariant { list_seg !r !next !rM null }
...
...
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