Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Charles Southerland
frama-c
Commits
189f3075
"src/plugins/e-acsl/tests/git@git.frama-c.com:pub/frama-c.git" did not exist on "4e848baf2a0f77f77a0eab3b45b2b6814c757e82"
Commit
189f3075
authored
5 years ago
by
Julien Signoles
Browse files
Options
Downloads
Patches
Plain Diff
[archi] remove an open statement
parent
e69ee474
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/src/code_generator/visit.ml
+9
-8
9 additions, 8 deletions
src/plugins/e-acsl/src/code_generator/visit.ml
with
9 additions
and
8 deletions
src/plugins/e-acsl/src/code_generator/visit.ml
+
9
−
8
View file @
189f3075
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
(* *)
(* *)
(**************************************************************************)
(**************************************************************************)
module
Libc
=
Functions
.
Libc
module
E_acsl_label
=
Label
module
E_acsl_label
=
Label
open
Cil_types
open
Cil_types
open
Cil_datatype
open
Cil_datatype
...
@@ -616,8 +615,9 @@ you must call function `%s' and `__e_acsl_memory_clean by yourself.@]"
...
@@ -616,8 +615,9 @@ you must call function `%s' and `__e_acsl_memory_clean by yourself.@]"
(eventually). This is such that each call to [alloca] becomes
(eventually). This is such that each call to [alloca] becomes
[__fc_vla_alloc]. It is already handled using the code below. *)
[__fc_vla_alloc]. It is already handled using the code below. *)
(
match
init
with
(
match
init
with
|
ConsInit
(
fvi
,
sz
::
_
,
_
)
when
Libc
.
is_vla_alloc_name
fvi
.
vname
->
|
ConsInit
(
fvi
,
sz
::
_
,
_
)
fvi
.
vname
<-
Libc
.
actual_alloca
;
when
Functions
.
Libc
.
is_vla_alloc_name
fvi
.
vname
->
fvi
.
vname
<-
Functions
.
Libc
.
actual_alloca
;
(* Since we need to pass [vi] by value cannot use [Misc.mk_store_stmt]
(* Since we need to pass [vi] by value cannot use [Misc.mk_store_stmt]
here. Do it manually. *)
here. Do it manually. *)
let
sname
=
Functions
.
RTL
.
mk_api_name
"store_block"
in
let
sname
=
Functions
.
RTL
.
mk_api_name
"store_block"
in
...
@@ -625,10 +625,10 @@ you must call function `%s' and `__e_acsl_memory_clean by yourself.@]"
...
@@ -625,10 +625,10 @@ you must call function `%s' and `__e_acsl_memory_clean by yourself.@]"
Env
.
add_stmt
~
post
:
true
env
store
Env
.
add_stmt
~
post
:
true
env
store
(* Rewrite format functions (e.g., [printf]). See some comments below *)
(* Rewrite format functions (e.g., [printf]). See some comments below *)
|
ConsInit
(
fvi
,
args
,
knd
)
when
check_formats
|
ConsInit
(
fvi
,
args
,
knd
)
when
check_formats
&&
Libc
.
is_printf_name
fvi
.
vname
->
&&
Functions
.
Libc
.
is_printf_name
fvi
.
vname
->
let
name
=
Functions
.
RTL
.
get_rtl_replacement_name
fvi
.
vname
in
let
name
=
Functions
.
RTL
.
get_rtl_replacement_name
fvi
.
vname
in
let
new_vi
=
Misc
.
get_lib_fun_vi
name
in
let
new_vi
=
Misc
.
get_lib_fun_vi
name
in
let
fmt
=
Libc
.
get_printf_argument_str
~
loc
fvi
.
vname
args
in
let
fmt
=
Functions
.
Libc
.
get_printf_argument_str
~
loc
fvi
.
vname
args
in
stmt
.
skind
<-
stmt
.
skind
<-
Instr
(
Local_init
(
vi
,
ConsInit
(
new_vi
,
fmt
::
args
,
knd
)
,
loc
));
Instr
(
Local_init
(
vi
,
ConsInit
(
new_vi
,
fmt
::
args
,
knd
)
,
loc
));
env
env
...
@@ -646,18 +646,19 @@ you must call function `%s' and `__e_acsl_memory_clean by yourself.@]"
...
@@ -646,18 +646,19 @@ you must call function `%s' and `__e_acsl_memory_clean by yourself.@]"
|
Lval
(
Var
vi
,
_
)
when
replace_libc_fn
&&
|
Lval
(
Var
vi
,
_
)
when
replace_libc_fn
&&
Functions
.
RTL
.
has_rtl_replacement
vi
.
vname
->
Functions
.
RTL
.
has_rtl_replacement
vi
.
vname
->
vi
.
vname
<-
Functions
.
RTL
.
get_rtl_replacement_name
vi
.
vname
vi
.
vname
<-
Functions
.
RTL
.
get_rtl_replacement_name
vi
.
vname
|
Lval
(
Var
vi
,
_
)
when
Libc
.
is_vla_free_name
vi
.
vname
->
|
Lval
(
Var
vi
,
_
)
when
Functions
.
Libc
.
is_vla_free_name
vi
.
vname
->
(* Handle variable-length array allocation via [__fc_vla_free].
(* Handle variable-length array allocation via [__fc_vla_free].
Rewrite its name to [delete_block]. The rest is in place. *)
Rewrite its name to [delete_block]. The rest is in place. *)
vi
.
vname
<-
Functions
.
RTL
.
mk_api_name
"delete_block"
vi
.
vname
<-
Functions
.
RTL
.
mk_api_name
"delete_block"
|
Lval
(
Var
vi
,
_
)
when
check_formats
&&
Libc
.
is_printf_name
vi
.
vname
->
|
Lval
(
Var
vi
,
_
)
when
check_formats
&&
Functions
.
Libc
.
is_printf_name
vi
.
vname
->
(* Rewrite names of format functions (such as printf). This case
(* Rewrite names of format functions (such as printf). This case
differs from the above because argument list of format functions is
differs from the above because argument list of format functions is
extended with an argument describing actual variadic arguments *)
extended with an argument describing actual variadic arguments *)
(* Replacement name, e.g., [printf] -> [__e_acsl_builtin_printf] *)
(* Replacement name, e.g., [printf] -> [__e_acsl_builtin_printf] *)
let
name
=
Functions
.
RTL
.
get_rtl_replacement_name
vi
.
vname
in
let
name
=
Functions
.
RTL
.
get_rtl_replacement_name
vi
.
vname
in
(* Variadic arguments descriptor *)
(* Variadic arguments descriptor *)
let
fmt
=
Libc
.
get_printf_argument_str
~
loc
vi
.
vname
args
in
let
fmt
=
Functions
.
Libc
.
get_printf_argument_str
~
loc
vi
.
vname
args
in
(* get the name of the library function we need. Cannot just rewrite
(* get the name of the library function we need. Cannot just rewrite
the name as AST check will then fail *)
the name as AST check will then fail *)
let
vi
=
Misc
.
get_lib_fun_vi
name
in
let
vi
=
Misc
.
get_lib_fun_vi
name
in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment