Browse Source

NBA: print(out, format) method, like for DA

This allows specification of the output format later on via the command line.


git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11106 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 10 years ago
parent
commit
9e805295cc
  1. 25
      prism/src/jltl2dstar/NBA.java

25
prism/src/jltl2dstar/NBA.java

@ -21,7 +21,10 @@
package jltl2dstar;
import java.util.*;
import prism.PrismException;
import prism.PrismNotSupportedException;
import java.io.PrintStream;
import jltl2ba.APElement;
@ -233,6 +236,28 @@ public class NBA implements Iterable<NBA_State> {
return product_nba;
}
/**
* Print automaton to a PrintStream in a specified format ("dot", "txt", "lbtt" or "hoa").
*/
public void print(PrintStream out, String type) throws PrismException
{
switch (type) {
case "txt":
print(out);
break;
case "dot":
print_dot(out);
break;
case "lbtt":
print_lbtt(out);
case "hoa":
print_hoa(out);
break;
default:
throw new PrismNotSupportedException("Can not print NBA in '"+type+"' format");
}
}
/**
* Print the NBA on the output stream.
*/

Loading…
Cancel
Save