|
Language constructs |
|
Scope constructs | Project | Project-wide transformation |
File | File-wide transformation |
Module | Indicate module definition |
Class | Indicate class definition |
Function | Indicate function definition |
|
User defined type | Integer | Define an integer variable |
String | Define a string variable |
|
Basic constructs | FunctionCall | Indicate expression of function call |
VariableRead | Indicate expression of variable read |
VariableWrite | Indicate expression of variable write |
VariableDecl | Indicate expression of variable declaration |
Statement | Indicate statement of any type |
StatementType* | Indicate statement of a particular type |
|
Keywords for scope clock |
|
Within(construct <name>) |
Get the scope of transformation. Supported scopes include a project, a file, a module, a function, and statements implying a scope (e.g., condition or loop statement) |
|
Before(<para>*)/Before |
Perform transformation before an entity |
|
After(<para>)/After |
Perform transformation after an entity |
|
Keywords for control flow |
|
IF(<expr>*) ELSE |
Proceed based on the value of expr |
|
FORALL(construct<name>/<Pattern>) |
List all constructs specified with name |
|
Primary actions |
|
Function | RenameFunction(<oldName>, <newName>) |
FindFunctionCall(<funName>) |
|
Variable | AddVariable(<type>, <name>, <intialValue>) |
AddVariables(<type>, <name1>, <name2>,…) //with the same type |
DeleteVariable(<name>) |
RenameVariable(<oldName>, <newName>) |
FindVariableRead/Write(<name>) |
|
Statement | AddStatement(<“stmt*”>)/ AddStatement(<loc>, <targetStmt>, <“stmt”>) |
AddCallStatement(<loc>, <targetStmt>, <funName>, <parameterList>) |
DeleteStatement(<“stmt”>)/ DeleteStatement(<loc>, <targetStmt>,<“stmt”>) |
ReplaceStatement(<“oldStmt”>, <“newStmt”>) |
|
Auxiliary functionality |
|
Retrieve functions | Function <fun> = getFunctionDef(<name>) |
Module <md> = getModuleDef(<name>) |
StatementType %<stList> = getStatementType( ) |
Statement %<stList> = getStatementAll(<“stmt”>/<pattern>) Statement <st> = getStatement(lineNumber) Statement <st> = getStatement(<“stmt”>/<pattern>) Statement <st> = getStatementIndex*(<“stmt”>/<pattern>) |
VariableWrite %<vw>=getVariableWrite(<varName>) |
VariableRead %<vr>=getVariableRead(<varName>) |
VariableDecl <vd> = getVariableDecl(<name>) |
|
Include block | IncludeCode {source code in Fortran} |
IncludeCode {source code in Fortran} into <filename> |
|