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
125
Issues
125
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
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
ced60b99
Commit
ced60b99
authored
Feb 03, 2017
by
Mário Pereira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code extraction (wip)
Erasure of ghost code in statements sequence
parent
54bfdf27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
src/mlw/compile.ml
src/mlw/compile.ml
+5
-3
src/mlw/ocaml_printer.ml
src/mlw/ocaml_printer.ml
+1
-0
No files found.
src/mlw/compile.ml
View file @
ced60b99
...
...
@@ -346,6 +346,8 @@ module Translate = struct
ML
.
mk_expr
(
ML
.
Econst
c
)
(
ML
.
I
e
.
e_ity
)
eff
|
Evar
pvs
->
ML
.
mk_expr
(
ML
.
Evar
pvs
)
(
ML
.
I
e
.
e_ity
)
eff
|
Elet
(
LDvar
(
pvs
,
e1
)
,
e2
)
when
is_underscore
pvs
&&
e_ghost
e2
->
ML
.
mk_expr
(
ML
.
eseq
(
expr
info
e1
)
ML
.
mk_unit
)
(
ML
.
I
e
.
e_ity
)
eff
|
Elet
(
LDvar
(
pvs
,
e1
)
,
e2
)
when
is_underscore
pvs
->
ML
.
mk_expr
(
ML
.
eseq
(
expr
info
e1
)
(
expr
info
e2
))
(
ML
.
I
e
.
e_ity
)
eff
|
Elet
(
LDvar
(
pvs
,
e1
)
,
e2
)
when
e_ghost
e1
->
...
...
@@ -523,13 +525,13 @@ end
(** Erasure operations related to ghost code *)
module
Erasure
=
struct
(* module Erasure = struct *)
open
ML
(* open ML *)
end
(* end *)
(*
* Local Variables:
...
...
src/mlw/ocaml_printer.ml
View file @
ced60b99
...
...
@@ -419,6 +419,7 @@ let extract_module pargs ?old fmt ({mod_theory = th} as m) =
info_mo_known_map
=
m
.
mod_known
;
info_fname
=
None
;
(* TODO *)
}
in
fprintf
fmt
"(*@
\n
%a@
\n
*)"
print_module
m
;
fprintf
fmt
"(* This file has been generated from Why3 module %a *)@
\n
@
\n
"
Print
.
print_module_name
m
;
...
...
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