>> Will data structures become helpful where less than three attributes
>> would be provided because a special source code element would be selected?
>
> Stop the pointless micro optimization. This has no impact on anything.
We got different programming views which influence another approach
to
> You can attach a comment metavariable to any token in the semantic patch.
> some of these are metavariables. Metavariables (except identifier
> metavariables) often match more than one token in the C code.
Can this case distinction trigger corresponding software design adjustments?
How often
> You can attach a comment metavariable to any token in the semantic patch.
> some of these are metavariables. Metavariables (except identifier
> metavariables) often match more than one token in the C code.
Can this case distinction trigger corresponding software design adjustments?
How often
>> How many different pointers will refer to empty strings here?
>
> None. If there is no comment, it will be the empty list.
How many different pointers can occur for these empty items?
> The before, within and after comments are lists of strings.
Will data structures become helpful where
> Parameter lists are irrelevant. That is just an example.
We have got a different understanding for the desired comment handling
there at the moment.
> As long as the SmPL token matches more than one token,
Would we like to distinguish and clarify this case any further?
> it is possible
Hello,
The OCaml programming language supports also the evaluation of
regular expressions.
* Can the corresponding match (or search failure) be stored in a variable
so that it can be directly used for a dependency specification in
a subsequent SmPL rule?
* Is SmPL variable inheritance
> There is one in an argument list that is within a statement.
Can it be that such a comment would belong to the function call operator
(open or closing parenthesis) instead of the identifier “foo”?
Regards,
Markus
___
Cocci mailing list
>> How does your software decide which comment should be treated
>> as simple text before or after an item?
>
> It takes all of the comments before (up to the preceding non comment
> token if any) within and after (up to the following non comment token
> if any).
I find that this information can
>> “…
>> let (c1b,c1m,c1a) = List.hd c1 in
>> …”
>>
>>
>> Can this programming approach result in undesirable data duplication?
>
> There is no data duplication.
The involved data structures are unclear at the moment.
> Learn about pointers.
How many different pointers will refer to empty
> There is one in an argument list that is within a statement.
This would only matter for the second call of the function “foo”
in the example function “main”, wouldn't it?
https://github.com/coccinelle/coccinelle/blob/210ce894d2dd1572fff9e1c98ae443e6df14f4c7/demos/comments.c#L2
How does your
>> * Now I wonder why this display is presented in three variations.
>
> Before within and after
I find this software behaviour hard to understand at the moment
when the shown metavariables were split into three parts already
by the call of the OCaml function “List.hd”.
Which comment would be
> You get a list of strings, with one comment per string.
It seems that this metavariable provides structured information
which can be split according to your OCaml code in the SmPL script.
“…
let (c1b,c1m,c1a) = List.hd c1 in
…”
Can this programming approach result in undesirable data
>> ocamlc.opt -c /tmp/ocaml_cocci_bbc38d.cmo -g -I
>> /home/elfring/Projekte/Coccinelle/20160205/ocaml -I /usr/lib64/ocaml
>> /tmp/ocaml_cocci_bbc38d.ml
How can it be achieved to replace the shown reference to a directory
of the (standard) library for the system OCaml compiler?
> @ replace_simple_positive @
How do you think about to move this rule to a separate SmPL script?
Do any other subsequent rules depend on it?
Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
ocamlc.opt -c /tmp/ocaml_cocci_bbc38d.cmo -g -I
/home/elfring/Projekte/Coccinelle/20160205/ocaml -I /usr/lib64/ocaml
/tmp/ocaml_cocci_bbc38d.ml
>>
>> Do you know where the include parameters are determined for such a call
>> of the OCaml compiler in your source code?
>
> I had no
ocamlc.opt -c /tmp/ocaml_cocci_bbc38d.cmo -g -I
/home/elfring/Projekte/Coccinelle/20160205/ocaml -I /usr/lib64/ocaml
/tmp/ocaml_cocci_bbc38d.ml
>>
>> Do you know where the include parameters are determined for such a call
>> of the OCaml compiler in your source code?
>
> I had no
>> ocamlc.opt -c /tmp/ocaml_cocci_bbc38d.cmo -g -I
>> /home/elfring/Projekte/Coccinelle/20160205/ocaml -I /usr/lib64/ocaml
>> /tmp/ocaml_cocci_bbc38d.ml
Do you know where the include parameters are determined for such a call
of the OCaml compiler in your source code?
Regards,
Markus
>> Why is the program “ocamlc.opt” looking for the file
>> “/usr/lib64/ocaml/list.cmi”
>> instead of using the selected variant
>> “~/.opam/4.07.1/lib/ocaml/stdlib__list.cmi”?
>
> OK, I don't know. Either Thierry knows or there is some problem with the
> setup of your system.
Which test
>> How will the following software situation be resolved?
>
> make distclean
> ./autogen
> ./configure
> make
These commands were executed also on my system yesterday.
> There is no dependency on any particular system compiler version.
Why is the program “ocamlc.opt” looking for the file
> You can do whatever you want in the ocaml code.
How will the following software situation be resolved?
elfring@Sonne:~/Projekte/Coccinelle/20160205> COCCINELLE_HOME=$(pwd)
/usr/local/bin/opam config exec --switch 4.07.1 ./spatch demos/comments.cocci
demos/comments.c
init_defs_builtins:
> You can do whatever you want in the ocaml code.
This programming language has got also a general potential.
But I find that there are special development challenges to consider
for software components which do not belong to its standard library.
How do you think about to take another look at an
>> @display@
>> comments C;
>> @@
>> *C
>
> This is not possible.
At the moment.
> Comments metavariables can only be attached to other tokens.
I find that his wording can be ambiguous.
How do you think about views around literate programming
where executable code is between these comments?
>> How do you think about to filter any text by regular expressions
>> for semantic patch language constraints?
>
> Not supported.
Would the text filter be possible by using (OCaml) script rules so far?
How will these limitations be represented in the software documentation?
>> Would you like
> It is now possible to match the comments before, within, and after the
> match of a token, via a comments metavariable.
Are there any structures supported within source code comments?
How do you think about to filter any text by regular expressions
for semantic patch language constraints?
>> Can the splitting and recombination of such rules become more convenient
>> with extensions for the Coccinelle software?
>
> In general it can't.
This feedback seems to fit to the current software situation.
> Coccinelle doesn't have the goal of minimizing the number of characters
> in te
Message repetition from 2019-05-16 because of a temporary technical difficulty
with the mailing list services:
=
Hello,
The semantic patch language can handle several rules which can contain
remarkable amounts of source code search specifications.
It can happen then that a few of these SmPL
> On the other hand, I don't know if the one that seemed to cause a crash
> really caused a crash. It was detected by syzkaller, and it is also
> possible that git bisect ended up at the wrong place.
Do you refer to any known bug report here?
> In any case, forgetting an of_node_put will
> $ spatch --tokens-c drivers/of/base.c 2>&1 | grep "Tag3 " | grep
> "of_node_put() on it when done." | awk -F " - " '{print $1}' | grep -o
> "of_[[:print:]]*"
This command example points some details out for further software development
considerations.
1. I find it questionable that
> A semantic patch has no access to comments.
Thanks for your acknowledgement of the current situation.
> The only thing I can see to do is to use python to interact with some
> external tools.
I see more software development possibilities.
* Advanced data processing for source code comments
> 1, A simple method.
> We did some experiments, and we could get the list of functions that need to
> be considered directly through this script:
>
> $ spatch --tokens-c drivers/of/base.c 2>&1 | grep "Tag3 " | grep
> "of_node_put() on it when done." | awk -F " - " '{print $1}' | grep -o
>
> Could we use it to find out as many bugs as possible in the current kernel
How do you think about to work with any more source code analysis approaches?
> and then modify it?
I guess that you do not need to wait for a solution so long.
Variables which get reassigned in unwanted ways (before
>> Thanks for such additional information. Is it represented in the software
>> documentation (besides the source code format)?
>
> It is not a concern of the user.
I got interested in corresponding aspects.
> The documentation is not going to contain a description of every line
> in the
>>> On the other hand, I do care about causing false negatives.
>>
>> Do you find the missing warning after the addition of such an exclusion
>> specification interesting?
>
> I already suggested how to improve the code.
I find that the idea “e2->fld” needs further clarification.
Such a SmPL
>> 1, "id = (T2)(e)" is rare.
>
> Thanks for checking. I don't really care if it is rare.
I got related source code analysis concerns.
> There should not be much cost to this.
Each additional filter will influence the software run times and
possible results.
> On the other hand, I do care
> I don't think it is an environmental issue.
You are right about taking other parameters better into account.
> Theoretically, the original SmPL should find bugs.
I expect also that both script versions should display a warning.
> Although, I still send you my environmental information:
>> But with your modified SmPL, we can't find the bug.
>
> I do not see a difference here.
I have accidentally overlooked to pass the parameter “-D report”
to the spatch program.
Now I notice also an unexpected and undesirable difference for your test example
after the suggested addition of
>> Can different run time characteristics become relevant here?
>
> Internally, they should be identical.
I got other imaginations in this area.
I assume that the evaluation of a separate SmPL disjunction
for the shown return values is occasionally nicer than
the repeated matching for the
> 1, "id = (T2)(e)" is rare.
I can follow this view for such a filter.
> It may be a minor detail that will have no impact in practice.
I suggest to reconsider this view once more.
Should such exclusion specifications take also “unexpected” source code
into account so that analysis results
> 1, "id = (T2)(e)" is rare.
I can follow this view for such a filter.
> It may be a minor detail that will have no impact in practice.
I suggest to reconsider this view once more.
Should such exclusion specifications take also “unexpected” source code
into account so that analysis results
>> A return statement was specified with a known value for three branches
>> of a SmPL disjunction.
>> Reduce duplicate SmPL code there by using another disjunction for
>> these return values.
…
> NACK. The goak is not to squeeze the most information into the fewest
> number of characters.
Can
> NACK. If the code is going to change, I would rather it come closer to
> staying within 80 characters.
Do you really prefer then to deviate from the Linux coding style
at such source code places?
Would you like to split affected string literals over multiple lines?
Regards,
Markus
From: Markus Elfring
Date: Tue, 14 May 2019 18:12:15 +0200
A SmPL ellipsis was specified for a search approach so that additional
source code would be tolerated between an assignment to a local variable
and the corresponding null pointer check.
But such code should be restricted.
* The local
From: Markus Elfring
Date: Tue, 14 May 2019 17:18:24 +0200
A return statement was specified with a known value for three branches
of a SmPL disjunction.
Reduce duplicate SmPL code there by using another disjunction for
these return values.
Signed-off-by: Markus Elfring
---
scripts/coccinelle
From: Markus Elfring
Date: Tue, 14 May 2019 17:18:24 +0200
A return statement was specified with a known value for three branches
of a SmPL disjunction.
Reduce duplicate SmPL code there by using another disjunction for
these return values.
Signed-off-by: Markus Elfring
---
scripts/coccinelle
From: Markus Elfring
Date: Tue, 14 May 2019 16:54:40 +0200
Formatted strings were always assigned to the Python variable “msg”
before they were used in two rules of a script for the semantic
patch language.
Delete these extra variables so that the specified string objects
are directly used
> I did another experiment at that time and found that this modification will
> reduce the false positive rate,
Thanks for such feedback.
Will my update suggestion influence the current (or future) software situation?
> but it may also reduce the recall rate.
Would you like to explain this
>> Can you agree to any information which I presented in the commit message?
Do you find this description inappropriate?
>>> You don't need so many type metavariables.
>>
>> It seems that the Coccinelle software can cope also with my SmPL code
>> addition.
>> You might feel uncomfortable with
>> Can you agree to any information which I presented in the commit message?
Do you find this description inappropriate?
>>> You don't need so many type metavariables.
>>
>> It seems that the Coccinelle software can cope also with my SmPL code
>> addition.
>> You might feel uncomfortable with
>> A SmPL ellipsis was specified for a search approach so that additional
>> source code would be tolerated between an assignment to a local variable
>> and the corresponding null pointer check.
>>
>> But such code should be restricted.
>> * The local variable must not be reassigned there.
>> * It
>> I try to stress SmPL functionality in this use case.
>
> That's not the goal of the semantic patches in the kernel.
>
> The rule is fine as it is.
I am curious under which circumstances other software aspects
can become more relevant (as suggested).
Regards,
Markus
>> Combine the exclusion specifications into a disjunction for the semantic
>> patch language so that this argument is referenced only once there.
…
> NACK. This hurts readability
I suggest to reconsider such readability concerns once more.
Can corresponding software limitations be adjusted any
>> Take additional casts for these code exclusion specifications into account
>> together with optional parentheses.
>
> NACK.
I find this rejection surprising.
> You don't need so many type metavariables.
I got an other software development opinion for this aspect.
Yesterday we started to
>> An assignment target was repeated in four SmPL when constraints.
>> Combine the exclusion specifications into disjunctions for the semantic
>> patch language so that this target is referenced only once there.
>
> NACK.
I find this rejection questionable.
> This exceeds 80 characters
The
>> Thus simplify a message construction in a SmPL rule by concatenating text
>> with two plus operators less.
>
> Is there any way to unindent, so that the string doesn't exceed 80 characters,
> or at least no so much?
How does your concern fit to the string literal tolerance from
the Linux
From: Markus Elfring
Date: Mon, 13 May 2019 09:47:17 +0200
A SmPL ellipsis was specified for a search approach so that additional
source code would be tolerated between an assignment to a local variable
and the corresponding null pointer check.
But such code should be restricted.
* The local
From: Markus Elfring
Date: Mon, 13 May 2019 09:55:22 +0200
A single parameter was repeated for a function call in two SmPL
when constraints.
Combine the exclusion specifications into a disjunction for the semantic
patch language so that this argument is referenced only once there.
Signed-off
From: Markus Elfring
Date: Mon, 13 May 2019 09:47:17 +0200
A SmPL ellipsis was specified for a search approach so that additional
source code would be tolerated between an assignment to a local variable
and the corresponding null pointer check.
But such code should be restricted.
* The local
From: Markus Elfring
Date: Wed, 8 May 2019 13:50:49 +0200
Extend a when constraint in a SmPL rule so that an additional cast
is optionally excluded from source code searches for an expression
in assignments.
Signed-off-by: Markus Elfring
Suggested-by: Julia Lawall
Link: https
From: Markus Elfring
Date: Tue, 7 May 2019 11:20:48 +0200
The Linux coding style tolerates long string literals so that
the provided information can be easier found also by search tools
like grep.
Thus simplify a message construction in a SmPL rule by concatenating text
with two plus operators
://systeme.lip6.fr/pipermail/cocci/2019-March/005692.html
https://lkml.org/lkml/2019/3/26/395
I would appreciate if corresponding implementation details will get
another look.
Markus Elfring (5):
Adjust a message construction
Add a cast to an expression for an assignment
Merge four SmPL when
> It's interesting to get the function list automatically.
I occasionally imported code data into list variables
or even database tables.
> I'll try to parse the drivers/of/base.c file based on comments like this
> "* Returns a node pointer with refcount incremented, use
> * of_node_put() on it
> The call to of_parse_phandle()/of_find_node_by_name() ... returns a node
> pointer with refcount incremented thus it must be explicitly decremented
> after the last usage.
>
> This SmPL is also looking for places where there is an of_node_put on
> some path but not on others.
I suggest to
> … - the problem though is that I'm unable
> to insert the (__force __be16) cast in the patch rule as
> coccinelle is refusing hose lines. …
It seems that I can not help directly with this concern. But a few other
implementation details in your approach caught also my development attention
once
> connecting
…
> File "", line 35, in store_statements
> socket.gaierror: [Errno -2] Name or service not known
> Error in Python script, line 56, file …
It seems that the attached adjusted data processing approach can produce
an usable analysis result.
> File "", line 35, in store_statements
> socket.gaierror: [Errno -2] Name or service not known
> Error in Python script, line 56, file …
It seems that the attached adjusted data processing approach can produce
an usable analysis result.
elfring@Sonne:~/Projekte/Coccinelle/janitor> time
> Is there still a need to perform parallelisation for the mentioned software
> components by other approaches?
The multi-processing support by the Coccinelle software triggers some
development challenges.
If data should be shared between started (background) processes,
an external system need to
>> File "", line 34, in store_statements
>> AttributeError: __exit__
>> Error in Python script, line 55, file …
>
> I have no idea. It looks like a python problem.
Partly, yes (of course).
> If you want help, you will have to construct a script
> that exhibits the error with print statements
> Is there still a need to perform parallelisation for the mentioned software
> components by other approaches?
The multi-processing support by the Coccinelle software triggers some
development challenges.
If data should be shared between started (background) processes,
an external system need to
>> * Would you like to add a directory for your test collection?
>
> Hum, there are over 1000 files in tests/,
Are any of them interesting also for you?
> it's tedious to scroll through all of them.
Can a separate folder for your contribution?
Would you become interested in a topic like
Hello,
The Coccinelle software supports multi-processing (parameter “--jobs”)
for a while. It would be occasionally useful to share data between started
(background) processes for specific analysis tasks.
Such parallel data collection would require a software design which is safe
for data
> Since you haven't included the semantic patch,
This information can become useful later eventually.
> it seems that there is no way anyone can help you.
Other developers can provide also helpful advices.
Example:
Mike Bayer
Topic: Checking approaches around parallel data import for records
> I would like to show you my efforts on adding the missing dowhile loop in
> SmPL.
Do you refer to the functionality “do … while(…) loop” here?
Thanks for your interest in software extensions according to this topic.
https://systeme.lip6.fr/pipermail/cocci/2015-May/002030.html
>> Where does the added number come from for the identifier “reg1”?
>
> It's in the source code, at a different position than the reg result.
You (and the script variant
“list_duplicate_statement_pairs_from_if_branches6.cocci”)
are right. A bit of exception handling code can be repeated too
> I'm not going to debug anything that involves external tools,
> ie your database.
* Will such a restriction become interesting also for further clarifications?
* Did you notice that the script variant
“list_duplicate_statement_pairs_from_if_branches5.cocci”
is working only by a simple
Hello,
I reported that I am trying a specific source code analysis out again.
Information can be imported also into database tables for such a purpose.
I observed a primary key constraint violation for my data processing attempt.
Useful background information can be found for a topic like
Hello,
I try to achieve something also by the specification of Python code within
scripts for the semantic patch language.
It can happen then that such code contains questionable places
(because of usual update candidates).
Example for a corresponding error message:
…
File "", line 11
>> elfring@Sonne:~/Projekte/Linux/next-patched> time spatch --timeout 34 -j 2
>> --chunksize 1 -D database_URL=postgresql+psycopg2:///parallel_DVB_duplicates
>> --dir drivers/media/dvb-frontends --sp-file
>> ~/Projekte/Coccinelle/janitor/list_duplicate_statement_pairs_from_if_branches4.cocci
>>
Hello,
I have noticed another questionable software behaviour during the application
of the semantic patch language.
elfring@Sonne:~/Projekte/Linux/next-patched> time spatch --timeout 34 -j 2
--chunksize 1 -D database_URL=postgresql+psycopg2:///parallel_DVB_duplicates
--dir
>> I would appreciate a more appropriate error message for such use cases.
>
> Coccinelle doesn't know what you intend. Executing the initialize rule is
> not obligatory.
Can execution of the specified initialisation code become mandatory?
Regards,
Markus
>> @initialize:python@
>> +URL << virtual.database_URL;
>
> On the command line, your -D argument is URL, but here the variable is
> called database_URL.
I am sorry that I have overlooked the identifier mismatch here.
> If you don't provide the variables needed by the initialize rule,
> the
Hello,
I constructed a SmPL script which can work as desired.
elfring@Sonne:~/Projekte/Linux/next-patched> spatch
drivers/media/dvb-frontends/tda1004x.c
~/Projekte/Coccinelle/janitor/list_duplicate_statement_pairs_from_if_branches3.cocci
…
Using SQLAlchemy version:
1.3.2
…
Hello,
I have tried another script out for the evolving semantic patch language.
Source code information is imported into a database table based on
the following SmPL rule.
@searching@
identifier work;
statement s1, s2;
position pos;
type T;
@@
T work(...)
{
... when any
if (...)
{
...
Hello,
I have tried another small SmPL script out.
@display@
identifier work;
statement s1, s2;
type T;
@@
T work(...)
{
... when any
{
... when any
*s1
s2
}
... when any
}
I have observed that no statements were shown from if branches
in my test source file.
This happened then after
> No i want to add some code to _all_ function that have a specific
> structure as one of their argument. Thus i match on the function
> parameter list for the struct i am interested in
This source code search approach is generally fine.
> and then after all the declaration i add a code
>> Would you like to add any source code only after a variable declaration
>
> Coccinelle doesn't allow this. It has no way of knowing whether other
> declarations come afterwards,
I suggest to reconsider this quick response.
Are there approximations supported for such a source code search
>> Would you like to add any source code only after a variable declaration
>
> Coccinelle doesn't allow this. It has no way of knowing whether other
> declarations come afterwards,
I suggest to reconsider this quick response.
Are there approximations supported for such a source code search
> @@
> statement S,S1;
> @@
>
> foo(...) {
> ... when != S
> + added code
> S1
> ...
> }
>
> A declaration doesn't match S.
Can this information trigger additional considerations for the handling
of variable definitions?
Would you like to add any source code only after a variable
> A metavariable is always bound to the same value within a given
> control-flow path.
Thanks for this information.
> I have no idea what you are trying to get at with this example.
Some goals can match to my use case description.
* Is another nice refactoring application demonstrated for
Hello,
I have tried another small SmPL script out.
@replacement@
expression ex;
identifier var;
@@
var
- = var +
+ +=
ex
elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch simplify_addition1.cocci
Test_increment1.c
…
@@ -1,6 +1,6 @@
int main(void)
{
int counter = 3;
>> I tried three different orderings out for these position variables
>> in the meantime.
>>
>> Will the implementation be fixed for all affected software components anyhow?
>
> No.
I am still curious then under which circumstances this software will be
corrected.
Regards,
Markus
Variable find.p2 in duplicated_code cannot be used as both a position and
a constraint
>>>
>>> I think that you have to declare find.p1 and find.p2 on a subsequent line.
>>
>> I have observed the same error message then.
>
> Go back and read what I wrote.
I suggest to take another look
>> elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci
>> show_same_statements7.cocci
>> …
>> Variable find.p2 in duplicated_code cannot be used as both a position and a
>> constraint
>
> I think that you have to declare find.p1 and find.p2 on a subsequent line.
I have observed
> Use position variables and use a second rule that forces the positions to
> be different. I already explained this.
I suggest to take another look at the provided information.
I have extended the analysis approach like the following.
@find@
identifier work;
position p1, p2;
statement s1,
>> I am still curious if it can be achieved that two statements
>> (with a SmPL ellipsis between them) will be found only at different
>> positions.
>>
>> How should be excluded that two generic search specifications
>> will be merged?
>
> Use position variables and use a second rule that forces
>>> Typically when there is a loop or goto.
>>
>> I find such a case distinction interesting.
>>
>>
>>> But there is no special handling of either construct.
>>
>> Does this information contain a contradiction?
>
> No. Draw a control flow graph of a loop and see what should happen for
> such a
>>> If you have a pattern like
>>>
>>> AAA
>>> ...
>>> BBB
>>>
>>> The AAA and BBB might match the same code
>>
>> I agree to this information in principle.
>> But I imagine that this source code should be found
>> at different positions.
>
> No there is no such constraint.
My software
>> Should two search specifications (with SmPL ellipses) between them
>> be kept separate for the desired diff output?
>
> I don't understand any of your answers precisely.
I hope that we can come closer again to a better understanding
of the reported software situation.
> If you have a pattern
> Your ifs may be in a loop.
Does your technology treat this control flow in special ways?
>>>
>>> No.
>>
>> Would the quoted information be irrelevant then for the discussed use case?
>
> No idea what the above means.
It seems that there is another communication difficulty
>>> Your ifs may be in a loop.
>>
>> Does your technology treat this control flow in special ways?
>
> No.
Would the quoted information be irrelevant then for the discussed use case?
Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
> Your ifs may be in a loop.
Does your technology treat this control flow in special ways?
Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
701 - 800 of 1468 matches
Mail list logo