From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50BE638F24E for ; Tue, 20 Jan 2026 12:36:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768912602; cv=none; b=oNaJADohLSdX9Pjfhkp7e20fuFslfr1a6qfhM0zF9f8AnQGvscl7NuQqoJglqjfVr4Pnuc+UiEVtSqb3948eFcuCK6jUQtr+4P+PVKYou5SFhN4SwpfmdGH1YMepFdS8w55H+9RJFU/JWMliA4cgcrNBbqeBkrHUDvuFv8qSufs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768912602; c=relaxed/simple; bh=aXwAIsCSH4SDEfjq9aN8agt/at4w19pksE8ic5Ls3hU=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=UVt3WvnMpzzZIak8DRqCB+U6o5jCTcLfCNm3SEd/F07awScOx+K1yC0HslzK2uibclOlbZj/pIknhOm/inU72cDQm2d0kU+IjPIvCisK+yy7VHv4TOTt1uZ5mnvsmhNTtRfKJJ9oMuPlF427iVU09hMz75OtsFaq5S28jdLu1TM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AC9ca+Fg; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZMIWCRhD; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AC9ca+Fg"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZMIWCRhD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768912599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=aXwAIsCSH4SDEfjq9aN8agt/at4w19pksE8ic5Ls3hU=; b=AC9ca+Fg89MkWosAWb8Q2ud/MHsTUYLtY5oasIO7joeUNIOuCGfZc2xkgj28eEZ/ZKERRr 54R7uHOREuYfE3EAvyjcmBn6ttkj7y+K+zjTRImN+qFEOqKhCoeOaOdZRuSKvW9/+s0NTn pG3hYm25vq+5qXWI7x48F4IcMMIWXNI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-612-yk0nrUq_OEeMG12PmzsIDQ-1; Tue, 20 Jan 2026 07:36:38 -0500 X-MC-Unique: yk0nrUq_OEeMG12PmzsIDQ-1 X-Mimecast-MFC-AGG-ID: yk0nrUq_OEeMG12PmzsIDQ_1768912597 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-47edf8ba319so46851875e9.2 for ; Tue, 20 Jan 2026 04:36:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1768912597; x=1769517397; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to; bh=aXwAIsCSH4SDEfjq9aN8agt/at4w19pksE8ic5Ls3hU=; b=ZMIWCRhDDoH5/j4lPDN1RSmUXFnOq9i8pEC+BRxBFFnW0VyJ2RTiBsiuWbmfLje6lh 4UaTb/+gomqM0VmxMn2Y98wqI0qh9urqY5M/Up/wex83uTQwZwNNkAOyyg2CLPRUy3s+ Y2aeEcbMUXBlPUclKHVKLUVJEz1XwQtjF5icYb2E96uqDOo0/t3uNCwnNYb9uDU2+/+G /FFj8ZtrcWdKxQ5WxuEfDGxWY2/YVpygDhEezDGAfWtG8hzbQTOvB7f9L52V5K59aNVg 7bqp0bYnq6uPhH4ZRfwlxqoMg8OlZ8h81zIFOrd2rLzZHM3fORECQ7K4Xyucoa9ZW9Vz 01EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768912597; x=1769517397; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aXwAIsCSH4SDEfjq9aN8agt/at4w19pksE8ic5Ls3hU=; b=JRdeo/LVbq95Sayx159A6p2UY8Kbu+p08ScFXfXTTUSqMGPX2RDOrtYfbSOEYYiWhG SlHSAc/GxtdaPFwpdEQYhlutizlDmvuQXeI4zr0hTd0pAwfRCZlicDT3Z7/YZ7pwkTG+ 32zfIrDncvP/8A1CFuYBhFe3Q4vg3AtC1LTowLHtkIL+joDnbE+FrYKtUe1rcoR0DSfP ty+XabE1j3N6KzS1RoXjWJKw0jmbHlv2RowIrp7y935AIQtv9WU/Hq8SwjgTipsYgGlu ZKElnRuWNj8Cl4BMX+oyNvGhBX5klWqnEQRP8ZKKOO7SG0ORWrt4waC5qm3HiQ2BfgNE aQpg== X-Forwarded-Encrypted: i=1; AJvYcCVwXVYUenKSKGlcSlgjv/evcoAxDyg3FEF3MmJQXVoEBYkKWKxdU0vXIIcWGNZ/xtNve33GufsP43BBbn0=@vger.kernel.org X-Gm-Message-State: AOJu0YwhIduXXoBskzciLmL7K5gm1PX7oYGzNYEeOZECqJGFuhRs6AFe k9mtA6aonZjhO9ZaRwZtxE03vPK4MDDN9j+Ob5bI4Ur0cKlexBONJsq1qTkTw+U7agx7kA7lpM7 uOD42v470hVE6ct9JcuhRZ6ho6dblaWEs4Uxoo4UNK2UO62gyWMGH4TPkt9rxH+jCVg== X-Gm-Gg: AY/fxX4aN4ozeSqbkBN/9/of76WyivfEXWLJPJuoT1f8RUg7BDgsrTtPxp9P2N/IUL9 FcJDMlplurhmsWPoZVQ8vjQMEz2qxFQaw9d6fiwzES9BSZB1Z2hCpYIROMJwFRzxWUfgd9MkWff xC6ys7lQC3Rxgau+11VF6TzhtpWpVQV+L0d61Z2CBMfexjVdJP/lojfEziRX03dAUc1fe3xVQfQ Sowu1RHdvNbu95nxTBxtK0J1SShsz3j++jI2Zt4/Dr4pPwtx7pttdlJAnOLUXgUBg3XED0au+Xu TvIP1WFpq9HaWzeqZ9gF04c5Dfn9081T5RIWDNn0J2ZdArIU1FoLWg8byHGJbM9WLMa4IlIZEBq 6+U5rrJlbgbKpSJ/WEp47NhBIM+R7iekvN4EXTqmS5vwHpXKjIrvrPA/q5LsEXWU8VNn7sy/g4I rKSke0NSzU X-Received: by 2002:a05:600c:1d19:b0:47f:b737:5ce0 with SMTP id 5b1f17b1804b1-4803e7e7dc4mr21331195e9.23.1768912596801; Tue, 20 Jan 2026 04:36:36 -0800 (PST) X-Received: by 2002:a05:600c:1d19:b0:47f:b737:5ce0 with SMTP id 5b1f17b1804b1-4803e7e7dc4mr21330785e9.23.1768912596393; Tue, 20 Jan 2026 04:36:36 -0800 (PST) Received: from gmonaco-thinkpadt14gen3.rmtit.csb (185-132-178-103.hosted-by-worldstream.net. [185.132.178.103]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f429071besm298023235e9.10.2026.01.20.04.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jan 2026 04:36:36 -0800 (PST) Message-ID: <85c7d4762464e6a50b4318f4ea56a70202a4b287.camel@redhat.com> Subject: Re: [PATCH 26/26] rv/rvgen: extract node marker string to class constant From: Gabriele Monaco To: Wander Lairson Costa Cc: Steven Rostedt , Nam Cao , open list , "open list:RUNTIME VERIFICATION (RV)" Date: Tue, 20 Jan 2026 13:36:35 +0100 In-Reply-To: References: <20260119205601.105821-1-wander@redhat.com> <20260119205601.105821-27-wander@redhat.com> <0383d9a3fdaeb2b66e48a7857791bcbfe324958d.camel@redhat.com> Autocrypt: addr=gmonaco@redhat.com; prefer-encrypt=mutual; keydata=mDMEZuK5YxYJKwYBBAHaRw8BAQdAmJ3dM9Sz6/Hodu33Qrf8QH2bNeNbOikqYtxWFLVm0 1a0JEdhYnJpZWxlIE1vbmFjbyA8Z21vbmFjb0BrZXJuZWwub3JnPoiZBBMWCgBBFiEEysoR+AuB3R Zwp6j270psSVh4TfIFAmjKX2MCGwMFCQWjmoAFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgk Q70psSVh4TfIQuAD+JulczTN6l7oJjyroySU55Fbjdvo52xiYYlMjPG7dCTsBAMFI7dSL5zg98I+8 cXY1J7kyNsY6/dcipqBM4RMaxXsOtCRHYWJyaWVsZSBNb25hY28gPGdtb25hY29AcmVkaGF0LmNvb T6InAQTFgoARAIbAwUJBaOagAULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgBYhBMrKEfgLgd0WcK eo9u9KbElYeE3yBQJoymCyAhkBAAoJEO9KbElYeE3yjX4BAJ/ETNnlHn8OjZPT77xGmal9kbT1bC1 7DfrYVISWV2Y1AP9HdAMhWNAvtCtN2S1beYjNybuK6IzWYcFfeOV+OBWRDQ== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2026-01-20 at 08:34 -0300, Wander Lairson Costa wrote: > On Tue, Jan 20, 2026 at 10:03:20AM +0100, Gabriele Monaco wrote: > > On Mon, 2026-01-19 at 17:46 -0300, Wander Lairson Costa wrote: > > > Add a node_marker class constant to the Automata class to replace the > > > hardcoded "{node" string literal used throughout the DOT file parsing > > > logic. This follows the existing pattern established by the init_mark= er > > > and invalid_state_str class constants in the same class. > > >=20 > > > The "{node" string is used as a marker to identify node declaration > > > lines in DOT files during state variable extraction and cursor > > > positioning. Extracting it to a named constant improves code > > > maintainability and makes the marker's purpose explicit. > > >=20 > > > Signed-off-by: Wander Lairson Costa > >=20 > > Looks fine for me, thanks! > >=20 > > I wonder if we could merge this patch with 15/26 that is introducing a = very > > similar change on init_marker. >=20 > The idea was to make each patch doing one thing to make the reviewer's > life easier (I think I broke my own rule in a couple of patch). But if > there is a strong feeling about the merge, I could merged them in a > possible v2 patch series. >=20 Yeah I get the idea, I guess I could just pick the most obvious patches and= send a PR to Steve before the merge window, so I can see directly if it makes se= nse to squash them and you don't need to send them all in the v2. I'm leaving the longer or trickier ones for the next cycle so that I can te= st them a bit better and perhaps get some rvgen selftest help with that. Also = for some it's better to wait for Nam's comments. Will let you know the ones I pick. Thanks again for the extensive work! Gabriele > >=20 > > Anyway: > >=20 > > Reviewed-by: Gabriele Monaco > >=20 > > > --- > > > =C2=A0tools/verification/rvgen/rvgen/automata.py | 9 +++++---- > > > =C2=A01 file changed, 5 insertions(+), 4 deletions(-) > > >=20 > > > diff --git a/tools/verification/rvgen/rvgen/automata.py > > > b/tools/verification/rvgen/rvgen/automata.py > > > index a6889d0c26c3f..5f23db1855cd3 100644 > > > --- a/tools/verification/rvgen/rvgen/automata.py > > > +++ b/tools/verification/rvgen/rvgen/automata.py > > > @@ -29,6 +29,7 @@ class Automata: > > > =C2=A0 > > > =C2=A0=C2=A0=C2=A0=C2=A0 invalid_state_str =3D "INVALID_STATE" > > > =C2=A0=C2=A0=C2=A0=C2=A0 init_marker =3D "__init_" > > > +=C2=A0=C2=A0=C2=A0 node_marker =3D "{node" > > > =C2=A0 > > > =C2=A0=C2=A0=C2=A0=C2=A0 def __init__(self, file_path, model_name=3DN= one): > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.__dot_path =3D = file_path > > > @@ -76,7 +77,7 @@ class Automata: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for cursor, line in = enumerate(self.__dot_lines): > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 split_line =3D line.split() > > > =C2=A0 > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 i= f len(split_line) and split_line[0] =3D=3D "{node": > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 i= f len(split_line) and split_line[0] =3D=3D self.node_marker: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 return cursor > > > =C2=A0 > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 raise AutomataError(= "Could not find a beginning state") > > > @@ -91,9 +92,9 @@ class Automata: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 continue > > > =C2=A0 > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 if state =3D=3D 0: > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if line[0] =3D=3D "{node": > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 if line[0] =3D=3D self.node_marker: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 state =3D 1 > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 e= lif line[0] !=3D "{node": > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 e= lif line[0] !=3D self.node_marker: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 break > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 raise AutomataError("Could not find beginning event") > > > @@ -116,7 +117,7 @@ class Automata: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # process nodes > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 for line in islice(s= elf.__dot_lines, cursor, None): > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 split_line =3D line.split() > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 i= f not split_line or split_line[0] !=3D "{node": > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 i= f not split_line or split_line[0] !=3D self.node_marker: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 break > > > =C2=A0 > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 raw_state =3D split_line[-1]