All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] spatches for cpp?
@ 2012-10-24 22:03 ron minnich
  2012-10-25 11:19 ` Julia Lawall
  0 siblings, 1 reply; 9+ messages in thread
From: ron minnich @ 2012-10-24 22:03 UTC (permalink / raw)
  To: cocci

Are there ways to patch sequences such as
#if x
#endif

to some other sequence? My tries have failed, I'm hoping I'm missing something.

ron

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] spatches for cpp?
  2012-10-24 22:03 [Cocci] spatches for cpp? ron minnich
@ 2012-10-25 11:19 ` Julia Lawall
  2012-10-26 10:55   ` [Cocci] semantic patches for C preprocessing constructs? SF Markus Elfring
  0 siblings, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2012-10-25 11:19 UTC (permalink / raw)
  To: cocci

On Wed, 24 Oct 2012, ron minnich wrote:

> Are there ways to patch sequences such as
> #if x
> #endif
>
> to some other sequence? My tries have failed, I'm hoping I'm missing something.

No, it is not possible.  It is not possible to match on cpp code, only t
generate it.

julia

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] semantic patches for C preprocessing constructs?
  2012-10-25 11:19 ` Julia Lawall
@ 2012-10-26 10:55   ` SF Markus Elfring
  2012-10-26 13:47     ` Julia Lawall
  0 siblings, 1 reply; 9+ messages in thread
From: SF Markus Elfring @ 2012-10-26 10:55 UTC (permalink / raw)
  To: cocci

> It is not possible to match on cpp code, only t generate it.

This feature is one of the items that are in the wish list already.
Are you looking for more software developers to implement it?

Regards,
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] semantic patches for C preprocessing constructs?
  2012-10-26 10:55   ` [Cocci] semantic patches for C preprocessing constructs? SF Markus Elfring
@ 2012-10-26 13:47     ` Julia Lawall
  2012-10-28  9:14       ` SF Markus Elfring
  0 siblings, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2012-10-26 13:47 UTC (permalink / raw)
  To: cocci

On Fri, 26 Oct 2012, SF Markus Elfring wrote:

> > It is not possible to match on cpp code, only t generate it.
>
> This feature is one of the items that are in the wish list already.
> Are you looking for more software developers to implement it?

Not especially.  If someoen wants to, I guess that would be useful, but it
would require quite substantial changes, and thus a good understanding of
both ocaml and the existing code.

julia

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] semantic patches for C preprocessing constructs?
  2012-10-26 13:47     ` Julia Lawall
@ 2012-10-28  9:14       ` SF Markus Elfring
  2012-10-28 12:14         ` Julia Lawall
  0 siblings, 1 reply; 9+ messages in thread
From: SF Markus Elfring @ 2012-10-28  9:14 UTC (permalink / raw)
  To: cocci

> If someoen wants to, I guess that would be useful, but it would require
> quite substantial changes, and thus a good understanding of both
> ocaml and the existing code.

Are there any chances to reduce the dependency on the syntax of a specific
programming language like "OCaml"?

How do you think about to talk a bit more about general data structures,
modules, classes and corresponding interfaces?

Regards,
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] semantic patches for C preprocessing constructs?
  2012-10-28  9:14       ` SF Markus Elfring
@ 2012-10-28 12:14         ` Julia Lawall
  2012-10-28 16:02           ` SF Markus Elfring
  0 siblings, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2012-10-28 12:14 UTC (permalink / raw)
  To: cocci

On Sun, 28 Oct 2012, SF Markus Elfring wrote:

> > If someoen wants to, I guess that would be useful, but it would require
> > quite substantial changes, and thus a good understanding of both
> > ocaml and the existing code.
>
> Are there any chances to reduce the dependency on the syntax of a specific
> programming language like "OCaml"?

Huh?  Coccinelle is written in Ocaml.  Matching C preprocessing code
requires pervasive changes to its implementation.  Thus it requires
knowing the language in which the code is implemented.

> How do you think about to talk a bit more about general data structures,
> modules, classes and corresponding interfaces?

I think it is completely irrelevant to the project.

julia

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] semantic patches for C preprocessing constructs?
  2012-10-28 12:14         ` Julia Lawall
