Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
2e10bbd8
Commit
2e10bbd8
authored
Mar 15, 2017
by
Mário Pereira
Browse files
Code extraction
Optimization of proxy variables.
parent
6ca2d4d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
drivers/ocaml64.drv
View file @
2e10bbd8
...
...
@@ -72,11 +72,11 @@ module ref.Ref
end
module ref.Refint
syntax val incr "%1 := Z.succ (
Pervasives.(!)
%1)"
syntax val decr "%1 := Z.pred (
Pervasives.(!)
%1)"
syntax val (+=) "%1 := Z.add (
Pervasives.(!)
%1) %2"
syntax val (-=) "%1 := Z.sub (
Pervasives.(!)
%1) %2"
syntax val ( *= ) "%1 := Z.mul (
Pervasives.(!)
%1) %2"
syntax val incr "%1 := Z.succ (
!
%1)"
syntax val decr "%1 := Z.pred (
!
%1)"
syntax val (+=) "%1 := Z.add (
!
%1) %2"
syntax val (-=) "%1 := Z.sub (
!
%1) %2"
syntax val ( *= ) "%1 := Z.mul (
!
%1) %2"
end
module null.Null
...
...
src/mlw/compile.ml
View file @
2e10bbd8
...
...
@@ -791,7 +791,8 @@ module Transform = struct
(* (\* because of Lvar we know the constructor is completely applied *\) *)
(* add_subst pv e1 e2 *)
|
Elet
(
Lvar
(
pv
,
e1
)
,
e2
)
when
Slab
.
mem
Expr
.
proxy_label
pv
.
pv_vs
.
vs_name
.
id_label
->
when
Slab
.
mem
Expr
.
proxy_label
pv
.
pv_vs
.
vs_name
.
id_label
&&
eff_pure
e1
.
e_effect
->
let
e1
=
expr
info
subst
e1
in
add_subst
pv
e1
e2
|
Elet
(
ld
,
e
)
->
...
...
src/mlw/ocaml_printer.ml
View file @
2e10bbd8
...
...
@@ -333,6 +333,7 @@ module Print = struct
(* avoids parenthesis around values *)
fprintf
fmt
"%a"
(
print_apply
info
(
Hrs
.
find_def
ht_rs
rs
rs
))
[]
|
Eapp
(
rs
,
pvl
)
->
eprintf
"rs->%s@."
rs
.
rs_name
.
id_string
;
fprintf
fmt
(
protect_on
paren
"%a"
)
(
print_apply
info
(
Hrs
.
find_def
ht_rs
rs
rs
))
pvl
|
Ematch
(
e
,
pl
)
->
...
...
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