Skip to content
Snippets Groups Projects
Commit 499da150 authored by Carlos Galindo's avatar Carlos Galindo
Browse files

reorganized arc colors, added TotalDefinitionDep.Arc

parent e7d95501
No related branches found
No related tags found
1 merge request!58Object flow and trees
package es.upv.mist.slicing.arcs.pdg;
import es.upv.mist.slicing.arcs.Arc;
import org.jgrapht.nio.Attribute;
import org.jgrapht.nio.DefaultAttribute;
import java.util.Map;
public class TotalDefinitionDependenceArc extends Arc {
@Override
public Map<String, Attribute> getDotAttributes() {
Map<String, Attribute> map = super.getDotAttributes();
map.put("color", DefaultAttribute.createAttribute("pink"));
return map;
}
}
package es.upv.mist.slicing.arcs.sdg; package es.upv.mist.slicing.arcs.sdg;
import org.jgrapht.nio.Attribute;
import org.jgrapht.nio.DefaultAttribute;
import java.util.Map;
/** /**
* An interprocedural arc that connects a call site with its * An interprocedural arc that connects a call site with its
* corresponding declaration. It is considered an interprocedural input. * corresponding declaration. It is considered an interprocedural input.
*/ */
public class CallArc extends InterproceduralArc { public class CallArc extends InterproceduralArc {
@Override
public Map<String, Attribute> getDotAttributes() {
Map<String, Attribute> map = super.getDotAttributes();
map.put("style", DefaultAttribute.createAttribute("dashed"));
return map;
}
@Override @Override
public boolean isInterproceduralInputArc() { public boolean isInterproceduralInputArc() {
return true; return true;
......
...@@ -17,12 +17,11 @@ public abstract class InterproceduralArc extends Arc { ...@@ -17,12 +17,11 @@ public abstract class InterproceduralArc extends Arc {
public Map<String, Attribute> getDotAttributes() { public Map<String, Attribute> getDotAttributes() {
var map = super.getDotAttributes(); var map = super.getDotAttributes();
map.put("penwidth", DefaultAttribute.createAttribute("3")); map.put("penwidth", DefaultAttribute.createAttribute("3"));
map.put("style", DefaultAttribute.createAttribute("dashed"));
if (isInterproceduralInputArc()) if (isInterproceduralInputArc())
map.put("color", DefaultAttribute.createAttribute("orange")); map.put("color", DefaultAttribute.createAttribute("darkgreen"));
else if (isInterproceduralOutputArc()) else if (isInterproceduralOutputArc())
map.put("color", DefaultAttribute.createAttribute("blue")); map.put("color", DefaultAttribute.createAttribute("blue"));
else
map.put("color", DefaultAttribute.createAttribute("green"));
return map; return map;
} }
......
...@@ -14,13 +14,6 @@ import java.util.Map; ...@@ -14,13 +14,6 @@ import java.util.Map;
/** An interprocedural arc connecting {@link ActualIONode actual} and {@link FormalIONode formal} /** An interprocedural arc connecting {@link ActualIONode actual} and {@link FormalIONode formal}
* nodes. The source and target must match: both must either be inputs or outputs. This arc may be an input or output. */ * nodes. The source and target must match: both must either be inputs or outputs. This arc may be an input or output. */
public class ParameterInOutArc extends InterproceduralArc { public class ParameterInOutArc extends InterproceduralArc {
@Override
public Map<String, Attribute> getDotAttributes() {
Map<String, Attribute> map = super.getDotAttributes();
map.put("style", DefaultAttribute.createAttribute("dashed"));
return map;
}
@Override @Override
public boolean isInterproceduralInputArc() { public boolean isInterproceduralInputArc() {
GraphNode<?> source = getNodeCommon(getSource()); GraphNode<?> source = getNodeCommon(getSource());
......
...@@ -14,6 +14,7 @@ public class SummaryArc extends Arc { ...@@ -14,6 +14,7 @@ public class SummaryArc extends Arc {
public Map<String, Attribute> getDotAttributes() { public Map<String, Attribute> getDotAttributes() {
Map<String, Attribute> map = super.getDotAttributes(); Map<String, Attribute> map = super.getDotAttributes();
map.put("style", DefaultAttribute.createAttribute("bold")); map.put("style", DefaultAttribute.createAttribute("bold"));
map.put("color", DefaultAttribute.createAttribute("#a01210")); // rojo oscuro
return map; return map;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment