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
Deploy
Releases
Container Registry
Model registry
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
pub
frama-c
Commits
6760006d
Commit
6760006d
authored
4 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[wp] fix dynamic calls per behaviors
parent
2fb08aa7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/wp/cfgDump.ml
+1
-1
1 addition, 1 deletion
src/plugins/wp/cfgDump.ml
src/plugins/wp/cfgInfos.ml
+6
-3
6 additions, 3 deletions
src/plugins/wp/cfgInfos.ml
with
7 additions
and
4 deletions
src/plugins/wp/cfgDump.ml
+
1
−
1
View file @
6760006d
...
...
@@ -209,7 +209,7 @@ let loop_step w = tag "InLoop" w
let
call_dynamic
_env
_stmt
_pid
fct
calls
=
let
u
=
node
()
in
Format
.
fprintf
!
out
" %a [ color=red , label
\"
CallPtr %a
\"
];@."
pretty
u
Format
.
fprintf
!
out
" %a [ color=red , label
=
\"
CallPtr %a
\"
];@."
pretty
u
Printer
.
pp_exp
fct
;
List
.
iter
(
fun
(
_
,
k
)
->
link
u
k
)
calls
;
u
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/cfgInfos.ml
+
6
−
3
View file @
6760006d
...
...
@@ -129,7 +129,7 @@ let selected_main_bhv ~bhv ~prop (b : Cil_types.funbehavior) =
(* --- Calls --- *)
(* -------------------------------------------------------------------------- *)
let
collect_calls
~
bhv
stmt
=
let
collect_calls
~
bhv
kf
stmt
=
let
open
Cil_types
in
match
stmt
.
skind
with
|
Instr
(
Call
(
_
,
fct
,_,_
))
->
...
...
@@ -137,7 +137,10 @@ let collect_calls ~bhv stmt =
match
Kernel_function
.
get_called
fct
with
|
Some
kf
->
Fset
.
singleton
kf
|
None
->
let
bhvs
=
if
bhv
=
[]
then
[
Cil
.
default_behavior_name
]
else
bhv
in
let
bhvs
=
if
bhv
=
[]
then
List
.
map
(
fun
b
->
b
.
b_name
)
(
Annotations
.
behaviors
kf
)
else
bhv
in
List
.
fold_left
(
fun
fs
bhv
->
match
Dyncall
.
get
~
bhv
stmt
with
|
None
->
fs
...
...
@@ -250,7 +253,7 @@ let compile Key.{ kf ; smoking ; bhv ; prop } =
(* Stmt Iteration *)
Shash
.
iter
(
fun
stmt
(
src
,_
)
->
let
fs
=
collect_calls
~
bhv
stmt
in
let
fs
=
collect_calls
~
bhv
kf
stmt
in
let
dead
=
unreachable
infos
src
in
let
ca
=
CfgAnnot
.
get_code_assertions
kf
stmt
in
let
ca_pids
=
List
.
map
fst
ca
.
code_verified
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