Skip to contentSkip to conversation

Data structures for source file analyses

cocci Markus Elfring 2 participants 8 messages Nov 20, 2022 – Nov 26, 2022 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

The semantic patch language (Coccinelle software) can read some source files. They are converted to internal data structures.

How do you call the intermediate data representations according to the involved processing pipelines?

Regards,
Markus

#1 lore raw
Quoted 7 lines · Markus Elfring

Hello,

The semantic patch language (Coccinelle software) can read some source files. They are converted to internal data structures.

How do you call the intermediate data representations according to the involved processing pipelines?

Abstrat syntax tree? Control-flow graph?

julia

#2 lore raw
Quoted 3 lines
Quoted 2 lines

How do you call the intermediate data representations according to the involved processing pipelines?

Abstrat syntax tree? Control-flow graph?

Do the following data representations matter for you?

* Abstract semantic graph

* Parse tree

How are they mapped to components which are provided by the Coccinelle software?

Regards,
Markus

A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.22.394.2211201702090.40755@hadrien

#4 lore raw
Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

How do you call the intermediate data representations according to the involved processing pipelines?

Abstrat syntax tree? Control-flow graph?

Do the following data representations matter for you?

* Abstract semantic graph

* Parse tree

No.

Such a terse response makes me curious if the distinction will evolve further for known abstraction levels.

Quoted 1 line
Quoted 1 line

How are they mapped to components which are provided by the Coccinelle software?

Will the chances grow to document the applied data structures better?

Regards,
Markus

#5 lore raw
In reply to Julia Lawall
Quoted 3 lines
Quoted 2 lines

How do you call the intermediate data representations according to the involved processing pipelines?

Abstrat syntax tree? Control-flow graph?

How are preprocessor directives (for example) integrated into the taxonomy of the Coccinelle software?

Regards,
Markus

#6 lore raw
Quoted 7 lines · Markus Elfring
Quoted 3 lines
Quoted 2 lines

How do you call the intermediate data representations according to the involved processing pipelines?

Abstrat syntax tree? Control-flow graph?

How are preprocessor directives (for example) integrated into the taxonomy of the Coccinelle software?

I have no real idea what the above question means. Things that Coccinelle is able to parse are put into the AST. Things that it is not able to parse are attached as comments to neighboring tokens. There is no general anser for preprocessing directives. Some are parsed and some are not.

julia

#7 lore raw
Quoted 3 lines
Quoted 2 lines

How are preprocessor directives (for example) integrated into the taxonomy of the Coccinelle software?

I have no real idea what the above question means.

I hope that further development ideas will influence software evolution in desirable directions.

Quoted 4 lines

Things that Coccinelle
is able to parse are put into the AST. Things that it is not able to parse are attached as comments to neighboring tokens. There is no general anser for preprocessing directives. Some are parsed and some are not.

Would you become interested to export data from the mentioned “abstract syntax tree” and “control-flow graph” into any other standard file formats?

Regards,
Markus

#8 lore raw
Quoted 10 lines · Markus Elfring
Quoted 3 lines
Quoted 2 lines

How are preprocessor directives (for example) integrated into the taxonomy of the Coccinelle software?

I have no real idea what the above question means.

I hope that further development ideas will influence software evolution in desirable directions.

Quoted 7 lines
Quoted 4 lines

Things that Coccinelle
is able to parse are put into the AST. Things that it is not able to parse are attached as comments to neighboring tokens. There is no general anser for preprocessing directives. Some are parsed and some are not.

Would you become interested to export data from the mentioned “abstract syntax tree” and “control-flow graph” into any other standard file formats?

The control flow raph is already available in "dot" format, with the option --control-flow-to-file

julia