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
121
Issues
121
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
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
bb11c2df
Commit
bb11c2df
authored
Aug 22, 2011
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proof in progress: heap_implem.extractMin
parent
f5583575
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
379 additions
and
218 deletions
+379
-218
examples/programs/vacid_0_binary_heaps/heap.why
examples/programs/vacid_0_binary_heaps/heap.why
+6
-7
examples/programs/vacid_0_binary_heaps/heap_implem.mlw
examples/programs/vacid_0_binary_heaps/heap_implem.mlw
+1
-0
examples/programs/vacid_0_binary_heaps/proofs/why3session.xml
...ples/programs/vacid_0_binary_heaps/proofs/why3session.xml
+372
-211
No files found.
examples/programs/vacid_0_binary_heaps/heap.why
View file @
bb11c2df
...
...
@@ -50,13 +50,12 @@ lemma Is_heap_sub2 :
forall j: int. 0 <= j <= n -> is_heap_array a j n
lemma Is_heap_when_node_modified :
forall a:map, n e idx:int.
is_heap_array a idx n
-> forall i : int. 0 <= i < n
-> (i > 0 -> A.get a (parent i) <= e )
-> (left i < n -> e <= A.get a (left i))
-> (right i < n -> e <= A.get a (right i))
-> is_heap_array (A.set a i e) idx n
forall a:map, n e idx i:int. 0 <= i < n ->
is_heap_array a idx n ->
(i > 0 -> A.get a (parent i) <= e ) ->
(left i < n -> e <= A.get a (left i)) ->
(right i < n -> e <= A.get a (right i)) ->
is_heap_array (A.set a i e) idx n
lemma Is_heap_add_last :
forall a:map, n e:int. n > 0 ->
...
...
examples/programs/vacid_0_binary_heaps/heap_implem.mlw
View file @
bb11c2df
...
...
@@ -97,6 +97,7 @@ let extractMin (this : ref logic_heap) : int =
if
(
!i < n') then
begin
arr
:=
A
.
set
!arr !i last;
assert
{
!i > 0 -> is_heap_array !arr 0 n' };
assert
{
is_heap_array
!arr 0 n' };
assert
{
model
!this = add min (model (!arr,n')) }
end
;
...
...
examples/programs/vacid_0_binary_heaps/proofs/why3session.xml
View file @
bb11c2df
This diff is collapsed.
Click to expand it.
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