Browse Source
explicit DOT export: support decorators
explicit DOT export: support decorators
This commit refactors the exportToDotFile infrastructure of the explicit engine to allow the flexible decoration of the nodes and edges in the DOT file, e.g., for annotating rewards, marking certain states, etc. We provide default implementations in explicit.Model for most methods, only exportTransitionsToDotFile needs to be provided in derived classes to allow DOT export. Note that the abstract method in ModelExplicit abstract void exportTransitionsToDotFile(int i, PrismLog out); has been removed, which will lead to errors in derived classes where implementations of this method have been marked with the @Override annotation. To fix this, simply replace the signature of your implementation of void exportTransitionsToDotFile(int i, PrismLog out); by void exportTransitionsToDotFile(int i, PrismLog out, Iterable<explicit.graphviz.Decorator> decorators) (as defined in explicit.Model). You can simply ignore the decorators parameter at first. Later on, if you want to support decoration, have a look at the implementations of this method in DTMCExplicit and MDPExplicit for the proper handling. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12115 bbc10eb1-c90d-0410-af57-cb519fbb1720master
9 changed files with 185 additions and 119 deletions
-
6prism/src/automata/LTSFromDA.java
-
16prism/src/explicit/DTMCExplicit.java
-
5prism/src/explicit/LTSExplicit.java
-
36prism/src/explicit/MDPExplicit.java
-
104prism/src/explicit/Model.java
-
59prism/src/explicit/ModelExplicit.java
-
5prism/src/explicit/STPGAbstrSimple.java
-
29prism/src/explicit/SubNondetModel.java
-
44prism/src/param/ParamModel.java
Write
Preview
Loading…
Cancel
Save
Reference in new issue