verification/rvgen: Restructure the classes to prepare for LTL inclusion
authorNam Cao <namcao@linutronix.de>
Fri, 4 Jul 2025 13:20:04 +0000 (15:20 +0200)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 24 Jul 2025 14:42:46 +0000 (10:42 -0400)
commitcce86e03a27fdce11684c85ee33c528124904d8d
tree1cf11aae357a50872b4c5f8a525e8a728a447c6f
parentccb21fc879636f9197b29908895174218e11d8ef
verification/rvgen: Restructure the classes to prepare for LTL inclusion

Both container generation and DA monitor generation is implemented in the
class dot2k. That requires some ugly "if is_container ... else ...". If
linear temporal logic support is added at the current state, the "if else"
chain is longer and uglier.

Furthermore, container generation is irrevelant to .dot files. It is
therefore illogical to be implemented in class "dot2k".

Clean it up, restructure the dot2k class into the following class
hierarchy:

         (RVGenerator)
              /\
             /  \
            /    \
           /      \
          /        \
    (Container)  (Monitor)
                    /\
                   /  \
                  /    \
                 /      \
              (dot2k)  [ltl2k] <- intended

This allows a simple and clean integration of LTL.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/692137a581ba6bee7a64d37fb7173ae137c47bbd.1751634289.git.namcao@linutronix.de
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
tools/verification/rvgen/Makefile
tools/verification/rvgen/__main__.py
tools/verification/rvgen/rvgen/container.py [new file with mode: 0644]
tools/verification/rvgen/rvgen/dot2k.py
tools/verification/rvgen/rvgen/generator.py [new file with mode: 0644]