diff --git a/src/main/java/avatartranslator/AvatarDependencyGraph.java b/src/main/java/avatartranslator/AvatarDependencyGraph.java index 0cf633a6778850e91bf7e591047bfdbfb7bce778..594ff809e78286e2f4ae17739662b3d99b155f3f 100644 --- a/src/main/java/avatartranslator/AvatarDependencyGraph.java +++ b/src/main/java/avatartranslator/AvatarDependencyGraph.java @@ -77,6 +77,7 @@ public class AvatarDependencyGraph { } // Connect everything ie writers to all potential readers // For each writing state, we draw a transition to all possible corresponding readers + // Double direction if synchronous for(AUTState state: states) { if (state.referenceObject instanceof AvatarActionOnSignal) { AvatarActionOnSignal aaos = (AvatarActionOnSignal) state.referenceObject; @@ -91,9 +92,14 @@ public class AvatarDependencyGraph { AvatarActionOnSignal aaosD = (AvatarActionOnSignal) stateDestination.referenceObject; if (aaosD.getSignal() == correspondingSig) { // Found relation - TraceManager.addDev("Found relation!"); + //TraceManager.addDev("Found relation!"); AUTTransition tr = new AUTTransition(state.id, "", stateDestination.id); transitions.add(tr); + AvatarRelation ar = _avspec.getAvatarRelationWithSignal(correspondingSig); + if (!(ar.isAsynchronous())) { + tr = new AUTTransition(stateDestination.id, "", state.id); + transitions.add(tr); + } } } } diff --git a/src/main/java/graph/AUTGraphDisplay.java b/src/main/java/graph/AUTGraphDisplay.java index 94b1257d71822ac0631338cbc400ae1cf9f632e5..274dd48a87815157714d411ec46317b3fd8b255f 100755 --- a/src/main/java/graph/AUTGraphDisplay.java +++ b/src/main/java/graph/AUTGraphDisplay.java @@ -99,8 +99,8 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable "edge {text-color: black; shape: cubic-curve; text-size:10;} " + "edge.defaultedge {text-size:10; text-color:black;} " + "edge.external {text-color:blue; text-size:14;} " + - "node.deadlock {fill-color: red; text-color: white; size: 20px, 20px; text-size:16;} " + - "node.init { fill-color: green; text-color: black; size: 20px, 20px; text-size:16;}"; + "node.deadlock {fill-color: orange; text-color: red; size: 20px, 20px; text-size:15;} " + + "node.init { fill-color: green; text-color: black; size: 20px, 20px; text-size:15;}"; protected static String STYLE_SHEET2 = "graph { canvas-color: white; fill-mode: gradient-vertical; fill-color: white, #004; padding: 20px; } " + "node { shape: circle; size-mode: dyn-size; size: 10px; fill-mode: gradient-radial; fill-color: #FFFC, #FFF0; stroke-mode: none; " + @@ -111,22 +111,7 @@ public class AUTGraphDisplay implements MouseListener, ViewerListener, Runnable "edge.external { shape: L-square-line; size: 3px; fill-color: #AAA3; fill-mode: plain; arrow-shape: circle; } " + "sprite { shape: circle; fill-mode: gradient-radial; fill-color: #FFF8, #FFF0; }"; - /*public static String STYLE_SHEET = - "node {" + - " fill-color: #B1CAF1; text-color: black; size: 11px, 11px;" + - "} " + - "edge.default edge {" + "text-color: blue;" + " shape: cubic-curve; }" + - "edge.external {" + - //" arrow-shape: circle" + - " text-style: bold;" + - "} " + - "node.deadlock {" + - " fill-color: red; text-color: white; size: 15px, 15px;" + - - "} " + - "node.init {" + - " fill-color: green; text-color: black; size: 15px, 15px;" + - "} ";*/ + public AUTGraphDisplay(AUTGraph _graph, boolean _exitOnClose) { graph = _graph;