* [Cocci] Improvements for source code analysis with inclusion of header files
@ 2014-03-30 11:30 SF Markus Elfring
2014-03-30 11:56 ` Julia Lawall
0 siblings, 1 reply; 11+ messages in thread
From: SF Markus Elfring @ 2014-03-30 11:30 UTC (permalink / raw)
To: cocci
Hello,
Some filter patterns can be specified in the semantic patch language so that
they will also work without inclusion of header files. Some other source code
analysis approaches will need all relevant data (e. g. macros and type
declarations) from them.
Various compilers provide a functionality to store processed information from
such headers in an alternative data format.
http://en.wikipedia.org/wiki/Precompiled_header
Would another intermediate form help to reduce analysis and transformation time
by the Coccinelle software here?
How do you think about to store the results from a step "precompilation" like
corresponding abstract syntax graphs in a kind of dedicated data base?
http://en.wikipedia.org/wiki/Graph_database#Graph_database_projects
Regards,
Markus
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 11:30 [Cocci] Improvements for source code analysis with inclusion of header files SF Markus Elfring
@ 2014-03-30 11:56 ` Julia Lawall
2014-03-30 12:13 ` SF Markus Elfring
0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2014-03-30 11:56 UTC (permalink / raw)
To: cocci
On Sun, 30 Mar 2014, SF Markus Elfring wrote:
> Hello,
>
> Some filter patterns can be specified in the semantic patch language so that
> they will also work without inclusion of header files. Some other source code
> analysis approaches will need all relevant data (e. g. macros and type
> declarations) from them.
>
> Various compilers provide a functionality to store processed information from
> such headers in an alternative data format.
> http://en.wikipedia.org/wiki/Precompiled_header
>
> Would another intermediate form help to reduce analysis and transformation time
> by the Coccinelle software here?
>
> How do you think about to store the results from a step "precompilation" like
> corresponding abstract syntax graphs in a kind of dedicated data base?
> http://en.wikipedia.org/wiki/Graph_database#Graph_database_projects
Coccinelle already allows you to cache abstract syntax trees on disk.
Relevant command line arguments are --use-cache and --cache-limit.
julia
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 11:56 ` Julia Lawall
@ 2014-03-30 12:13 ` SF Markus Elfring
2014-03-30 12:26 ` Julia Lawall
0 siblings, 1 reply; 11+ messages in thread
From: SF Markus Elfring @ 2014-03-30 12:13 UTC (permalink / raw)
To: cocci
> Coccinelle already allows you to cache abstract syntax trees on disk.
> Relevant command line arguments are --use-cache and --cache-limit.
Will any more documentation become available than a terse option description
like "Use preparsed versions of the C files that are stored in a cache."?
Regards,
Markus
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 12:13 ` SF Markus Elfring
@ 2014-03-30 12:26 ` Julia Lawall
2014-03-30 12:33 ` SF Markus Elfring
2014-03-30 12:45 ` Derek M Jones
0 siblings, 2 replies; 11+ messages in thread
From: Julia Lawall @ 2014-03-30 12:26 UTC (permalink / raw)
To: cocci
On Sun, 30 Mar 2014, SF Markus Elfring wrote:
> > Coccinelle already allows you to cache abstract syntax trees on disk.
> > Relevant command line arguments are --use-cache and --cache-limit.
>
> Will any more documentation become available than a terse option description
> like "Use preparsed versions of the C files that are stored in a cache."?
Not sure what more documentation one would want.
julia
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 12:26 ` Julia Lawall
@ 2014-03-30 12:33 ` SF Markus Elfring
2014-03-30 12:36 ` Julia Lawall
2014-03-30 12:45 ` Derek M Jones
1 sibling, 1 reply; 11+ messages in thread
From: SF Markus Elfring @ 2014-03-30 12:33 UTC (permalink / raw)
To: cocci
> Not sure what more documentation one would want.
I would find a clarification nice for details like the following.
1. Which "C files" are referenced here?
2. File formats for the cache
3. Explanation for abstract syntax trees in this context
Regards,
Markus
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 12:33 ` SF Markus Elfring
@ 2014-03-30 12:36 ` Julia Lawall
2014-03-30 12:44 ` SF Markus Elfring
0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2014-03-30 12:36 UTC (permalink / raw)
To: cocci
On Sun, 30 Mar 2014, SF Markus Elfring wrote:
> > Not sure what more documentation one would want.
>
> I would find a clarification nice for details like the following.
>
> 1. Which "C files" are referenced here?
The ones Coccinelle was asked to work on.
> 2. File formats for the cache
Doesn't matter to the user.
> 3. Explanation for abstract syntax trees in this context
Likewise.
The cache is something that Coccinelle writes into and reads out of. Only
Coccinelle cares what that format is.
julia
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 12:36 ` Julia Lawall
@ 2014-03-30 12:44 ` SF Markus Elfring
2014-03-30 12:49 ` Julia Lawall
0 siblings, 1 reply; 11+ messages in thread
From: SF Markus Elfring @ 2014-03-30 12:44 UTC (permalink / raw)
To: cocci
>> 1. Which "C files" are referenced here?
>
> The ones Coccinelle was asked to work on.
Do you distinguish headers from source files in this use case?
>> 2. File formats for the cache
>
> Doesn't matter to the user.
I guess that such information will become more interesting for other software
developers, won't it?
>> 3. Explanation for abstract syntax trees in this context
>
> Likewise.
>
> The cache is something that Coccinelle writes into and reads out of. Only
> Coccinelle cares what that format is.
I would appreciate if more details could be eventually documented in an other
format than the original OCaml source code.
Regards,
Markus
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 12:44 ` SF Markus Elfring
@ 2014-03-30 12:49 ` Julia Lawall
2014-03-30 13:08 ` SF Markus Elfring
0 siblings, 1 reply; 11+ messages in thread
From: Julia Lawall @ 2014-03-30 12:49 UTC (permalink / raw)
To: cocci
On Sun, 30 Mar 2014, SF Markus Elfring wrote:
> >> 1. Which "C files" are referenced here?
> >
> > The ones Coccinelle was asked to work on.
>
> Do you distinguish headers from source files in this use case?
No that I recall.
> >> 2. File formats for the cache
> >
> > Doesn't matter to the user.
>
> I guess that such information will become more interesting for other software
> developers, won't it?
I don't think so. No more than any ordinary user is interested in the
format that a web browser uses for its cache.
In general, a cache has a short lifetime. The software changes, or one
wants to use Coccinelle with other options, and then one would rather
start over with a new cache. The cache is mostly useful when one does
iteration. In that case, I usually limit the size of the cache as well,
because the format is not particularly concise. This further implies that
it is not useful to anything other than the current run.
julia
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 12:49 ` Julia Lawall
@ 2014-03-30 13:08 ` SF Markus Elfring
0 siblings, 0 replies; 11+ messages in thread
From: SF Markus Elfring @ 2014-03-30 13:08 UTC (permalink / raw)
To: cocci
>> Do you distinguish headers from source files in this use case?
>
> No that I recall.
Would you like to support any variant of precompiled header files?
> The software changes, or one wants to use Coccinelle with other options,
> and then one would rather start over with a new cache.
I imagine that caches can also be generated for data representations with a
longer "life time".
> In that case, I usually limit the size of the cache as well, because the format
> is not particularly concise. This further implies that it is not useful
> to anything other than the current run.
I am becoming a bit more interested in conciseness for relevant data structures.
How can it be achieved to make the intermediate data storage useful for several
different source code analysis runs?
Regards,
Markus
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Cocci] Improvements for source code analysis with inclusion of header files
2014-03-30 12:26 ` Julia Lawall
2014-03-30 12:33 ` SF Markus Elfring
@ 2014-03-30 12:45 ` Derek M Jones
2014-03-30 13:00 ` Julia Lawall
1 sibling, 1 reply; 11+ messages in thread
From: Derek M Jones @ 2014-03-30 12:45 UTC (permalink / raw)
To: cocci
Julia,
> Not sure what more documentation one would want.
Coccinelle is getting to be widely used.
When is the O'Reilly book coming out :-)
--
Derek M. Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd blog:shape-of-code.coding-guidelines.com
Software analysis http://www.knosof.co.uk
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-03-30 13:08 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-30 11:30 [Cocci] Improvements for source code analysis with inclusion of header files SF Markus Elfring
2014-03-30 11:56 ` Julia Lawall
2014-03-30 12:13 ` SF Markus Elfring
2014-03-30 12:26 ` Julia Lawall
2014-03-30 12:33 ` SF Markus Elfring
2014-03-30 12:36 ` Julia Lawall
2014-03-30 12:44 ` SF Markus Elfring
2014-03-30 12:49 ` Julia Lawall
2014-03-30 13:08 ` SF Markus Elfring
2014-03-30 12:45 ` Derek M Jones
2014-03-30 13:00 ` Julia Lawall
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.