You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is a call to a subroutine in a piece of code where i'm doing dataflowanalysis : I would like to be able to use an interface as a definition here. In order to avoid to parse and generate the ir of the whole routine when I just need the arguments intent.
I would be pleased to help you adding this feature to loki.
Describe the solution you'd like
I don't know if reading the interface can allow to know .defines_symbols and .uses_symbols, or if reading the interface can only show which variable are read only and read write.
Describe alternatives you've considered
I wrote some code to read the interface and update which variables where read only and which one where read write.
Additional context
SUBROUTINE CALLER() REAL :: A, B, C, D, E pragma region1 A = B + 1 C = A CALL CALLEE(D, E) end pragma region 1 END SUBROUTINE CALLER
In this example, I would like to know which variables are read only and which one are read write, without reading the whole calle.F90 file. But just callee.intfb.F90 (the interface).
Organisation
météo france
The text was updated successfully, but these errors were encountered:
reuterbal
changed the title
enrich dataflow analysis with interface
Enrichment/interprocedural information from interfaces instead of full source parse
Jan 16, 2025
Thanks @ecossevin, I find this an appealing idea. I had briefly raised this as an idea in #310 but your description is more complete, so copying my comment here and closing the other issue:
As suggested by @ecossevin , we should add a utility that can parse the interface blocks in .intfb.h header files directly to extract enrichment information for call statements. This could potentially be implemented via the REGEX frontend, thus removing the need to feed this through a full frontend like fparser.
The key idea from my point of view would be to implement enrichment (i.e., the annotation with interprocedural information) from interfaces instead of full source files. This makes the required information automatically available to dataflow analysis in the usual way.
Is your feature request related to a problem? Please describe.
Source_callee = Sourcefile.from_file('callee.F90') source_caller = Sourcefile.from_file('caller.F90', definitions=source_callee.definitions)
When there is a call to a subroutine in a piece of code where i'm doing dataflowanalysis : I would like to be able to use an interface as a definition here. In order to avoid to parse and generate the ir of the whole routine when I just need the arguments intent.
I would be pleased to help you adding this feature to loki.
Describe the solution you'd like
I don't know if reading the interface can allow to know .defines_symbols and .uses_symbols, or if reading the interface can only show which variable are read only and read write.
Describe alternatives you've considered
I wrote some code to read the interface and update which variables where read only and which one where read write.
Additional context
SUBROUTINE CALLER() REAL :: A, B, C, D, E pragma region1 A = B + 1 C = A CALL CALLEE(D, E) end pragma region 1 END SUBROUTINE CALLER
In this example, I would like to know which variables are read only and which one are read write, without reading the whole calle.F90 file. But just callee.intfb.F90 (the interface).
Organisation
météo france
The text was updated successfully, but these errors were encountered: