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
119
Issues
119
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
d64f9981
Commit
d64f9981
authored
Feb 19, 2016
by
David Hauzar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update examples for counterexample generation.
parent
1628b802
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
examples/tests/cvc4-models.mlw
examples/tests/cvc4-models.mlw
+11
-4
No files found.
examples/tests/cvc4-models.mlw
View file @
d64f9981
...
...
@@ -5,6 +5,13 @@ module M
type int_type = Integer int
goal G : forall x "model" : int_type. match x with Integer y -> y > 0 end
let test_post (x "model" "model_trace:x" : int) (y "model" "model_trace:y" : ref int): unit
ensures { "model_vc_post" old !y >= x }
=
y := x - 1 + !y
(**********************************************************
** Getting counterexamples for terms of primitive types **
**********************************************************)
...
...
@@ -19,11 +26,11 @@ module M
x23 := !x23 + 1
let test_loop ( x "model" "model_trace:x" : ref int ): unit
ensures { !x < old !x }
ensures {
"model_vc_post"
!x < old !x }
=
incr x;
while "model" "model_trace:cond"
!x > 0 do
invariant {
!x >= 0
}
'L:
incr x;
'M: while
!x > 0 do
invariant {
"model_vc" !x > at !x 'L + at !x 'M
}
variant { !x }
x := !x - 1
done
...
...
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