Re: [Cocci] coccinelle depends on unmaintained pygtk
Hi! On 04/02/2020 11:59, Julia Lawall wrote: > On Tue, 4 Feb 2020, eamanu wrote: > >> Hi everybody, >> >> Sorry if this issues is duplicated, I am new in the mailing list >> and in a very quickly searching I didn't found about this issue. >> >> I am working on Coccinelle package on Debian > Thanks! > >> and currently >> exist the next bug [1]. >> >> There is any plan to port to use GObject Instrospection? >> >> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885267 > I think we should just drop the code that depends on it. It was added for > a MS thesis more than 10 years ago, and I don't think anyone has used it > since. > > I will look into it. Great, if you need help, I can help :-) I will wait for any news. Thanks eamanu > > julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] coccinelle depends on unmaintained pygtk
On Tue, 4 Feb 2020, eamanu wrote: > Hi everybody, > > Sorry if this issues is duplicated, I am new in the mailing list > and in a very quickly searching I didn't found about this issue. > > I am working on Coccinelle package on Debian Thanks! > and currently > exist the next bug [1]. > > There is any plan to port to use GObject Instrospection? > > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885267 I think we should just drop the code that depends on it. It was added for a MS thesis more than 10 years ago, and I don't think anyone has used it since. I will look into it. julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
[Cocci] coccinelle depends on unmaintained pygtk
Hi everybody, Sorry if this issues is duplicated, I am new in the mailing list and in a very quickly searching I didn't found about this issue. I am working on Coccinelle package on Debian and currently exist the next bug [1]. There is any plan to port to use GObject Instrospection? [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885267 Thanks! Cheers, eamanu ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Usage concerns around the SmPL construct “<+... … ...+>”
> Coccinelle could provide an appropriate running time by just ignoring the > <+... ...+>. But that seems like a pointless optimization, when the user > could just not put the <+... ...+> in the first place. I would like to express a specific SmPL functionality. > Coccinelle already applies a rule everywhere that it occurs, This aspect is clear to some degree. > regardless of whether the two occurrences are in the same function. Our views can be different also for the discussed use case. * How much will the requirement for changing selected items multiple times matter? * Are we eventually looking for another clarification also in the software documentation? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
> Perhaps, but it will unnecessarily raise the running time of your semantic > patch. We come along different expectations again for the possible application of the construct “<+... … ...+>” for the semantic patch language. Should the concrete run time characteristics be clarified any more for current update candidates in known source files? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
On Tue, 4 Feb 2020, Markus Elfring wrote: > >> @replacement@ > >> constant c; > >> identifier text; > >> statement is, es; > >> @@ > >> <+... > > > > What is thhe point of the outer <+... ...+>? > > I would like to stress the possibility that source code adjustments > can be performed multiple times. > https://github.com/coccinelle/coccinelle/blob/a549b9f0a20e14fe9c36f45990b40dc5708ef8f2/docs/manual/cocci_syntax.tex#L696 Perhaps, but it will unnecessarily raise the running time of your semantic patch. julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
>> @replacement@ >> constant c; >> identifier text; >> statement is, es; >> @@ >> <+... > > What is thhe point of the outer <+... ...+>? I would like to stress the possibility that source code adjustments can be performed multiple times. https://github.com/coccinelle/coccinelle/blob/a549b9f0a20e14fe9c36f45990b40dc5708ef8f2/docs/manual/cocci_syntax.tex#L696 Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
On Tue, 4 Feb 2020, Markus Elfring wrote: > > The strcmp output has to be compared to zero strcmp(src_name, > > "equalizer_input_level") == 0. > > Would you like to let the following script for the semantic patch language > perform any changes in your source files automatically? > > @replacement@ > constant c; > identifier text; > statement is, es; > @@ > <+... What is thhe point of the outer <+... ...+>? julia > if ( > +!std::strcmp( > text > +, > -== std::string( > c > ) > ) > is > else > es > ...+> > > > Regards, > Markus > ___ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
> The strcmp output has to be compared to zero strcmp(src_name, > "equalizer_input_level") == 0. Would you like to let the following script for the semantic patch language perform any changes in your source files automatically? @replacement@ constant c; identifier text; statement is, es; @@ <+... if ( +!std::strcmp( text +, -== std::string( c ) ) is else es ...+> Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Searching for usage of “auto” with SmPL?
>> meta: parse error: >> File "show_variable_definition_with_auto3.cocci", line 4, column 8, >> charpos = 46 >> around = 'auto', >> whole content = typedef auto; > > I understood already that it was not meant as a type. I tried your suggestion out if the idea can work finally. May such a key word be occasionally redefined (by the means of the semantic patch language)? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Searching for usage of “auto” with SmPL?
On Tue, 4 Feb 2020, Markus Elfring wrote: > >> > >> https://github.com/wwmm/pulseeffects/blob/acb5161a6ab8d3b0c395ed2809d3318ccf4931bc/src/source_output_effects.cpp#L6 > > > > I guess it would be fine if you put > > > > typedef auto; > > > > among the metavariables? > > I would like to show another software test result. > > @display@ > expression E; > identifier I; > typedef auto; > @@ > *auto I = E(...); > > > elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci > show_variable_definition_with_auto3.cocci > init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h > meta: parse error: > File "show_variable_definition_with_auto3.cocci", line 4, column 8, charpos > = 46 > around = 'auto', > whole content = typedef auto; I understood already that it was not meant as a type. julia ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Searching for usage of “auto” with SmPL?
>> >> https://github.com/wwmm/pulseeffects/blob/acb5161a6ab8d3b0c395ed2809d3318ccf4931bc/src/source_output_effects.cpp#L6 > > I guess it would be fine if you put > > typedef auto; > > among the metavariables? I would like to show another software test result. @display@ expression E; identifier I; typedef auto; @@ *auto I = E(...); elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci show_variable_definition_with_auto3.cocci init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h meta: parse error: File "show_variable_definition_with_auto3.cocci", line 4, column 8, charpos = 46 around = 'auto', whole content = typedef auto; Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing usages of “auto” with SmPL?
> You're not actually showing a need. I disagree. - Our needs are just different. > Ie you don't have a real piece of software in which this transformation is > actually needed. Under which circumstances will the clarification of related components become more attractive? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing usages of “auto” with SmPL?
On Tue, 4 Feb 2020, Markus Elfring wrote: > >> @replacement@ > >> @@ > >> -auto > >> +my_type > > > > There is nothing to support this. > > Thanks for such feedback. > > > > So far I don't have the impression that anyone has had a need for it either. > > How often will I be the first one who shows a need for further software > extensions? You're not actually showing a need. Ie you don't have a real piece of software in which this transformation is actually needed. julia > > > Would anybody like to help any more for corresponding development challenges? > > Regards, > Markus > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing usages of “auto” with SmPL?
>> @replacement@ >> @@ >> -auto >> +my_type > > There is nothing to support this. Thanks for such feedback. > So far I don't have the impression that anyone has had a need for it either. How often will I be the first one who shows a need for further software extensions? Would anybody like to help any more for corresponding development challenges? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing usages of “auto” with SmPL?
On Tue, 4 Feb 2020, Markus Elfring wrote: > > I think it expects a type as well. I don't know if that is a reasonable > > assumption in C or in C++. > > Can a source code transformation approach like the following make sense? > > @replacement@ > @@ > -auto > +my_type There is nothing to support this. So far I don't have the impression that anyone has had a need for it either. julia > > > elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci > replace_auto1.cocci > init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h > minus: parse error: > File "replace_auto1.cocci", line 5, column 0, charpos = 32 > around = '', > whole content = > > > Will the software support for adjustments around the explicit specification of > automatic storage duration become better anyhow? > https://en.cppreference.com/w/c/language/storage_duration > > Regards, > Markus > ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing usages of “auto” with SmPL?
> I think it expects a type as well. I don't know if that is a reasonable > assumption in C or in C++. Can a source code transformation approach like the following make sense? @replacement@ @@ -auto +my_type elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci replace_auto1.cocci init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h minus: parse error: File "replace_auto1.cocci", line 5, column 0, charpos = 32 around = '', whole content = Will the software support for adjustments around the explicit specification of automatic storage duration become better anyhow? https://en.cppreference.com/w/c/language/storage_duration Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
>> @display@ >> expression X; >> identifier I; >> @@ >> *auto I = X(...); … > I think it expects a type as well. I don't know if that is a reasonable > assumption in C or in C++. How do you think about to interpret such a variable definition in the way that the omission of an other data type specification would result into the usage of “int”? Under which circumstances will the handling of “placeholder type specifiers” become relevant finally? https://en.cppreference.com/w/cpp/language/auto Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
> If you are showing a patch, then the first column is empty, > except for the - and + characters. You are right. I am sorry for my misinterpretation of the “indentation” at this place. Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
On Tue, 4 Feb 2020, Markus Elfring wrote: > >> Do you distinguish between the storage class specifier > >> and other uses of such a key word? > >> https://en.cppreference.com/w/cpp/language/auto > > > > Sorry. I know nothing about C++. > > I guess that you know something also for this programming language > according to the program option “--c++”. > https://github.com/coccinelle/coccinelle/blob/0cece3639048dc7e81c4b2cc8f2a6f7a57fd546b/docs/spatch.1.in#L434 > https://github.com/coccinelle/coccinelle/issues/1 > > > > Auto seems to be supported > > I am looking for further evolution around this software area. > > > > - I see it in both the C parser and the SmPL parser. > > How would we like to handle corresponding development challenges? > > @display@ > expression X; > identifier I; > @@ > *auto I = X(...); > > > elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci > show_variable_definition_with_auto1.cocci > init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h > minus: parse error: > File "show_variable_definition_with_auto1.cocci", line 5, column 6, charpos > = 47 > around = 'I', > whole content = *auto I = X(...); > > > Can such a source code search approach make sense also according to > the rules of the C programming language? I think it expects a type as well. I don't know if that is a reasonable assumption in C or in C++. julia___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci
Re: [Cocci] Replacing a std::string check by strcmp() with SmPL
>> Do you distinguish between the storage class specifier >> and other uses of such a key word? >> https://en.cppreference.com/w/cpp/language/auto > > Sorry. I know nothing about C++. I guess that you know something also for this programming language according to the program option “--c++”. https://github.com/coccinelle/coccinelle/blob/0cece3639048dc7e81c4b2cc8f2a6f7a57fd546b/docs/spatch.1.in#L434 https://github.com/coccinelle/coccinelle/issues/1 > Auto seems to be supported I am looking for further evolution around this software area. > - I see it in both the C parser and the SmPL parser. How would we like to handle corresponding development challenges? @display@ expression X; identifier I; @@ *auto I = X(...); elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci show_variable_definition_with_auto1.cocci init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h minus: parse error: File "show_variable_definition_with_auto1.cocci", line 5, column 6, charpos = 47 around = 'I', whole content = *auto I = X(...); Can such a source code search approach make sense also according to the rules of the C programming language? Regards, Markus ___ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci