mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 00:51:51 -04:00
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>
This commit is contained in:
committed by
Gabriele Monaco
parent
6c7e548e31
commit
76ad28af8e
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user