From: Nam Cao <namcao@linutronix.de>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: john.ogness@linutronix.de, Steven Rostedt <rostedt@goodmis.org>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 13/22] rv: Add support for LTL monitors
Date: Fri, 9 May 2025 17:23:21 +0200 [thread overview]
Message-ID: <20250509152321.zsiacCwk@linutronix.de> (raw)
In-Reply-To: <817f3cb62b2632286e5c6fffde3163592a110eee.camel@redhat.com>
On Fri, May 09, 2025 at 04:50:29PM +0200, Gabriele Monaco wrote:
> On Fri, 2025-05-09 at 10:12 +0200, Nam Cao wrote:
> > + def negate(self):
> > + # ![]F == <>(!F)
> > + return EventuallyOp(self.left,
> > self.right.negate()).normalize()
>
> Shouldn't this be:
> + return EventuallyOp(self.child.negate()).normalize()
Yes, remnant of the old version :(
> > +def p_unop(p):
> > + '''
> > + unop : ALWAYS ltl
> > + | EVENTUALLY ltl
> > + | NOT ltl
> > + '''
> > + if p[1] == "always":
> > + op = AlwaysOp(p[2])
> > + if p[1] == "eventually":
> > + op = EventuallyOp(p[2])
> > + if p[1] == "not":
> > + op = NotOp(p[2])
>
> Pylint is complaining about this one, wouldn't it be better changing it to an
> if/elif chain and addding:
>
> else:
> raise ValueError("Invalid unary operator: %s" % p[1])
lex should have failed due to unknown token before getting here. But yes,
this would be a good change.
> > +def parse_ltl(s: str) -> ASTNode:
> > + spec = parser.parse(s)
> > +
> > + subexpr = dict()
> > +
> > + for assign in spec:
> > + if assign[0] == "RULE":
> > + rule = assign[1]
> > + else:
> > + subexpr[assign[0]] = assign[1]
>
> rule may be undefined here (but I guess python will just say variable rule is
> undefined and it would be quite clear the ltl didn't start with a rule.
We could make the error verbose.
> I'm still getting a few more errors but my model may be to blame, still need to
> play a bit.
Feel free to send me the model. Maybe it is a bug in the script. But I
would be happy to help debugging your model as well.
Thanks for the feedback,
Nam
next prev parent reply other threads:[~2025-05-09 15:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 8:11 [PATCH v7 00/22] RV: Linear temporal logic monitors for RT application Nam Cao
2025-05-09 8:12 ` [PATCH v7 01/22] rv: Add #undef TRACE_INCLUDE_FILE Nam Cao
2025-05-09 8:12 ` [PATCH v7 02/22] printk: Make vprintk_deferred() public Nam Cao
2025-05-09 8:12 ` [PATCH v7 03/22] panic: Add vpanic() Nam Cao
2025-05-09 8:12 ` [PATCH v7 04/22] rv: Let the reactors take care of buffers Nam Cao
2025-05-09 8:12 ` [PATCH v7 05/22] verification/dot2k: Make a separate dot2k_templates/Kconfig_container Nam Cao
2025-05-09 8:12 ` [PATCH v7 06/22] verification/dot2k: Remove __buff_to_string() Nam Cao
2025-05-09 8:12 ` [PATCH v7 07/22] verification/dot2k: Replace is_container() hack with subparsers Nam Cao
2025-05-09 8:12 ` [PATCH v7 08/22] rv: rename CONFIG_DA_MON_EVENTS to CONFIG_RV_MON_EVENTS Nam Cao
2025-05-09 8:12 ` [PATCH v7 09/22] verification/dot2k: Prepare the frontend for LTL inclusion Nam Cao
2025-05-09 8:12 ` [PATCH v7 10/22] Documentation/rv: Prepare monitor synthesis document " Nam Cao
2025-05-09 8:12 ` [PATCH v7 11/22] verification/rvgen: Restructure the templates files Nam Cao
2025-05-09 8:12 ` [PATCH v7 12/22] verification/rvgen: Restructure the classes to prepare for LTL inclusion Nam Cao
2025-05-09 8:12 ` [PATCH v7 13/22] rv: Add support for LTL monitors Nam Cao
2025-05-09 14:50 ` Gabriele Monaco
2025-05-09 15:23 ` Nam Cao [this message]
2025-05-09 8:12 ` [PATCH v7 14/22] rv: Add rtapp container monitor Nam Cao
2025-05-09 8:12 ` [PATCH v7 15/22] x86/tracing: Remove redundant trace_pagefault_key Nam Cao
2025-05-09 8:12 ` [PATCH v7 16/22] x86/tracing: Move page fault trace points to generic Nam Cao
2025-05-09 8:12 ` [PATCH v7 17/22] arm64: mm: Add page fault trace points Nam Cao
2025-05-09 8:12 ` [PATCH v7 18/22] riscv: " Nam Cao
2025-05-09 8:12 ` [PATCH v7 19/22] rv: Add rtapp_pagefault monitor Nam Cao
2025-05-09 8:12 ` [PATCH v7 20/22] rv: Add rtapp_sleep monitor Nam Cao
2025-05-09 8:12 ` [PATCH v7 21/22] rv: Add documentation for rtapp monitor Nam Cao
2025-05-09 8:12 ` [PATCH v7 22/22] rv: Allow to configure the number of per-task monitor Nam Cao
2025-08-10 21:12 ` [PATCH v7 00/22] RV: Linear temporal logic monitors for RT application patchwork-bot+linux-riscv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250509152321.zsiacCwk@linutronix.de \
--to=namcao@linutronix.de \
--cc=gmonaco@redhat.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox