Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-12 Thread Markus Elfring
>> Can the matched source code from the construct “<+... e ...+>” be assigned >> to a metavariable like “check”? > > ( > <+... e ...+> > & > check > ) Did I just stumble on incomplete knowledge for the safe application of the conjunction functionality with the semantic patch language? It

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-12 Thread Julia Lawall
On Sun, 12 Apr 2020, Markus Elfring wrote: > @display2@ > expression check; > position display1.p; > statement display1.is, display1.es; > >>> > >>> The problem is that you inherit es. Since you inherit it, Coccinelle > >>> considers that its presence is important, and so

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-12 Thread Markus Elfring
@display2@ expression check; position display1.p; statement display1.is, display1.es; >>> >>> The problem is that you inherit es. Since you inherit it, Coccinelle >>> considers that its presence is important, and so the isomorphism will not >>> eliminate it. >> >> Thanks for

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-12 Thread Markus Elfring
>> @display1@ >> expression action, e; >> position p; >> statement is, es; >> @@ >> *e = action(...); >> if@p (<+... e ...+>) >> is >> else >> es >> >> @display2@ >> expression check; >> position display1.p; >> statement display1.is, display1.es; > > The problem is that you inherit es.

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-12 Thread Julia Lawall
On Sun, 12 Apr 2020, Markus Elfring wrote: > >> I hope that another clarification can be achieved also for the software > >> behaviour of the following source code analysis approach. > > > > I don't run code that involves databases. If you believe that there is a > > problem with the semantic

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-12 Thread Markus Elfring
>> I hope that another clarification can be achieved also for the software >> behaviour of the following source code analysis approach. > > I don't run code that involves databases. If you believe that there is a > problem with the semantic patch, you have to make a small version that >

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-11 Thread Markus Elfring
>> I hope that another clarification can be achieved also for the software >> behaviour of the following source code analysis approach. > > I don't run code that involves databases. I find the handling of higher level data storage relevant and useful also for such a software test. > If you

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-11 Thread Markus Elfring
> If you want something done, please do it yourself. I hope that another clarification can be achieved also for the software behaviour of the following source code analysis approach. @initialize:python@ @@ import sqlalchemy, sys sys.stderr.write("\n".join(["Using SQLAlchemy version:",

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-11 Thread Markus Elfring
>> Would you like to display statistics around the distribution of condition >> checks after function calls (with help of the semantic patch language)? > > I'm working on other things. Thanks for your feedback. > If you want something done, please do it yourself. I assumed that you (or other

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-11 Thread Julia Lawall
On Sat, 11 Apr 2020, Markus Elfring wrote: > > Maybe you can just take inspiration from this paper: > > > > https://pages.lip6.fr/Julia.Lawall/dsn09.pdf > > I got another idea which can be related to information from the section > “Case Study: Inconsistent Error Checks” in your document

Re: [Cocci] Reporting variations of condition checks according to function calls

2020-04-11 Thread Markus Elfring
> Maybe you can just take inspiration from this paper: > > https://pages.lip6.fr/Julia.Lawall/dsn09.pdf I got another idea which can be related to information from the section “Case Study: Inconsistent Error Checks” in your document “WYSIWIB: A Declarative Approach to Finding API Protocols and