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
81ffa01d
Commit
81ffa01d
authored
11 years ago
by
MARCHE Claude
Browse files
Options
Downloads
Patches
Plain Diff
improved readability
parent
4b8b9981
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/defunctionalization.mlw
+2
-2
2 additions, 2 deletions
examples/defunctionalization.mlw
examples/defunctionalization/why3session.xml
+17
-17
17 additions, 17 deletions
examples/defunctionalization/why3session.xml
examples/fact.mlw
+7
-4
7 additions, 4 deletions
examples/fact.mlw
with
26 additions
and
23 deletions
examples/defunctionalization.mlw
+
2
−
2
View file @
81ffa01d
...
...
@@ -147,7 +147,7 @@ use import Expr
use HighOrd
function eval_1 (e:expr) (k:int
->
'a) : 'a =
function eval_1 (e:expr) (k:
int->'a) : 'a =
match e with
| Cte n -> k n
| Sub e1 e2 ->
...
...
@@ -161,7 +161,7 @@ function interpret_1 (p : prog) : int = eval_1 p (\ n. n)
use import DirectSem
lemma cps_correct_expr: forall e:expr, k:int
->
'a. eval_1 e k = k (eval_0 e)
lemma cps_correct_expr: forall e:expr, k:
int->'a. eval_1 e k = k (eval_0 e)
lemma cps_correct: forall p. interpret_1 p = interpret_0 p
...
...
This diff is collapsed.
Click to expand it.
examples/defunctionalization/why3session.xml
+
17
−
17
View file @
81ffa01d
...
...
@@ -187,7 +187,7 @@
prover=
"2"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"4.98"
/>
</proof>
...
...
@@ -195,7 +195,7 @@
prover=
"3"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.01"
/>
</proof>
...
...
@@ -203,7 +203,7 @@
prover=
"4"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"5.02"
/>
</proof>
...
...
@@ -601,7 +601,7 @@
memlimit=
"4000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"1.
5
9"
/>
<result
status=
"valid"
time=
"1.
8
9"
/>
</proof>
</goal>
<goal
...
...
@@ -868,7 +868,7 @@
prover=
"3"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"4.96"
/>
</proof>
...
...
@@ -876,7 +876,7 @@
prover=
"4"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"4.99"
/>
</proof>
...
...
@@ -948,9 +948,9 @@
prover=
"0"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"unknown"
time=
"0.
36
"
/>
<result
status=
"unknown"
time=
"0.
55
"
/>
</proof>
<proof
prover=
"1"
...
...
@@ -972,7 +972,7 @@
prover=
"3"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"4.97"
/>
</proof>
...
...
@@ -980,7 +980,7 @@
prover=
"4"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"4.98"
/>
</proof>
...
...
@@ -1016,7 +1016,7 @@
prover=
"2"
timelimit=
"5"
memlimit=
"4000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"4.99"
/>
</proof>
...
...
@@ -2155,7 +2155,7 @@
memlimit=
"1000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"1.
1
8"
/>
<result
status=
"valid"
time=
"1.
5
8"
/>
</proof>
<proof
prover=
"1"
...
...
@@ -2650,7 +2650,7 @@
prover=
"2"
timelimit=
"5"
memlimit=
"1000"
obsolete=
"
tru
e"
obsolete=
"
fals
e"
archived=
"false"
>
<result
status=
"timeout"
time=
"4.99"
/>
</proof>
...
...
@@ -3654,7 +3654,7 @@
memlimit=
"1000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"0.
10
"
/>
<result
status=
"valid"
time=
"0.
22
"
/>
</proof>
<proof
prover=
"2"
...
...
@@ -3734,7 +3734,7 @@
memlimit=
"1000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"
1
.8
1
"
/>
<result
status=
"valid"
time=
"
2
.8
2
"
/>
</proof>
</goal>
<goal
...
...
@@ -3754,7 +3754,7 @@
memlimit=
"1000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"
3.44
"
/>
<result
status=
"valid"
time=
"
4.70
"
/>
</proof>
<proof
prover=
"1"
...
...
@@ -3770,7 +3770,7 @@
memlimit=
"1000"
obsolete=
"false"
archived=
"false"
>
<result
status=
"valid"
time=
"0.
43
"
/>
<result
status=
"valid"
time=
"0.
65
"
/>
</proof>
</goal>
</transf>
...
...
This diff is collapsed.
Click to expand it.
examples/fact.mlw
+
7
−
4
View file @
81ffa01d
...
...
@@ -5,9 +5,11 @@ module FactRecursive
use import int.Fact
let rec fact_rec (x:int) : int variant {x} =
requires { x >= 0 } ensures { result = fact x }
if x = 0 then 1 else x * fact_rec (x-1)
let rec fact_rec (x:int) : int
requires { x >= 0 }
variant { x }
ensures { result = fact x }
= if x = 0 then 1 else x * fact_rec (x-1)
let test0 () = fact_rec 0
let test1 () = fact_rec 1
...
...
@@ -27,7 +29,8 @@ module FactImperative
= let y = ref 0 in
let r = ref 1 in
while !y < x do
invariant { 0 <= !y <= x /\ !r = fact !y }
invariant { 0 <= !y <= x }
invariant { !r = fact !y }
variant { x - !y }
y := !y + 1;
r := !r * !y
...
...
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