From 8472802b6bd3e743716261433c93094b094e8edc Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Thu, 7 Jan 2010 10:38:35 +0000 Subject: [PATCH] Slight tweak to (explict) output of MDP dot files (consistency with STPGs). git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1672 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/explicit/MDP.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/prism/src/explicit/MDP.java b/prism/src/explicit/MDP.java index b363ba8c..433efb79 100644 --- a/prism/src/explicit/MDP.java +++ b/prism/src/explicit/MDP.java @@ -658,6 +658,7 @@ public class MDP extends Model public void exportToDotFile(String filename, BitSet mark) throws PrismException { int i, j; + String nij; try { FileWriter out = new FileWriter(filename); out.write("digraph " + modelType + " {\nsize=\"8,5\"\nnode [shape=box];\n"); @@ -667,10 +668,11 @@ public class MDP extends Model j = -1; for (Distribution distr : trans.get(i)) { j++; - out.write(i + " -> " + i + "." + j + " [ arrowhead=none,label=\"" + j + "\" ];\n"); - out.write(i + "." + j + " [ shape=circle,width=0.1,height=0.1,label=\"\" ];\n"); + nij = "n" + i + "_" + j; + out.write(i + " -> " + nij + " [ arrowhead=none,label=\"" + j + "\" ];\n"); + out.write(nij + " [ shape=point,width=0.1,height=0.1,label=\"\" ];\n"); for (Map.Entry e : distr) { - out.write(i + "." + j + " -> " + e.getKey() + " [ label=\"" + e.getValue() + "\" ];\n"); + out.write(nij + " -> " + e.getKey() + " [ label=\"" + e.getValue() + "\" ];\n"); } } }