All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Error predicate determination with SmPL?
Date: Mon, 13 Jul 2015 13:14:46 +0200	[thread overview]
Message-ID: <55A39DA6.3030109@users.sourceforge.net> (raw)
In-Reply-To: <alpine.DEB.2.10.1507130657040.2561@hadrien>

>> 1. Do I need to specify a SmPL constraint like "non-void"
>>    for such a script?
> 
> It seems pointless.  If the code is returning something and the return
> type is void, then the problem is elsewhere.

A C compiler will usually will react with an error display
for this special case.
How should a static source code analysis tool deal with it?

Does the metavariable type "expression" match also to the empty string?


>> 2. The expression which is used for a specific return statement
>>    can be assigned to a SmPL metavariable in an other script variant.
>>    I would appreciate if I could process the extracted data
>>    in a more structured way somehow.
> 
> I have no idea what you want to do.  You can get the AST if you write
> a script using OCaml:
> 
> (stringrep,astrep) << r.express;

I guess that I am going to store elements into another SQL database.

How are the chances that more documentation will become available
for safe processing of corresponding abstract syntax graph instances?

Regards,
Markus

  reply	other threads:[~2015-07-13 11:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  7:19 [Cocci] Error predicate determination with SmPL? SF Markus Elfring
2015-07-13 10:55 ` SF Markus Elfring
2015-07-13 11:00   ` Julia Lawall
2015-07-13 11:14     ` SF Markus Elfring [this message]
2015-07-13 11:46       ` Julia Lawall
2015-07-13 12:01         ` SF Markus Elfring
2015-07-13 13:00         ` [Cocci] Data processing for expression ASTs SF Markus Elfring
2015-07-13 16:19     ` [Cocci] Error predicate determination with SmPL? SF Markus Elfring
2015-07-13 17:02       ` Julia Lawall
2015-07-13 17:10         ` SF Markus Elfring
2015-07-13 17:20         ` SF Markus Elfring
2015-07-13 17:24           ` Julia Lawall
2015-07-13 17:39             ` [Cocci] Checking of OCaml functionality SF Markus Elfring
2015-07-13 17:48               ` Julia Lawall
2015-07-13 18:03                 ` SF Markus Elfring
2015-07-13 18:07                   ` Julia Lawall
2015-07-13 18:11                     ` SF Markus Elfring
2015-07-13 18:15                       ` Julia Lawall

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=55A39DA6.3030109@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.