@ 2012-10-28 16:02           ` SF Markus Elfring
  2012-10-29  8:28             ` Nicolas Palix
  0 siblings, 1 reply; 9+ messages in thread
From: SF Markus Elfring @ 2012-10-28 16:02 UTC (permalink / raw)
  To: cocci

> Huh?  Coccinelle is written in Ocaml.  Matching C preprocessing code
> requires pervasive changes to its implementation.  Thus it requires
> knowing the language in which the code is implemented.

I suggest to raise the abstraction level a bit. I see chances to get some
contributions then from developers who are still more familiar with other
programming languages. How do you think about model-driven development?
Can this software design approach improve idea exchange?
http://en.wikipedia.org/wiki/Model-driven_engineering

Regards,
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] semantic patches for C preprocessing constructs?
  2012-10-28 16:02           ` SF Markus Elfring
@ 2012-10-29  8:28             ` Nicolas Palix
  2012-10-29 11:50               ` [Cocci] Application of model-driven engineering? SF Markus Elfring
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Palix @ 2012-10-29  8:28 UTC (permalink / raw)
  To: cocci

Hi,

On Sun, Oct 28, 2012 at 5:02 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
>> Huh?  Coccinelle is written in Ocaml.  Matching C preprocessing code
>> requires pervasive changes to its implementation.  Thus it requires
>> knowing the language in which the code is implemented.
>
> I suggest to raise the abstraction level a bit. I see chances to get some
> contributions then from developers who are still more familiar with other
> programming languages. How do you think about model-driven development?
> Can this software design approach improve idea exchange?
> http://en.wikipedia.org/wiki/Model-driven_engineering

Coccinelle should not become a rosseta stone. There is a language OCaml.
You can script in either Python or OCaml.
If you need to improve Coccinelle, learn OCaml.
If you want to script in *YourFavoriteLanguage*, learn OCaml and add
an extension of it.

Model-driven development will not help you to deal with the legacy
which is in OCaml.

One of the ways to make Coccinelle "language-independant" would be to
add an network API.
Feel free to add it and use it in *YourFavoriteLanguage*. But this
extension must be in OCaml too.

Regards,

>
> Regards,
> Markus
>
> _______________________________________________
> Cocci mailing list
> Cocci at systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci



-- 
Nicolas Palix

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Cocci] Application of model-driven engineering?
  2012-10-29  8:28             ` Nicolas Palix
@ 2012-10-29 11:50               ` SF Markus Elfring
  0 siblings, 0 replies; 9+ messages in thread
From: SF Markus Elfring @ 2012-10-29 11:50 UTC (permalink / raw)
  To: cocci


> If you need to improve Coccinelle, learn OCaml.

I suggest to consider additional design techniques for further software 
development. I imagine that tools which support model-driven engineering 
help in the documentation and exchange for useful ideas.
Will the probability for valuable contributions increase if knowledge 
requirements can be adjusted for recommended programming languages?
Do you see also chances in transformations between platform-independent 
and platform-specific models?

Regards,
Markus

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-10-29 11:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-24 22:03 [Cocci] spatches for cpp? ron minnich
2012-10-25 11:19 ` Julia Lawall
2012-10-26 10:55   ` [Cocci] semantic patches for C preprocessing constructs? SF Markus Elfring
2012-10-26 13:47     ` Julia Lawall
2012-10-28  9:14       ` SF Markus Elfring
2012-10-28 12:14         ` Julia Lawall
2012-10-28 16:02           ` SF Markus Elfring
2012-10-29  8:28             ` Nicolas Palix
2012-10-29 11:50               ` [Cocci] Application of model-driven engineering? SF Markus Elfring

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.