Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Why3
why3
Commits
23ef5a93
Commit
23ef5a93
authored
Jun 02, 2015
by
Jean-Christophe Filliâtre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
next_digit_sum: proof in progress
parent
bdf7e149
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
561 additions
and
7 deletions
+561
-7
.gitignore
.gitignore
+0
-1
examples/in_progress/next_digit_sum.mlw
examples/in_progress/next_digit_sum.mlw
+10
-6
examples/in_progress/next_digit_sum/why3session.xml
examples/in_progress/next_digit_sum/why3session.xml
+551
-0
examples/in_progress/next_digit_sum/why3shapes.gz
examples/in_progress/next_digit_sum/why3shapes.gz
+0
-0
No files found.
.gitignore
View file @
23ef5a93
...
...
@@ -214,7 +214,6 @@ pvsbin/
/examples/in_progress/wcet_hull/
/examples/in_progress/binary_search2/
/examples/in_progress/binary_search_c/
/examples/in_progress/next_digit_sum/
/examples/in_progress/vacid_0_red_black_trees_harness/
/examples/why3bench.html
/examples/why3regtests.err
...
...
examples/in_progress/next_digit_sum.mlw
View file @
23ef5a93
...
...
@@ -35,14 +35,18 @@ module M
(* to allow provers to prove that an assignment does not change the
interpretation on the left (or on the right); requires induction *)
lemma Interp_eq:
forall x1 x2 : M.map int int, i j : int.
(forall k : int. i <= k < j -> M.get x1 k = M.get x2 k) ->
interp x1 i j = interp x2 i j
let rec lemma interp_eq
(x1 x2 : M.map int int) (i j : int)
requires { forall k : int. i <= k < j -> M.get x1 k = M.get x2 k }
ensures { interp x1 i j = interp x2 i j }
variant { j - i }
= if i < j then interp_eq x1 x2 (i+1) j
(* the sum of the elements of x[i..j[ *)
type map_int = M.map int int
clone export sum.Sum with type container = map_int, function f = M.get
use int.Sum
function sum (m: M.map int int) (i j: int) : int =
Sum.sum i (j - 1) (\ k: int. M.get m k)
lemma Sum_is_sum_digits_interp:
forall x : M.map int int, i j : int.
...
...
examples/in_progress/next_digit_sum/why3session.xml
0 → 100644
View file @
23ef5a93
This diff is collapsed.
Click to expand it.
examples/in_progress/next_digit_sum/why3shapes.gz
0 → 100644
View file @
23ef5a93
File added
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