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
17
Merge Requests
17
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
66cfe43d
Commit
66cfe43d
authored
Apr 23, 2010
by
Francois Bobot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inlining driver aware
parent
a245cfc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
src/transform/inlining.ml
src/transform/inlining.ml
+10
-8
No files found.
src/transform/inlining.ml
View file @
66cfe43d
...
...
@@ -66,7 +66,7 @@ and replacep env f =
and
substt
env
d
=
t_map
(
replacet
env
)
(
replacep
env
)
d
and
substp
env
d
=
f_map
(
replacet
env
)
(
replacep
env
)
d
let
fold
isnotinlinedt
isnotinlinedf
d
(
env
,
task
)
=
let
fold
q
isnotinlinedt
isnotinlinedf
d
(
env
,
task
)
=
(* Format.printf "I see : %a@\n%a@\n" Pretty.print_decl d print_env env;*)
match
d
.
d_node
with
|
Dlogic
[
ls
,
ld
]
->
begin
...
...
@@ -77,13 +77,15 @@ let fold isnotinlinedt isnotinlinedf d (env, task) =
match
e
with
|
Term
t
->
let
t
=
replacet
env
t
in
if
t_s_any
ffalse
((
==
)
ls
)
t
||
isnotinlinedt
t
if
isnotinlinedt
t
||
Driver
.
query_remove
q
ls
.
ls_name
||
t_s_any
ffalse
((
==
)
ls
)
t
then
env
,
add_decl
task
(
create_logic_decl
[
make_fs_defn
ls
vs
t
])
else
{
env
with
fs
=
Mls
.
add
ls
(
vs
,
t
)
env
.
fs
}
,
task
|
Fmla
f
->
let
f
=
replacep
env
f
in
if
f_s_any
ffalse
((
==
)
ls
)
f
||
isnotinlinedf
f
if
isnotinlinedf
f
||
Driver
.
query_remove
q
ls
.
ls_name
||
f_s_any
ffalse
((
==
)
ls
)
f
then
env
,
add_decl
task
(
create_logic_decl
[
make_ps_defn
ls
vs
f
])
else
{
env
with
ps
=
Mls
.
add
ls
(
vs
,
f
)
env
.
ps
}
,
task
...
...
@@ -105,15 +107,15 @@ let fold isnotinlinedt isnotinlinedf d (env, task) =
|
Dprop
(
k
,
pr
,
f
)
->
env
,
add_decl
task
(
create_prop_decl
k
pr
(
replacep
env
f
))
let
fold
isnotinlinedt
isnotinlinedf
task0
(
env
,
task
)
=
let
fold
q
isnotinlinedt
isnotinlinedf
task0
(
env
,
task
)
=
match
task0
.
task_decl
with
|
Decl
d
->
fold
isnotinlinedt
isnotinlinedf
d
(
env
,
task
)
|
Decl
d
->
fold
q
isnotinlinedt
isnotinlinedf
d
(
env
,
task
)
|
td
->
env
,
add_tdecl
task
td
let
t
~
isnotinlinedt
~
isnotinlinedf
=
Register
.
store
(
fun
()
->
Trans
.
fold_map
(
fold
isnotinlinedt
isnotinlinedf
)
Register
.
store
_query
(
fun
query
->
Trans
.
fold_map
(
fold
query
isnotinlinedt
isnotinlinedf
)
empty_env
None
)
let
all
=
t
~
isnotinlinedt
:
(
fun
_
->
false
)
~
isnotinlinedf
:
(
fun
_
->
false
)
...
...
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