Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Subject: Re: [cocci] Reconsidering application of selected SmPL isomorphisms
Date: Mon, 25 Nov 2024 17:13:30 +0100	[thread overview]
Message-ID: <100663c2-6281-49cb-bb9f-55656dff80ca@web.de> (raw)
In-Reply-To: <9e8d6626-f8a2-19a7-33d3-b0cc48d2fa68@inria.fr>

> The generated code indeed does not look ideal.  But it won't cause any
> wrong matches.

I got the impression that I would need to disable the isomorphism “paren”
for the desired use case.



>                 The isomorphisms are applied on the ASTs, not on the soure code.

I remember other description approaches.
Are isomorphisms usually mapped to SmPL disjunctions?


>        So there will be a tree with a ! at the root and a || as the
> argument that will not match any possible source code.
>
> Maybe it would be better to add isomorphisms for the de Morgan laws rather
> than adding some hacks into the generic isomorphism transformation to take
> this issue into account.

I am looking for further software extensions.

* I would occasionally like to restrict the source code search to pointer expressions.

* Specifying a varying (or even unlimited) number of items for discussed boolean operators


Regards,
Markus

  reply	other threads:[~2024-11-25 16:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 13:16 [cocci] Reconsidering application of selected SmPL isomorphisms Markus Elfring
2024-11-25 15:37 ` Julia Lawall
2024-11-25 15:42 ` Julia Lawall
2024-11-25 16:13   ` Markus Elfring [this message]
2024-11-25 16:23     ` Julia Lawall
2024-11-25 16:34       ` Markus Elfring
2024-11-25 16:46         ` Julia Lawall
2024-11-25 16:57           ` [cocci] Advanced handling of logical operator chains (with SmPL)? Markus Elfring
2024-11-25 17:03             ` Julia Lawall
2024-11-25 17:08               ` Markus Elfring
2024-11-25 17:04       ` [cocci] Data processing challenges for pointer expressions Markus Elfring
2024-11-25 17:16         ` Julia Lawall
2024-11-25 17:58           ` Markus Elfring
2024-11-26  9:21           ` [cocci] Data processing challenges for source code analyses Markus Elfring

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=100663c2-6281-49cb-bb9f-55656dff80ca@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=julia.lawall@inria.fr \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).