Open rladydpf1 opened 1 year ago
This is intended. Note that the automata construction algorithm generates models from only positive traces and the input traces are the only information available to the algorithm. The algorithm interprets each line in trace_events.txt
as boolean events and attempts to capture the sequence of boolean events as an automaton. In the case specified here, there is no sequence in trace_events.txt
that contradicts the generated model.
If instead you had a trace like so,
start
(!(8 > rt_input.msg_length) and (1 > rt_input.message_5) and (241 == rt_input.message_0) and !(241 > rt_input.message_7)): OUT_OF_INDEX
OUT_OF_INDEX
start
WITHIN_INDEX
start
then you can expect to see a separation, since in the given trace event WITHIN_INDEX
is never followed by the event OUT_OF_INDEX
unlike event (!(8 > rt_input.msg_length) and (1 > rt_input.message_5) and (241 == rt_input.message_0) and !(241 > rt_input.message_7)): OUT_OF_INDEX
. This contradicts having both events (!(8 > rt_input.msg_length) and (1 > rt_input.message_5) and (241 == rt_input.message_0) and !(241 > rt_input.message_7)): OUT_OF_INDEX
and WITHIN_INDEX
going into the same state as in the model above, and therefore you can expect to see separate states.
In general, a longer trace sequence helps capture behaviour better as longer sequences hold more sequential-behaviour information of your system.
When running
python3.8 Trace2Mode/learn_model.py --dfa --incr -t ./models -i traces/trace_events.txt
, a buggy model was generated.trace_events.txt
:And the result was
The model was
I expected it to be separated into 'WITHIN_INDEX' and 'OUT_OF_INDEX' states. If this was intended, I am now wondering how to separate those states in the model.