agbs-uni-bremen/fsmlib-cpp

Question regarding FsmNode::apply()

Opened this issue · 2 comments

Hi,
I'm not sure if this is the right place, but i have a question regarding the FsmNode::apply(const InputTrace& itrc, bool markAsVisited) method.

It's clear to me that it applies the given itrc to the FsmNode,
generating an OutputTree containing all OutputTraces that are possible
for this itrc.
In the current implementation it is possible, that a prefix of
itrc reaches a FsmNode that has no transition for the next input
from itrc.
In this case, this input (and all subsequent inputs for which there
is no transition) will be ignored in the construction of the corresponding
OutputTrace, until an input is reached for which there is a transition.
Then the construction of this OutputTrace is continued.

My question is:
Is this the intended behaviour? There is no real specification of what should happen.
My first thought was that the construction of an OutputTrace should stop when the first input is reached
for which there is no transition in the reached FsmNode.

From the theoretical point of view the current behaviour does not make sense to me. In my understanding, apply should produce all output traces of an FSM state restricted by an input trace in the sense that there is a virtual FSM which is linear (i.e. all outgoing transitions of a node have the same target state), allows any output but defines only one input per set of transitions from one node to another. The result of apply should be the language of the product automaton of that virtual FSM with the FSM where the FsmNode under consideration is the initial state, projected onto the outputs.
With that interpretation, output trace generation should stop for a node if there are no outgoing transitions with the correct input.
However, I would suggest we wait for someone else to chime in.