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
122
Issues
122
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
fb5aefde
Commit
fb5aefde
authored
Jun 07, 2017
by
Raphael Rieu-Helft
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ghostify useless variables, add ignore to extraction
parent
642afad9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
examples/in_progress/multiprecision/mp2.mlw
examples/in_progress/multiprecision/mp2.mlw
+7
-7
src/mlw/cprinter.ml
src/mlw/cprinter.ml
+6
-1
No files found.
examples/in_progress/multiprecision/mp2.mlw
View file @
fb5aefde
...
...
@@ -5478,7 +5478,7 @@ let divmod_1 (q x:t) (y:limb) (sz:int32) : limb
C.set_ofs nx sx limb_zero;
value_sub_frame_shift (pelts x) (pelts nx) x.offset nx.offset (p2i sx);
label Div2_ns in
let _qh = divmod_2 q nx y (Int32.(+) sx one) in
let
ghost
_qh = divmod_2 q nx y (Int32.(+) sx one) in
copy r nx sy;
assert { value x sx
= value q (sx - sy + 1) * value y sy
...
...
@@ -5518,7 +5518,7 @@ let divmod_1 (q x:t) (y:limb) (sz:int32) : limb
()
end
else begin
let _c = lshift ny y sy (Limb.of_int32 clz) in
let
ghost
_c = lshift ny y sy (Limb.of_int32 clz) in
begin
ensures { normalized ny sy }
ensures { value ny sy = power 2 clz * value y sy }
...
...
@@ -5584,8 +5584,8 @@ let divmod_1 (q x:t) (y:limb) (sz:int32) : limb
end;
label Div2_s in
(* TODO don't add 1 when not needed, cf "adjust" in GMP algo *)
let _qh = divmod_2 q nx ny (Int32.(+) sx one) in
let _l = rshift r nx sy (Limb.of_int32 clz) in
let
ghost
_qh = divmod_2 q nx ny (Int32.(+) sx one) in
let
ghost
_l = rshift r nx sy (Limb.of_int32 clz) in
begin ensures { value nx 2 = p * value r 2 }
assert { _l = 0
by
...
...
@@ -5712,7 +5712,7 @@ let divmod_1 (q x:t) (y:limb) (sz:int32) : limb
C.set_ofs nx sx limb_zero;
value_sub_frame_shift (pelts x) (pelts nx) x.offset nx.offset (p2i sx);
label Div_ns in
let _qh = div_sb_qr q nx y (Int32.(+) sx one) sy in
let
ghost
_qh = div_sb_qr q nx y (Int32.(+) sx one) sy in
copy r nx sy;
assert { value x sx
= value q (sx - sy + 1) * value y sy
...
...
@@ -5830,8 +5830,8 @@ let divmod_1 (q x:t) (y:limb) (sz:int32) : limb
end;
label Div_s in
(* TODO don't add 1 when not needed, cf "adjust" in GMP algo *)
let _qh = div_sb_qr q nx ny (Int32.(+) sx one) sy in
let _l = rshift r nx sy (Limb.of_int32 clz) in
let
ghost
_qh = div_sb_qr q nx ny (Int32.(+) sx one) sy in
let
ghost
_l = rshift r nx sy (Limb.of_int32 clz) in
begin ensures { value nx sy = p * value r sy }
assert { _l = 0
by
...
...
src/mlw/cprinter.ml
View file @
fb5aefde
...
...
@@ -1193,7 +1193,12 @@ module MLToC = struct
|
Ematch
_
->
raise
(
Unsupported
"pattern matching"
)
|
Eabsurd
->
assert
false
|
Eassign
_
->
raise
(
Unsupported
"assign"
)
|
Ehole
|
Eignore
_
->
assert
false
|
Ehole
->
assert
false
|
Eignore
e
->
[]
,
C
.
Sseq
(
C
.
Sblock
(
expr
info
{
env
with
computes_return_value
=
false
}
e
)
,
if
env
.
computes_return_value
then
C
.
Sreturn
(
Enothing
)
else
C
.
Snop
)
|
Efun
_
->
raise
(
Unsupported
"higher order"
)
let
translate_decl
(
info
:
info
)
(
d
:
decl
)
:
C
.
definition
option
...
...
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