Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[photran-dev] New refactorings for Fortran

Hi,

My name is Gustavo Rissetti, I'm student at the Universidade Federal de Santa Maria (UFSM). In my undergraduate work I'm continuing the work of Bruno Batista Boniati (his dissertation), in which he implemented new refactorings for Fortran in Eclipse IDE (in this work he developed the Replace Obsolete Operators refactoring, now integrated in Photran). In my work I developed three new refactorings, and I would like to submit them to Photran, so that other users could use them in their Fortran projects.


The refactorings that I developed are:

Standardize Statements: refactoring that rewrites variables declarations, transforming them into simple statements, always containing the two points (::) that are characteristic of Fortran, making the code more readable (we should probably find a better name for this refactoring :-) ). A small example can be seen in Figure 1 attached to this mail.

Remove Unused Variables: refactoring that removes unused variables in Fortran code, making it more readable, and could generate gains of performance, depending on the compiler. A small example can be seen in Figure 2.

Data To Parameter: refactoring to transform variables declared as data in variables declared with parameter attribute, when these are intended to be constants in source code. Often, developers who want to use constants can confuse the data statement with the attribute parameter, which is the most suitable in these cases. Making the substitution can generate performance gains, because it decreases the access to variables. A small example can be seen in Figure 3.


[]s,


--
-----------------------------------------------------------------
Atenciosamente,
Gustavo Rissetti     - Bolsista PET -
           - Ciência da Computação -
-----------------------------------------------------------------
Fone: (55) 84051455
-----------------------------------------------------------------

Attachment: Figure1.png
Description: PNG image

Attachment: Figure2.png
Description: PNG image

Attachment: Figure3.png
Description: PNG image


Back to the top