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
3defbd29
Commit
3defbd29
authored
Oct 11, 2019
by
Julien Signoles
Browse files
[archi] visit block stmts in the correct order
parent
52d39bfe
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/e-acsl/src/code_generator/injector.ml
View file @
3defbd29
...
@@ -494,14 +494,14 @@ and inject_in_stmt env kf stmt =
...
@@ -494,14 +494,14 @@ and inject_in_stmt env kf stmt =
and
inject_in_block
(
env
:
Env
.
t
)
kf
blk
=
and
inject_in_block
(
env
:
Env
.
t
)
kf
blk
=
let
stmts
,
env
=
let
stmts
,
env
=
List
.
fold_
righ
t
List
.
fold_
lef
t
(
fun
stmt
(
stmts
,
env
)
->
(
fun
(
stmts
,
env
)
stmt
->
let
stmt
,
env
=
inject_in_stmt
env
kf
stmt
in
let
stmt
,
env
=
inject_in_stmt
env
kf
stmt
in
stmt
::
stmts
,
env
)
stmt
::
stmts
,
env
)
blk
.
bstmts
([]
,
env
)
([]
,
env
)
blk
.
bstmts
in
in
blk
.
bstmts
<-
stmts
;
blk
.
bstmts
<-
List
.
rev
stmts
;
let
free_stmts
=
At_with_lscope
.
Free
.
find_all
kf
in
let
free_stmts
=
At_with_lscope
.
Free
.
find_all
kf
in
match
blk
.
blocals
,
free_stmts
with
match
blk
.
blocals
,
free_stmts
with
|
[]
,
[]
->
|
[]
,
[]
->
...
...
src/plugins/e-acsl/src/code_generator/translate.ml
View file @
3defbd29
...
@@ -980,12 +980,12 @@ let translate_preconditions kf env behaviors =
...
@@ -980,12 +980,12 @@ let translate_preconditions kf env behaviors =
~
loc
~
loc
(
assumes_pred
,
(
assumes_pred
,
Logic_const
.
unamed
~
loc
p
.
ip_content
.
pred_content
)
Logic_const
.
unamed
~
loc
p
.
ip_content
.
pred_content
)
in
in
translate_named_predicate
kf
env
p
translate_named_predicate
kf
env
p
else
else
env
env
in
in
handle_error
do_it
env
)
handle_error
do_it
env
)
env
env
b
.
b_requires
b
.
b_requires
in
in
...
...
src/plugins/e-acsl/src/project_initializer/keep_status.ml
View file @
3defbd29
...
@@ -150,3 +150,9 @@ let must_translate kf kind =
...
@@ -150,3 +150,9 @@ let must_translate kf kind =
pretty_kind
kind'
;
pretty_kind
kind'
;
keep
keep
with
Not_found
->
true
with
Not_found
->
true
(*
Local Variables:
compile-command: "make -C ../.."
End:
*)
src/plugins/e-acsl/src/project_initializer/keep_status.mli
View file @
3defbd29
...
@@ -44,7 +44,7 @@ val push: Kernel_function.t -> kind -> Property.t -> unit
...
@@ -44,7 +44,7 @@ val push: Kernel_function.t -> kind -> Property.t -> unit
(** store the given property of the given kind for the given function *)
(** store the given property of the given kind for the given function *)
val
before_translation
:
unit
->
unit
val
before_translation
:
unit
->
unit
(** to be called just before
the main translation
*)
(** to be called just before
injecting the code
*)
val
must_translate
:
Kernel_function
.
t
->
kind
->
bool
val
must_translate
:
Kernel_function
.
t
->
kind
->
bool
(** To be called just before transforming a property of the given kind for the
(** To be called just before transforming a property of the given kind for the
...
@@ -52,3 +52,9 @@ val must_translate: Kernel_function.t -> kind -> bool
...
@@ -52,3 +52,9 @@ val must_translate: Kernel_function.t -> kind -> bool
VERY IMPORTANT: the property of the n-th call to this function exactly
VERY IMPORTANT: the property of the n-th call to this function exactly
correspond to the n-th pushed property (see {!push}).
correspond to the n-th pushed property (see {!push}).
@return true if and only if the translation must occur. *)
@return true if and only if the translation must occur. *)
(*
Local Variables:
compile-command: "make -C ../.."
End:
*)
Write
Preview
Supports
Markdown
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