A pattern abstractor is a function that takes as input a pattern and produces a new pattern that will match more Fortran statement than the input pattern. More formally an abstractor absOp is defined as follow
where F is a set of Fortran statements. A non exhaustive list of the current abstractors in the system are the following:
For instance, applying the pattern abstractor on the code at the top of the example 67, generalizes the pattern corresponding strictly to the Fortran code fragment into a pattern that accepts any variable names and constants. Thus we automatically compute a pattern that matches all loops with a similar syntactic code structure. Of course, the pattern, produced automatically, can then be edited by the user when needed.
All the variables defined in the pattern may be used like some pointers on the
subtrees matched at the transformation script level.
DO 10 j = 1,ndim3 DO 20 i = 1,ndim1 c2(i,j) = 0 20 CONTINUE 10 CONTINUE
DO ?v161 ?v162 = ?v163, ?v164 DO ?v165 ?v166 = ?v167, ?v168 ?v169(?v166, ?v162)=?v172 ?v173 CONTINUE ?v174 CONTINUE
10, j, 1, ... have respectively been replaced by ?v161, ?v162, ?v163, ..., which may be associated
to any kind of constants or variables.