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
e28e2d6a
Commit
e28e2d6a
authored
4 years ago
by
Valentin Perrelle
Browse files
Options
Downloads
Patches
Plain Diff
[dive] Do not explore several time the same node
parent
349f34a2
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/dive/build.ml
+4
-1
4 additions, 1 deletion
src/plugins/dive/build.ml
src/plugins/dive/tests/dive/oracle/manydeps.dot
+7
-19
7 additions, 19 deletions
src/plugins/dive/tests/dive/oracle/manydeps.dot
with
11 additions
and
20 deletions
src/plugins/dive/build.ml
+
4
−
1
View file @
e28e2d6a
...
@@ -557,11 +557,14 @@ let should_explore node =
...
@@ -557,11 +557,14 @@ let should_explore node =
|
_
->
not
node
.
node_hidden
|
_
->
not
node
.
node_hidden
let
bfs
~
depth
~
iter_succ
f
root
=
let
bfs
~
depth
~
iter_succ
f
root
=
let
module
NodeSet
=
Graph
.
Node
.
Set
in
let
queue
:
(
node
*
int
)
Queue
.
t
=
Queue
.
create
()
in
let
queue
:
(
node
*
int
)
Queue
.
t
=
Queue
.
create
()
in
let
marks
=
ref
NodeSet
.
empty
in
Queue
.
add
(
root
,
0
)
queue
;
Queue
.
add
(
root
,
0
)
queue
;
while
not
(
Queue
.
is_empty
queue
)
do
while
not
(
Queue
.
is_empty
queue
)
do
let
(
n
,
d
)
=
Queue
.
take
queue
in
let
(
n
,
d
)
=
Queue
.
take
queue
in
if
d
<
depth
then
begin
if
not
(
NodeSet
.
mem
n
!
marks
)
&&
d
<
depth
then
begin
marks
:=
NodeSet
.
add
n
!
marks
;
f
n
;
f
n
;
iter_succ
(
fun
n'
->
Queue
.
add
(
n'
,
d
+
1
)
queue
)
n
iter_succ
(
fun
n'
->
Queue
.
add
(
n'
,
d
+
1
)
queue
)
n
end
end
...
...
This diff is collapsed.
Click to expand it.
src/plugins/dive/tests/dive/oracle/manydeps.dot
+
7
−
19
View file @
e28e2d6a
digraph
G
{
digraph
G
{
cp2
[
label
=<
x
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
cp2
[
label
=<
x
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
style
=
"filled,bold"
,
]
;
style
=
"filled,
dotted,
bold"
,
]
;
cp4
[
label
=<
t14
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
cp4
[
label
=<
t14
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
style
=
"filled"
,
]
;
style
=
"filled"
,
]
;
cp6
[
label
=<
t13
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
cp6
[
label
=<
t13
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
...
@@ -21,23 +21,15 @@ digraph G {
...
@@ -21,23 +21,15 @@ digraph G {
style
=
"filled"
,
]
;
style
=
"filled"
,
]
;
cp22
[
label
=<
t6
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
cp22
[
label
=<
t6
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
style
=
"filled"
,
]
;
style
=
"filled"
,
]
;
cp24
[
label
=<
t5
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
cp24
[
label
=<
__retres
>,
shape
=
box
,
style
=
"bold"
,
]
;
style
=
"filled"
,
]
;
cp25
[
label
=<
*(pt[x])
>,
shape
=
parallelogram
,
fillcolor
=
"#AACCFF"
,
cp26
[
label
=<
t4
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
style
=
"filled"
,
]
;
cp28
[
label
=<
t3
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
style
=
"filled"
,
]
;
cp30
[
label
=<
t2
>,
shape
=
box
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
style
=
"filled"
,
]
;
cp32
[
label
=<
__retres
>,
shape
=
box
,
style
=
"bold"
,
]
;
cp33
[
label
=<
*(pt[x])
>,
shape
=
parallelogram
,
fillcolor
=
"#AACCFF"
,
color
=
"#88AAFF"
,
style
=
"filled,dotted"
,
]
;
color
=
"#88AAFF"
,
style
=
"filled,dotted"
,
]
;
subgraph
cluster_cs_1
{
label
=<
many_writes
>;
cp2
;
subgraph
cluster_cs_1
{
label
=<
many_writes
>;
cp2
;
};
};
subgraph
cluster_cs_2
{
label
=<
many_values
>;
cp
33
;
cp
3
2
;
subgraph
cluster_cs_2
{
label
=<
many_values
>;
cp
25
;
cp2
4
;
};
};
subgraph
cluster_file_1
{
label
=<
tests/dive/manydeps.i
>;
cp30
;
cp28
;
cp26
;
cp24
;
cp22
;
cp20
;
cp18
;
cp16
;
cp14
;
cp12
;
cp10
;
cp8
;
cp6
;
cp4
;
subgraph
cluster_file_1
{
label
=<
tests/dive/manydeps.i
>;
cp22
;
cp20
;
cp18
;
cp16
;
cp14
;
cp12
;
cp10
;
cp8
;
cp6
;
cp4
;
};
};
cp2
->
cp2
[
style
=
"bold"
,
]
;
cp2
->
cp2
[
style
=
"bold"
,
]
;
...
@@ -46,15 +38,11 @@ digraph G {
...
@@ -46,15 +38,11 @@ digraph G {
cp8
->
cp2
;
cp8
->
cp2
;
cp10
->
cp2
;
cp10
->
cp2
;
cp12
->
cp2
;
cp12
->
cp2
;
cp14
->
cp2
[
style
=
"bold"
,
]
;
cp14
->
cp2
;
cp16
->
cp2
;
cp16
->
cp2
;
cp18
->
cp2
;
cp18
->
cp2
;
cp20
->
cp2
;
cp20
->
cp2
;
cp22
->
cp2
;
cp22
->
cp2
;
cp24
->
cp2
;
cp25
->
cp24
;
cp26
->
cp2
;
cp28
->
cp2
;
cp30
->
cp2
;
cp33
->
cp32
;
}
}
\ No newline at end of file
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