Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SDG
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
Program Slicing
SDG
Commits
7adc4847
Commit
7adc4847
authored
3 years ago
by
Carlos Galindo
Browse files
Options
Downloads
Patches
Plain Diff
Remove nullpointers from graph printing
parent
a23b8d07
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sdg-cli/src/main/java/es/upv/mist/slicing/cli/DOTAttributes.java
+2
-0
2 additions, 0 deletions
.../src/main/java/es/upv/mist/slicing/cli/DOTAttributes.java
sdg-cli/src/main/java/es/upv/mist/slicing/cli/PDGLog.java
+5
-5
5 additions, 5 deletions
sdg-cli/src/main/java/es/upv/mist/slicing/cli/PDGLog.java
with
7 additions
and
5 deletions
sdg-cli/src/main/java/es/upv/mist/slicing/cli/DOTAttributes.java
+
2
−
0
View file @
7adc4847
...
...
@@ -26,6 +26,8 @@ public class DOTAttributes {
public
Map
<
String
,
Attribute
>
build
()
{
Map
<
String
,
Attribute
>
map
=
new
HashMap
<>();
for
(
var
entry
:
this
.
map
.
entrySet
())
{
if
(
entry
.
getValue
()
==
null
)
continue
;
Optional
<
String
>
string
=
entry
.
getValue
().
stream
().
reduce
((
a
,
b
)
->
a
+
","
+
b
);
string
.
ifPresent
(
s
->
map
.
put
(
entry
.
getKey
(),
createAttribute
(
s
)));
}
...
...
This diff is collapsed.
Click to expand it.
sdg-cli/src/main/java/es/upv/mist/slicing/cli/PDGLog.java
+
5
−
5
View file @
7adc4847
package
es.upv.mist.slicing.cli
;
import
es.upv.mist.slicing.arcs.Arc
;
import
es.upv.mist.slicing.arcs.pdg.ConditionalControlDependencyArc
;
import
es.upv.mist.slicing.arcs.pdg.FlowDependencyArc
;
import
es.upv.mist.slicing.arcs.pdg.ObjectFlowDependencyArc
;
import
es.upv.mist.slicing.arcs.pdg.StructuralArc
;
import
es.upv.mist.slicing.arcs.pdg.*
;
import
es.upv.mist.slicing.arcs.sdg.InterproceduralArc
;
import
es.upv.mist.slicing.graphs.pdg.PDG
;
...
...
@@ -47,11 +44,14 @@ public class PDGLog extends GraphLog<PDG> {
public
static
DOTAttributes
pdgEdgeAttributes
(
Arc
arc
)
{
DOTAttributes
res
=
new
DOTAttributes
();
res
.
set
(
"label"
,
arc
.
getLabel
());
if
(
arc
.
getLabel
()
!=
null
)
res
.
set
(
"label"
,
arc
.
getLabel
());
if
(
arc
.
isDataDependencyArc
()
||
arc
instanceof
FlowDependencyArc
||
arc
instanceof
ObjectFlowDependencyArc
)
res
.
set
(
"color"
,
"red"
);
if
(
arc
instanceof
TotalDefinitionDependenceArc
)
res
.
set
(
"color"
,
"pink"
);
if
(
arc
instanceof
StructuralArc
)
res
.
add
(
"style"
,
"dashed"
);
if
(
arc
.
isObjectFlow
()
&&
!(
arc
instanceof
InterproceduralArc
))
...
...
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