Research Article

SPOT: A DSL for Extending Fortran Programs with Metaprogramming

Algorithm 8

The profiling library specified in SPOT.
(1)Transformer   Profiling {
(2)Within (File   *){
(3)FORALL (Function   %fun){
(4)AddUseModuleStatement (profiling_mod);
(5)FORALL (FunctionCall   %funCall){
(6)AddCallStatement (Before , $funCall.statement , profiling, $fun.funName +:+$funCall.funName );
(7)AddCallStatement (After , $funCall.statement , profiling, $fun.funName +:+$funCall.funName );
(8)}
(9)}
(10)}
(11)   }