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
7ba519d5
Commit
7ba519d5
authored
May 04, 2017
by
Mário Pereira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Driver for randomize operations
parent
932f1898
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
drivers/ocaml64.drv
drivers/ocaml64.drv
+7
-0
modules/mach/int.mlw
modules/mach/int.mlw
+1
-1
No files found.
drivers/ocaml64.drv
View file @
7ba519d5
...
...
@@ -224,6 +224,13 @@ module mach.int.Int63
syntax val of_bv "(fun x -> x)"*)
end
module mach.int.Random63
syntax val init "Random.init %1"
syntax val self_init "Random.self_init"
syntax val random_bool "Random.bool"
syntax val random_int63 "Random.int %1"
end
module mach.peano.Peano
syntax type t "int"
syntax val to_int "Z.of_int %1"
...
...
modules/mach/int.mlw
View file @
7ba519d5
...
...
@@ -334,7 +334,7 @@ module Random63
= random_bool s
let random_int63 (n: int63) : int63
requires { 0 < n }
requires { 0 < n }
(* FIXME: n should be less than 2^30 *)
ensures { s.state = next (old s.state) }
ensures { result = get_int s.state n }
ensures { 0 <= result < n }
...
...
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