]> www.infradead.org Git - users/jedix/linux-maple.git/commit
verification/dot2k: Implement event type detection
authorGabriele Monaco <gmonaco@redhat.com>
Fri, 27 Dec 2024 14:47:52 +0000 (15:47 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 27 Dec 2024 19:41:01 +0000 (14:41 -0500)
commit87c5d7f5e5938f713bde4e7435e6b207372a7f8e
tree10dbd280ed93762dd12ec4b8be9c484bbd8c3d22
parentde6f45c2dd226269fe9886290a139533c817c5bc
verification/dot2k: Implement event type detection

Currently dot2k treats all events equally and registers them with a
general da_handle_event. This is however just part of the work because
some events are necessary to understand when the monitor is entering the
initial state.

Specifically, the da_handle_start_event takes care of setting the
monitor in the initial state and da_handle_start_run_event also
registers the current event in the newly enabled monitor.
da_handle_start_event can be used on events that only lead to the
initial state (as it is currently done in the example monitors), while
da_handle_start_run_event could be used on events that are only valid
from the initial one.
Failing to set at least one of those functions to handle events makes
the monitor useless, since it will never be activated.

This patch adapts dot2k to parse the events that surely lead to the
initial state and set da_handle_start_event for those, if no such event
is found but some events are only valid in the initial event, we instead
set da_handle_start_run_event (it isn't necessary to set both).
We still add a comment to warn the user to make sure this change is
matching the model definition.

Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
Link: https://lore.kernel.org/20241227144752.362911-9-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/verification/dot2/automata.py
tools/verification/dot2/dot2k.py