summaryrefslogtreecommitdiff
path: root/tools/verification
diff options
context:
space:
mode:
authorWander Lairson Costa <wander@redhat.com>2026-02-23 13:17:50 -0300
committerGabriele Monaco <gmonaco@redhat.com>2026-04-01 10:16:18 +0200
commit76ad28af8e6b23e39bf7e1342887533db4271ae9 (patch)
tree4dedfd8c69971264914f15d30ab8eea086eab9fc /tools/verification
parent6c7e548e313dcfbb8a4965b9b93c5c59537b35d9 (diff)
rv/rvgen: fix typos in automata and generator docstring and comments
Fix two typos in the Automata class documentation that have been present since the initial implementation. Fix the class docstring: "part it" instead of "parses it". Additionally, a comment describing transition labels contained the misspelling "lables" instead of "labels". Fix a typo in the comment describing the insertion of the initial state into the states list: "bein og" should be "beginning of". Fix typo in the module docstring: "Abtract" should be "Abstract". Fix several occurrences of "automata" where it should be the singular form "automaton". Signed-off-by: Wander Lairson Costa <wander@redhat.com> Reviewed-by: Gabriele Monaco <gmonaco@redhat.com> Link: https://lore.kernel.org/r/20260223162407.147003-8-wander@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Diffstat (limited to 'tools/verification')
-rw-r--r--tools/verification/rvgen/rvgen/automata.py8
-rw-r--r--tools/verification/rvgen/rvgen/dot2c.py2
-rw-r--r--tools/verification/rvgen/rvgen/dot2k.py4
-rw-r--r--tools/verification/rvgen/rvgen/generator.py2
4 files changed, 8 insertions, 8 deletions
diff --git a/tools/verification/rvgen/rvgen/automata.py b/tools/verification/rvgen/rvgen/automata.py
index 10146b6061ed..60792aaebf12 100644
--- a/tools/verification/rvgen/rvgen/automata.py
+++ b/tools/verification/rvgen/rvgen/automata.py
@@ -3,7 +3,7 @@
#
# Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org>
#
-# Automata object: parse an automata in dot file digraph format into a python object
+# Automata class: parse an automaton in dot file digraph format into a python object
#
# For further information, see:
# Documentation/trace/rv/deterministic_automata.rst
@@ -33,7 +33,7 @@ class AutomataError(Exception):
"""
class Automata:
- """Automata class: Reads a dot file and part it as an automata.
+ """Automata class: Reads a dot file and parses it as an automaton.
It supports both deterministic and hybrid automata.
@@ -153,7 +153,7 @@ class Automata:
states = sorted(set(states))
states.remove(initial_state)
- # Insert the initial state at the bein og the states
+ # Insert the initial state at the beginning of the states
states.insert(0, initial_state)
if not has_final_states:
@@ -175,7 +175,7 @@ class Automata:
line = self.__dot_lines[cursor].split()
event = "".join(line[line.index("label") + 2:-1]).replace('"', '')
- # when a transition has more than one lables, they are like this
+ # when a transition has more than one label, they are like this
# "local_irq_enable\nhw_local_irq_enable_n"
# so split them.
diff --git a/tools/verification/rvgen/rvgen/dot2c.py b/tools/verification/rvgen/rvgen/dot2c.py
index fa44795adef4..9255cc2153a3 100644
--- a/tools/verification/rvgen/rvgen/dot2c.py
+++ b/tools/verification/rvgen/rvgen/dot2c.py
@@ -3,7 +3,7 @@
#
# Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org>
#
-# dot2c: parse an automata in dot file digraph format into a C
+# dot2c: parse an automaton in dot file digraph format into a C
#
# This program was written in the development of this paper:
# de Oliveira, D. B. and Cucinotta, T. and de Oliveira, R. S.
diff --git a/tools/verification/rvgen/rvgen/dot2k.py b/tools/verification/rvgen/rvgen/dot2k.py
index 47af9f104a82..aedc2a7799b3 100644
--- a/tools/verification/rvgen/rvgen/dot2k.py
+++ b/tools/verification/rvgen/rvgen/dot2k.py
@@ -167,14 +167,14 @@ class da2k(dot2k):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if self.is_hybrid_automata():
- raise AutomataError("Detected hybrid automata, use the 'ha' class")
+ raise AutomataError("Detected hybrid automaton, use the 'ha' class")
class ha2k(dot2k):
"""Hybrid automata only"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if not self.is_hybrid_automata():
- raise AutomataError("Detected deterministic automata, use the 'da' class")
+ raise AutomataError("Detected deterministic automaton, use the 'da' class")
self.trace_h = self._read_template_file("trace_hybrid.h")
self.__parse_constraints()
diff --git a/tools/verification/rvgen/rvgen/generator.py b/tools/verification/rvgen/rvgen/generator.py
index d932e96dd66d..988ccdc27fa3 100644
--- a/tools/verification/rvgen/rvgen/generator.py
+++ b/tools/verification/rvgen/rvgen/generator.py
@@ -3,7 +3,7 @@
#
# Copyright (C) 2019-2022 Red Hat, Inc. Daniel Bristot de Oliveira <bristot@kernel.org>
#
-# Abtract class for generating kernel runtime verification monitors from specification file
+# Abstract class for generating kernel runtime verification monitors from specification file
import platform
import os