From fb63a5a71a8b21218f9f2ccd4affb91f35f9c2ab Mon Sep 17 00:00:00 2001 From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr> Date: Wed, 17 Feb 2021 15:28:04 +0100 Subject: [PATCH] Update on dependency graphs --- .../AvatarDependencyGraph.java | 8 ++++++- src/main/java/graph/AUTGraphDisplay.java | 21 +++---------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/main/java/avatartranslator/AvatarDependencyGraph.java b/src/main/java/avatartranslator/AvatarDependencyGraph.java index 0cf633a677..594ff809e7 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 94b1257d71..274dd48a87 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; -- GitLab