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
77a7ca18
Commit
77a7ca18
authored
11 years ago
by
MARCHE Claude
Browse files
Options
Downloads
Plain Diff
Merge branch 'claude'
parents
503ddd14
ab3433fa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/ocaml32.drv
+1
-0
1 addition, 0 deletions
drivers/ocaml32.drv
examples/in_progress/mp.mlw
+3
-1
3 additions, 1 deletion
examples/in_progress/mp.mlw
with
4 additions
and
1 deletion
drivers/ocaml32.drv
+
1
−
0
View file @
77a7ca18
...
...
@@ -31,6 +31,7 @@ module mach.int.UInt32
syntax converter of_int "%1L"
syntax function to_int "(Why3__BigInt.of_int64 %1)"
syntax constant zero_unsigned "0L"
syntax type uint32 "Int64.t"
syntax val (+) "Int64.add"
...
...
This diff is collapsed.
Click to expand it.
examples/in_progress/mp.mlw
+
3
−
1
View file @
77a7ca18
...
...
@@ -393,6 +393,7 @@ module N
raises { TooManyDigits -> true }
= let lx = x.digits.length in
let ly = y.digits.length in
(* TODO: predict carry to enlarge with 1 more cell if carry may occur *)
if Int31.(<) lx ly then enlarge x ly;
add_aux_in_place x y.digits
...
...
@@ -424,7 +425,8 @@ module N
let add (x y:t) : t
ensures { value result = value x + value y }
raises { TooManyDigits -> true }
= let lx = x.digits.length in
= (* TODO: just copy x or y and call add_in_place, and throw away add_array *)
let lx = x.digits.length in
let ly = y.digits.length in
if Int31.(>=) lx ly then
{ digits = add_array x.digits y.digits }
...
...
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