From: julia.lawall@lip6.fr (Julia Lawall)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Control flow query across files
Date: Thu, 28 Mar 2013 14:10:37 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.02.1303281408320.1928@hadrien> (raw)
In-Reply-To: <13CEBF2EC72707459166C3356C1FEC8B7C3B22E0@ST-PES-MBX-01.serma.local>
On Tue, 26 Mar 2013, LANCIA Julien wrote:
>
> Hello,
>
> I?ve stumbled accross coccinelle and I?m interested in using it to perform queries on the control flow graph
> (quite similarly to what have been done in ?Finding Error Handling Bugs in OpenSSL using Coccinelle? by Lawall
> and al.).
>
> However, I wonder if it is possible to perform queries on the control flow graph that span across a single C
> file.
>
> ?
>
> An example to be clear:
>
> ?
>
> fileA.h : f(), g(), h()
>
> fileA.c : f() calls g() calls h() calls i()
>
> ?
>
> fileA.h : i() j() k()
>
> fileA.c : i() calls j() calls k()
>
> ?
>
> Is it possible with coccinelle to match the query
>
> f()
>
> ?
>
> k()
>
> ?
>
> that spans across fileA.c and fileB.c ?
No, ... doesn't work that way. You can use the iteration facility to do
interprocedural analysis. If you have the coccinelle source code, you can
see an example in demos/iteration.cocci
julia
prev parent reply other threads:[~2013-03-28 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 14:29 [Cocci] Control flow query across files LANCIA Julien
2013-03-28 13:10 ` Julia Lawall [this message]
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.02.1303281408320.1928@hadrien \
--to=julia.lawall@lip6.fr \
--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