Class DFA2ETFWriter<I>
- java.lang.Object
-
- net.automatalib.serialization.etf.writer.AbstractETFWriter<I,DFA<?,I>>
-
- net.automatalib.serialization.etf.writer.DFA2ETFWriter<I>
-
- Type Parameters:
I
- the input type.
- All Implemented Interfaces:
InputModelSerializer<I,DFA<?,I>>
,ModelSerializer<InputModelData<I,DFA<?,I>>>
public final class DFA2ETFWriter<I> extends AbstractETFWriter<I,DFA<?,I>>
Write a DFA to ETF.
-
-
Constructor Summary
Constructors Constructor Description DFA2ETFWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <I> DFA2ETFWriter<I>
getInstance()
protected void
writeEdge(PrintWriter pw)
Writes the type of the edge.protected void
writeETF(PrintWriter pw, DFA<?,I> dfa, Alphabet<I> inputs)
Write DFA specific parts in the ETF.void
writeModel(OutputStream os, DFA<?,I> model, Alphabet<I> alphabet)
Writes the model to the given output stream.-
Methods inherited from class net.automatalib.serialization.etf.writer.AbstractETFWriter
write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.serialization.InputModelSerializer
writeModel, writeModel
-
Methods inherited from interface net.automatalib.serialization.ModelSerializer
writeModel
-
-
-
-
Method Detail
-
writeEdge
protected void writeEdge(PrintWriter pw)
Writes the type of the edge. A DFA edge contains one label, named 'letter', of type 'letter'.- Specified by:
writeEdge
in classAbstractETFWriter<I,DFA<?,I>>
- Parameters:
pw
- the Writer.
-
writeETF
protected void writeETF(PrintWriter pw, DFA<?,I> dfa, Alphabet<I> inputs)
Write DFA specific parts in the ETF.- initial state, - the valuations for the state 'id', - the letters in the alphabet, - the transitions, - the state labels (rejecting/accepting), - the mapping from states to state labels.
- Specified by:
writeETF
in classAbstractETFWriter<I,DFA<?,I>>
- Parameters:
pw
- the Writer.dfa
- the DFA to write.inputs
- the alphabet.
-
writeModel
public void writeModel(OutputStream os, DFA<?,I> model, Alphabet<I> alphabet)
Description copied from interface:InputModelSerializer
Writes the model to the given output stream.Note: the output stream will not be closed.
- Parameters:
os
- the output stream to write tomodel
- the model to writealphabet
- the inputs of the model to which serialization should be limited
-
getInstance
public static <I> DFA2ETFWriter<I> getInstance()
-
-