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
6b6d9b36
Commit
6b6d9b36
authored
4 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Post/Exit state unreachable
parent
a8f203f2
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/wp/cfgInfos.ml
+27
-1
27 additions, 1 deletion
src/plugins/wp/cfgInfos.ml
with
27 additions
and
1 deletion
src/plugins/wp/cfgInfos.ml
+
27
−
1
View file @
6b6d9b36
...
@@ -196,6 +196,20 @@ end
...
@@ -196,6 +196,20 @@ end
(* --- Main Collection Pass --- *)
(* --- Main Collection Pass --- *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
let
post_props_ids
~
bhv
~
prop
tk
(
b
:
CfgAnnot
.
behavior
)
=
let
assigns
,
posts
=
match
tk
with
|
Cil_types
.
Exits
->
b
.
bhv_exit_assigns
,
b
.
bhv_exits
|
_
->
b
.
bhv_post_assigns
,
b
.
bhv_ensures
in
let
ps
=
List
.
filter
(
selected
~
prop
~
bhv
)
@@
List
.
map
fst
posts
in
match
assigns
with
|
WpPropId
.
AssignsLocations
(
id
,
_
)
->
Bag
.
list
(
id
::
ps
)
|
_
->
Bag
.
list
ps
let
dead_posts
~
bhv
~
prop
tk
behaviors
=
let
collect_dead
b
=
Bag
.
concat
(
post_props_ids
~
bhv
~
prop
tk
b
)
in
List
.
fold_right
collect_dead
behaviors
Bag
.
empty
let
loop_contract_pids
kf
stmt
=
let
loop_contract_pids
kf
stmt
=
match
stmt
.
Cil_types
.
skind
with
match
stmt
.
Cil_types
.
skind
with
|
Loop
_
->
|
Loop
_
->
...
@@ -262,9 +276,21 @@ let compile Key.{ kf ; smoking ; bhv ; prop } =
...
@@ -262,9 +276,21 @@ let compile Key.{ kf ; smoking ; bhv ; prop } =
infos
.
calls
<-
Fset
.
union
fs
infos
.
calls
;
infos
.
calls
<-
Fset
.
union
fs
infos
.
calls
;
end
end
)
cfg
.
stmt_table
;
)
cfg
.
stmt_table
;
let
exits
=
not
@@
Fset
.
is_empty
infos
.
calls
in
let
mapper
fb
=
CfgAnnot
.
get_behavior
kf
~
exits
~
active
:
bhv
fb
in
let
behaviors
=
List
.
map
mapper
behaviors
in
if
not
exits
then
infos
.
doomed
<-
Bag
.
concat
infos
.
doomed
(
dead_posts
~
bhv
~
prop
Exits
behaviors
)
;
if
unreachable
infos
cfg
.
return_point
then
infos
.
doomed
<-
Bag
.
concat
infos
.
doomed
(
dead_posts
~
bhv
~
prop
Normal
behaviors
)
;
end
body
;
end
body
;
(* Doomed *)
(* Doomed *)
Bag
.
iter
WpAnnot
.
set_unreachable
infos
.
doomed
;
Bag
.
iter
(
fun
p
->
if
WpPropId
.
filter_status
p
then
WpAnnot
.
set_unreachable
p
)
infos
.
doomed
;
(* Collected Infos *)
(* Collected Infos *)
infos
infos
...
...
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