Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
d44a1535
Commit
d44a1535
authored
Dec 02, 2019
by
Julien Signoles
Browse files
[e-acsl:archi] fix bug with initial environments of functions
parent
a26e5ceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/e-acsl/src/code_generator/injector.ml
View file @
d44a1535
...
@@ -589,7 +589,7 @@ let add_malloc_and_free_stmts kf fundec =
...
@@ -589,7 +589,7 @@ let add_malloc_and_free_stmts kf fundec =
to keep the corresponding entries in the table managing them. *)
to keep the corresponding entries in the table managing them. *)
At_with_lscope
.
Malloc
.
remove_all
kf
At_with_lscope
.
Malloc
.
remove_all
kf
let
inject_in_fundec
env
main
fundec
=
let
inject_in_fundec
main
fundec
=
let
vi
=
fundec
.
svar
in
let
vi
=
fundec
.
svar
in
let
kf
=
try
Globals
.
Functions
.
get
vi
with
Not_found
->
assert
false
in
let
kf
=
try
Globals
.
Functions
.
get
vi
with
Not_found
->
assert
false
in
(* convert ghost variables *)
(* convert ghost variables *)
...
@@ -603,7 +603,7 @@ let inject_in_fundec env main fundec =
...
@@ -603,7 +603,7 @@ let inject_in_fundec env main fundec =
Options
.
feedback
~
dkey
~
level
:
2
"entering in function %a."
Options
.
feedback
~
dkey
~
level
:
2
"entering in function %a."
Kernel_function
.
pretty
kf
;
Kernel_function
.
pretty
kf
;
(* recursive visit *)
(* recursive visit *)
let
env
=
inject_in_block
e
nv
kf
fundec
.
sbody
in
let
env
=
inject_in_block
E
nv
.
empty
kf
fundec
.
sbody
in
Exit_points
.
clear
()
;
Exit_points
.
clear
()
;
add_generated_variables_in_function
env
fundec
;
add_generated_variables_in_function
env
fundec
;
add_malloc_and_free_stmts
kf
fundec
;
add_malloc_and_free_stmts
kf
fundec
;
...
@@ -657,7 +657,7 @@ let inject_in_global (env, main) = function
...
@@ -657,7 +657,7 @@ let inject_in_global (env, main) = function
(* function definition *)
(* function definition *)
|
GFun
(
fundec
,
_
)
->
|
GFun
(
fundec
,
_
)
->
inject_in_fundec
env
main
fundec
inject_in_fundec
main
fundec
(* other globals: nothing to do *)
(* other globals: nothing to do *)
|
GType
_
|
GType
_
...
@@ -783,6 +783,6 @@ let inject () =
...
@@ -783,6 +783,6 @@ let inject () =
(*
(*
Local Variables:
Local Variables:
compile-command: "make -C ../.."
compile-command: "make -C
../../../
../.."
End:
End:
*)
*)
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