Package ru.ispras.microtesk.test
Class Printer
- java.lang.Object
-
- ru.ispras.microtesk.test.Printer
-
public final class Printer extends java.lang.Object
ThePrinter
class is responsible for printing generated symbolic test programs (sequences of concrete calls to a file and to the screen).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addToFooter(java.lang.String text)
static void
addToHeader(java.lang.String text)
void
close()
void
delete()
static Printer
getConsole(Options options, Statistics statistics)
java.lang.String
getFileName()
static java.lang.String
getOutDir(Options options)
static Printer
newCodeFile(Options options, int fileIndex)
static Printer
newDataFile(Options options, int fileIndex)
static Printer
newExceptionHandlerFile(Options options, java.lang.String id)
static Printer
newSectionFile(java.lang.String name, Options options, int fileIndex)
void
printData(java.util.Collection<DataSection> dataSections)
void
printData(DataSection dataSection)
void
printSequence(Model model, ConcreteSequence sequence)
Prints the specified instruction call sequence.
-
-
-
Method Detail
-
addToHeader
public static void addToHeader(java.lang.String text)
-
addToFooter
public static void addToFooter(java.lang.String text)
-
getConsole
public static Printer getConsole(Options options, Statistics statistics)
-
newCodeFile
public static Printer newCodeFile(Options options, int fileIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
newDataFile
public static Printer newDataFile(Options options, int fileIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
newSectionFile
public static Printer newSectionFile(java.lang.String name, Options options, int fileIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
newExceptionHandlerFile
public static Printer newExceptionHandlerFile(Options options, java.lang.String id) throws java.io.IOException
- Throws:
java.io.IOException
-
getOutDir
public static java.lang.String getOutDir(Options options)
-
getFileName
public java.lang.String getFileName()
-
close
public void close()
-
delete
public void delete()
-
printSequence
public void printSequence(Model model, ConcreteSequence sequence) throws ConfigurationException
Prints the specified instruction call sequence.- Parameters:
model
- Microprocessor model.sequence
- Instruction call sequence.- Throws:
java.lang.NullPointerException
- if the parameter is null.ConfigurationException
- if failed to evaluate one of the output objects associated with an instruction call in the sequence.
-
printData
public void printData(DataSection dataSection)
-
printData
public void printData(java.util.Collection<DataSection> dataSections)
-
-