Re: [Cocci] Coccinelle: add atomic_as_refcounter script

2017-08-17 Thread SF Markus Elfring
>> Why do you insist to use the variables “fname2” till “fname6” in
>> this evolving SmPL script (instead of merging them into a single one
>> with a special constraint)?
> 
> I am pretty new to Coccinelle

This is fine. I am curious then how your interests will evolve further
in this software area.


> and Julia has recommended against this approach,

She showed a special response.

If you search in the mailing list archive, you will find some details
where she had different opinions than me for some technical aspects
during usual discussions.


> so I was merely following her advice.

Not completely. - You expressed a need to use regular expressions for
constraints in the SmPL rule “r1” already.
I suggest to take another look at available design choices.
Under which circumstances will it be helpful to switch between
involved programming languages?


> I really do not understand the implications of the change as well 
> as she does.

My software understanding is also still evolving in this area.

* Some clarification approaches did not reach the point so that
  missing information could be resolved in a desired way.

* Some knowledge did not find their way from research papers and
  corresponding OCaml source code into other documentation formats
  for a better understanding of system dependencies so far.


> Your approach would certainly look prettier script-wise,

Thanks for such a feedback.


> but I don't want to cause any undesirable side-effects.

You would like to implement a special search (and transformation) pattern.

* Are you keen to find the “effects” out which are really desirable for you?

* Would you try any precise system tests out for the determination of
  preferred run time behaviour?


>> How do you think about to omit the cover letter for the addition
>> of such a script (when the change log can be integrated into
>> the same message for your update suggestion)?
> 
> Sorry, not sure I understood this. Could you please explain more?

You replied with the message “[PATCH] Coccinelle: add atomic_as_refcounter
script” (from “Aug 16 13:52:22 CEST 2017”) to your own message
“[PATCH v3] provide rule for finding refcounters” (from “Aug 16
13:52:21 CEST 2017”), didn't you?
https://systeme.lip6.fr/pipermail/cocci/2017-August/004333.html
https://systeme.lip6.fr/pipermail/cocci/2017-August/004334.html

Will it be sufficient to send only SmPL script variants for
further clarification to achieve the desired consensus?


How do you think about to reconsider another implementation detail?
Example:
Why do you see a need to enclose the identifier “a” by parentheses?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Coccinelle: add atomic_as_refcounter script

2017-08-17 Thread Reshetova, Elena

> Dear Elena,

Hi Markus!

> 
> Why do you insist to use the variables “fname2” till “fname6” in
> this evolving SmPL script (instead of merging them into a single one
> with a special constraint)?

I am pretty new to Coccinelle and Julia has recommended against this approach, 
so I was merely following her advice. 
I really do not understand the implications of the change as well as she does. 
Your approach would certainly look prettier script-wise, but I don't want to 
cause any undesirable side-effects. 

> 
> How do you think about to omit the cover letter for the addition
> of such a script (when the change log can be integrated into
> the same message for your update suggestion)?

Sorry, not sure I understood this. Could you please explain more? 
> 
> Regards,
> Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Coccinelle: add atomic_as_refcounter script

2017-08-16 Thread SF Markus Elfring
Dear Elena,

Why do you insist to use the variables “fname2” till “fname6” in
this evolving SmPL script (instead of merging them into a single one
with a special constraint)?

How do you think about to omit the cover letter for the addition
of such a script (when the change log can be integrated into
the same message for your update suggestion)?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Coccinelle: add atomic_as_refcounter script

2017-08-15 Thread SF Markus Elfring
> Elena, please don't follow Markus's suggestion.

I suggest to consider additional software development possibilities.

We have got recurring different opinions around the application of advanced
regular expressions.


> Coccinelle doesn't interpret regular expressions when selecting code to work 
> on,

This software behaviour can be fine.


> and thus the resulting rule will be less efficient.

I do not come to the same conclusion for some use cases.


> Markus, if you see this somehow,

Yes. - But I can read your response only by the web interface for your mailing
list archive at the moment.
https://systeme.lip6.fr/pipermail/cocci/2017-August/004308.html


> at least yesterday all mail sent to you was bouncing.

Thanks for this information. - I was not informed about such message exchange
problems so far.
I hope that communication difficulties will be fixed somehow.

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Coccinelle: add atomic_as_refcounter script

2017-08-15 Thread Julia Lawall


On Tue, 15 Aug 2017, SF Markus Elfring wrote:

> Dear Elena,
>
> Would you like to take another look at my development suggestion for your 
> approach?
> https://systeme.lip6.fr/pipermail/cocci/2017-August/004300.html
>
> How do you think about to refactor another rule like the following?
>
> @r3 exists@
> expression E;
> identifier I=~"^atomic(?:64|_long)?_add_return$";
> position P;
> @@
>  E = I@P(-1, ...);
>
>
> Can the specification of SmPL constraints be occasionally be more succinct
> with the use of regular expressions?

Elena, please don't follow Markus's suggestion.  Coccinelle doesn't
interpret regular expressions when selecting code to work on, and thus the
resulting rule will be less efficient.

Markus, if you see this somehow, at least yesterday all mail sent to you
was bouncing.

julia
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] Coccinelle: add atomic_as_refcounter script

2017-08-15 Thread SF Markus Elfring
Dear Elena,

Would you like to take another look at my development suggestion for your 
approach?
https://systeme.lip6.fr/pipermail/cocci/2017-August/004300.html

How do you think about to refactor another rule like the following?

@r3 exists@
expression E;
identifier I=~"^atomic(?:64|_long)?_add_return$";
position P;
@@
 E = I@P(-1, ...);


Can the specification of SmPL constraints be occasionally be more succinct
with the use of regular expressions?

Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci