|
|
|
@ -0,0 +1,27 @@ |
|
|
|
package common; |
|
|
|
|
|
|
|
import prism.PrismException; |
|
|
|
import prism.PrismFileLog; |
|
|
|
import prism.PrismLog; |
|
|
|
|
|
|
|
public interface Dottable { |
|
|
|
public default void exportToDotFile(String filename) throws PrismException { |
|
|
|
try (PrismFileLog log = PrismFileLog.create(filename)) { |
|
|
|
exportToDotFile(log); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public default void exportToDotFile(PrismLog out) { |
|
|
|
out.print(toDot()); |
|
|
|
} |
|
|
|
|
|
|
|
public static String quoteForDot(String original) { |
|
|
|
String result = original; |
|
|
|
result = result.replaceAll("&", "&"); |
|
|
|
result = result.replaceAll("<", "<"); |
|
|
|
result = result.replaceAll(">", ">"); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
public String toDot(); |
|
|
|
} |