cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Concerns around type safety for usage of expressions
Date: Fri, 22 Nov 2019 10:27:27 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1911221025570.2793@hadrien> (raw)
In-Reply-To: <cc561358-4d00-9f1f-eaa2-8fae400ccc8b@web.de>

[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]



On Fri, 22 Nov 2019, Markus Elfring wrote:

> Hello,
>
> The semantic patch language supports source code searches also for uses
> of specific data types. Such restricted searches can occasionally be nice.
> But we would like to find more software variations often enough.
> The consequence is that metavariables of the kind “expression” will usually
> be applied. But it becomes uncertain then to which data types the found
> expressions will be resolved finally.
>
> We would like to achieve considerably safe software transformations.
> Use cases occur then where the correct application of data types
> is essential. (The introduction of false positives is undesirable here.)
>
> How much can SmPL scripts help for corresponding changes?

You can specify the type of an expression rather than just expression.

The ability of Coccinlle to find the types depends on whether header files
are needed and whether Coccinelle can find those header files.

If a type is specified and Coccinelle cannot detetermine that an
expression has the required type, the match will fail.

julia

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2019-11-22  9:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  9:24 [Cocci] Concerns around type safety for usage of expressions Markus Elfring
2019-11-22  9:27 ` Julia Lawall [this message]
2019-11-22  9:45   ` Markus Elfring
2019-11-22  9:50     ` Julia Lawall
2019-11-22 10:00       ` Markus Elfring
2019-11-22 10:34         ` Julia Lawall
2019-11-22 10:44           ` Markus Elfring
     [not found]             ` <alpine.DEB.2.21.1911221155320.2793@hadrien>
2019-11-22 11:20               ` Markus Elfring
2019-11-22 12:53                 ` Julia Lawall
2019-11-22 13:17                   ` Markus Elfring
2019-11-22 14:56                   ` Markus Elfring
2019-11-22 15:10                     ` Julia Lawall
2019-11-22 15:19                       ` Markus Elfring
2019-11-23  7:55                       ` [Cocci] Checking influence of variability with SmPL Markus Elfring
2019-11-23 19:36                         ` Julia Lawall
2019-11-24 10:40                           ` 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=alpine.DEB.2.21.1911221025570.2793@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.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 NNTP newsgroup(s).