* [Cocci] Control flow query across files
@ 2013-03-26 14:29 LANCIA Julien
2013-03-28 13:10 ` Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: LANCIA Julien @ 2013-03-26 14:29 UTC (permalink / raw)
To: cocci
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 ?
Thanks in advance for your help,
Regards,
Julien Lancia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20130326/98a420b0/attachment-0001.html>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cocci] Control flow query across files
2013-03-26 14:29 [Cocci] Control flow query across files LANCIA Julien
@ 2013-03-28 13:10 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2013-03-28 13:10 UTC (permalink / raw)
To: cocci
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-28 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 14:29 [Cocci] Control flow query across files LANCIA Julien
2013-03-28 13:10 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox