Class FSM2MealyParserAlternating<I,​O,​A extends MutableMealyMachine<Integer,​I,​?,​O>>

  • Type Parameters:
    I - the input type
    O - the output type
    A - the parsed automaton type
    All Implemented Interfaces:
    ModelDeserializer<A>

    public final class FSM2MealyParserAlternating<I,​O,​A extends MutableMealyMachine<Integer,​I,​?,​O>>
    extends AbstractFSM2MealyParser<I,​O,​A>
    Parses a Mealy machine with alternating edge semantics from an FSM source.

    Some factory methods accept an Output object. This is used as follows. If the Mealy machine that is read from the FSM file has no defined output symbol after an input word. The last output symbol is taken from Output.computeOutput(Iterable). If a factory method is used that does not accept an Output object an exception is thrown when the FSM does not define an output symbol after an input word. Furthermore, if Output.computeOutput(Iterable) returns null an exception is throws as well.

    A use case where supplying an Output object is necessary is when one is model checking with monitors. With alternating semantics the model checker can conclude the monitor is in a rejecting state after an input symbol (and hence every output symbol is incorrect). To construct an input-enabled Mealy machine this parser needs to know the correct output symbol. Note that this situation does not arise with synchronous semantics.