Global namespace
Namespaces
Name |
Description |
Inherited attribute for AstQuery class. |
|
Command line processing utility functions. Functions in this namespace are in the ROSE Utilities library and |
|
Bit‐wise operations on integers. |
|
Types and functions to support OpenMP |
|
This is a mechanism for reporting statistical data about the AST, subtrees, and IR nodes. |
|
High level SAGE III AST node and subtree builders. |
|
Functions that are useful when operating on the AST. |
|
This namespace contains template functions that operate on the ROSE AST |
|
Types
Name |
Description |
Class holding static data and functions supporting File I/O. |
|
Helper class to hold Alias Information |
|
A struct to hold the information about an alias node |
|
An interface to a single annotation item |
|
*QY: Interface classes used by loop optimizations** |
|
Base class for all IR node attribute values. |
|
** |
|
Stores named attributes in Sage IR nodes. |
|
Attribute evaluator for synthesized attributes. |
|
AstCycleTest is based on the successor information of SgNodes (the same information that is used by the traversals). It tests such that it allows a preorder traversal to revisit nodes but reports an error if the traversal would run into a cycle. If a cycle is found it reports the list of SgNodes that are part of the cycle to stdout, starting with "CYCLE FOUND: ..." and stops testing. Usage: AstCycleTest t; t.traverse(SgNode* n); // where n is the root node of the subtree to be tested. |
|
AST Diagnostics |
|
provides an abstract interface to access/modify AST nodes. |
|
Statistics about IR nodes used. |
|
This is the base class for anyone who wants to be notified when AST nodes are being copied. |
|
AST Processing |
|
AST Properties (Consistency Tests) |
|
Attribute containing a regex expression as a string. |
|
/////////////////////////////////////////////////////////////////////////////////////// |
|
/////////////////////////////////////////////////////////////////////////////////////// |
|
/////////////////////////////////////////////////////////////////////////////////////// |
|
/////////////////////////////////////////////////////////////////////////////////////// |
|
Attribute storing an SgNode. |
|
Class for traversing the AST. |
|
Attribute evaluator for inherited and synthesized attributes. |
|
Attribute evaluator for inherited attributes. |
|
IR node attribute that stores a copyable value. |
|
This is a mechanism for reporting warnings about the AST, subtrees, and IR nodes. |
|
|
|
*** Commonly used lattices **** |
|
Simplifies development of queries on the AST resulting in a single boolean value. |
|
Basic type layout engine ‐‐ handles bookkeeping, plus handing typedefs and |
|
Translator from Clang AST to SAGE III (ROSE Compiler AST) |
|
A descriptor with begin(left) and end(right) characters, such as {x}, (x), etc |
|
Helper class to collect Alias Relations |
|
A pair of items separated by 'sep' |
|
A Shared Pointer Wrapper for CompactRepresentation |
|
Layout generator for customized primitive types. |
|
Backend Cxx Code Generator |
|
** |
|
stl graph class for directed and undirected graphs |
|
** |
|
dot file representation with subgraphs |
|
Extended dependence matrix: |
|
There sould not be any IR nodes marked as a transformation coming from the legacy frontend/ROSE translation. This test enforces this. |
|
a parameter with a named range of values. parameter:range_name:lower_bound:upper_bound |
|
This normalization makes sure each function call argument is a side‐effect free expression of only one variable. To accomplish this, temporary variables are declared and the arguments of a function are evaluated before the function itself. Note: Normalization is not performed if it is unsafe. E,g.: while(Foo(Bar()) {} is not equal to t = Bar(); while(Foo(t) {} Note that only SgFunctionCall arguments are normalized. For example the arguments of the constructor initializer MyObject o(foo(), bar()) will not be extracted. |
|
Backend Fortran Code Generator |
|
Stores a function call expression, along with associated information about its context. |
|
Traverses a given AST and finds all function calls in the order in which they're evaluated Also, for each function we find where to put declarations of temporary variables so that they're accessible at the function call |
|
Layout generator for i386 primitive types |
|
* Dataflow Analyses ** |
|
Apply an analysis A's transfer function at a particular AST node type |
|
IntraProcedurial DataFlow Analysis to compute exit and entry from all the function which |
|
Struct containing a filtering function to determine what CFG nodes are interesting during the DefUse traversal. This is a functor. |
|
Backend Java Code Generator |
|
Visits live expressions ‐ helper to LiveDeadVarsTransfer |
|
Backend Language Independent Code Generator |
|
*QY: Singular interface class which remembers configurations for loop optimizations** |
|
Explicitly mark lhs operands of specific operators as lvalues. |
|
Attribute corresponding to a metric. |
|
Inherited attribute for NameQuery class. |
|
* NodeFact * A fact associated with a CFG node by * some analysis thatis not evolved as part * of a dataflow analysis (i.e. it should * stay constant throughout the analysis). ** |
|
Inherited attribute for NodeQuery class. |
|
Layout generator for i386 ABI‐like struct layout |
|
Inherited attribute for NumberQuery class. |
|
Representation for an operator (function) |
|
Representation for function parameter names and types. |
|
Abstract interface for a pattern which can match ASTs |
|
A rule which changes one pattern of code to another |
|
For preprocessing information including source comments, include , if, define, etc |
|
Interface class for processing each AstNode from within the ReadAstTraverse function. |
|
Inherited attribute required for hidden list propagation to child scopes. |
|
PtrAliasAnalysis computes Alias Information, which is used for Virtual Function Resolving. |
|
ROSE HPCToolkit Module |
|
ROSE‐HPCT examples |
|
ROSE 3rd Party Libraries |
|
Inlining Transformations |
|
ROSE Frontend Group |
|
ROSE Program Transformations |
|
An interface to read into type(class) and operator(function) annotations |
|
This traversal uses the Memory Pool traversal to fixup types indeclarations that can be shared but are not. (e.g SgclassDeclarations). |
|
AST Rewrite fragment identification traversal |
|
AST Rewrite Mechanism |
|
AST Rewrite nested classes |
|
Definition of a rewrite rule on a given SgNode. The rule modifies the node and/or its children in‐place, and then returns true for success or false for failure. |
|
Combine several rules into one, doing the constituents in order |
|
Interface for iterating over an AST. |
|
Sage III Intermediate Representation |
|
Sage III Expression Classes |
|
Sage III Statement Classes |
|
Sage III Symbol Classes |
|
Sage III Type Classes |
|
* SaveDotAnalysis ** |
|
Similar to CollectPair, but the second item may start with 'sel' without 'sep' in front of it. |
|
RHS of an array variable declaration with optional assignment. |
|
Binary AST block node. |
|
This class represents the concept of a C Assembler statement. |
|
This class represents the rhs of a variable declaration which includes an optional |
|
This class represents the concept of a block (not a basic block from control flow analysis). |
|
This class represents the notion of a binary operator. |
|
This class represents a boolean value (expression value). |
|
This class represents the notion of a break statement |
|
This class represents the concept of a generic call expression. |
|
This class represents the concept of a C and C++ case option (used within a switch statement). |
|
This class represents a cast of one type to another. |
|
This class represents the concept of a catch within a try‐catch construct used in |
|
This class represents the concept of a C++ sequence of catch statements. |
|
This class represents the concept of a class declaration statement. It includes the |
|
This class represents the concept of a class definition in C++. |
|
This class represents the concept of a C++ expression built from a class name. |
|
This class represents the concept of a class name within the compiler. |
|
This class represents the concept of a C style |
|
This class represents the concept of a C trinary conditional expression (e.g. "test ? true : false") |
|
This class represents the call of a class constructor to initialize a variable. |
|
This class represents the concept of a C or C++ continue statement. |
|
This class represents the concept of a contructor initializer list (used in |
|
This class represents modifiers for SgDeclaration (declaration statements). |
|
This class represents the concept of a declaration statement. |
|
This class represents the concept of a C or C++ default case within a switch |
|
This class represents the concept of a C++ call to the delete operator. |
|
This class represents a directory within a projects file structure of files and directories. |
|
This class represents the concept of a do‐while statement. |
|
This class represents the notion of an value (expression value). |
|
This class represents the concept of an enum declaration. |
|
This class represents the concept of the dynamic execution of a string, |
|
This class represents the concept of a C and C++ expression list. |
|
This class represents the concept of a C or C++ statement which contains a |
|
This class represents the notion of an expression. Expressions |
|
This class represents a source file for a project (which may contian |
|
This class represents the notion of an value (expression value). |
|
This class represents the variable declaration or variable initialization withn a |
|
This class represents the concept of a for loop. |
|
This class represents the concept of a C++ function call (which is an expression). |
|
This class represents the concept of a function declaration statement. |
|
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.). |
|
This class represents the concept of a declaration list. |
|
This class represents the function being called and must be assembled in the |
|
This class represents a type for all functions. |
|
This class represents the concept of a name and a type. It may be |
|
This class represents the function type table (stores all function types so that |
|
This class represents the concept of a namespace definition. |
|
This class represents the concept of a C or C++ goto statement. |
|
This class represents the concept of an "if" construct. |
|
This class represents the notion of a declared variable. |
|
This class represents the notion of an initializer for a variable declaration or |
|
This class represents the physical disequality (often called pointer disequality) operator |
|
This class represents the physical equality (often called pointer equality) operator |
|
This class represents the concept of a C or C++ label statement. |
|
This class represents a list display. |
|
This class represents the notion of an expression or statement which |
|
This class represents the notion of an value (expression value). |
|
This class represents the concept of a member function declaration statement. |
|
This class represents the member function being called and must be assembled in the |
|
This class represents the numeric negation of a value. Not to |
|
This class represents the base class of a number of IR nodes define modifiers |
|
This class is not used in ROSE, but is intended to represent a list of SgModifierTypes |
|
This class represents strings within the IR nodes. |
|
This class represents the concept of a C++ namespace alias declaration statement. |
|
This class represents the concept of a C++ namespace declaration. |
|
This class represents the concept of a namespace definition. |
|
This class represents the concept of a namespace name within the compiler. |
|
This class represents the notion of an n‐ary boolean operation. |
|
This class represents the notion of an n‐ary comparison operation. |
|
This class represents the notion of an n‐ary operator. |
|
This class represents the concept of a C++ call to the new operator. |
|
This class represents the base class for all IR nodes within Sage III. |
|
This class represents an object used to initialize the unparsing. |
|
This class represents a Fortran pointer assignment. It is not |
|
This class represents the concept of a C Assembler statement (untested). |
|
This class represents a source project, with a list of SgFile objects and global |
|
This class represents the concept of a 'global' stmt in Python |
|
This class represents a OLD concept of the structure require |
|
This class represents a OLD concept of the structure require |
|
This class represents the "&" operator (applied to any lvalue). |
|
This class represents the concept of a C Assembler statement (untested). |
|
This class was part of CC++ support from a long time ago. |
|
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.). |
|
This class represents the "sizeof()" operator (applied to any type). |
|
This class is part of the older CC++ concept. It is not a part of C or C++ (this IR |
|
This class represents the notion of a statement. |
|
This class represents the GNU extension "statement expression" (thus is |
|
This class is intended to be a wrapper around SgStatements, allowing |
|
This class represents modifiers specific to storage. |
|
This class represents the conversion of an arbitrary expression to |
|
This class represents the base class of a numbr of IR nodes that don't otherwise fit |
|
This class represents the concept of a switch. |
|
This class represents the concept of a name within the compiler. |
|
This class represents the symbol tables used in both SgScopeStatement and |
|
This class represents template argument within the use of a template to build an instantiation. |
|
This class represents the concept of a template declaration. |
|
This class represents the concept of an instantiated class template. |
|
This class represents the concept of a class definition in C++. |
|
This class represents the concept of a C++ template instantiation directive. |
|
This class represents the concept of an instantiation of function template. |
|
This class represents the concept of an instantiation of member function template |
|
This class represents the "this" operator (can be applied to any member data). |
|
This class represents the C++ throw expression (handled as a unary operator). |
|
Temporary traversal base class (do not use). |
|
This class represents the concept of try statement within the try‐catch |
|
This class represents a tuple display. |
|
This class represents the base class for all types. |
|
This class represents a C99 complex type. |
|
This class represents a default type used for some IR nodes (see below). |
|
This class represents a C99 complex type. |
|
This class represents a string type used for SgStringVal IR node. |
|
This class represents the notion of a typedef declaration. |
|
This class represents a list of associated typedefs for the SgType IR nodes which |
|
This class represents the notion of a unary operator. |
|
This class represents the concept of a C++ using declaration. |
|
This class represents the concept of a C++ using directive. |
|
This class represents the notion of an value (expression value). |
|
This class represents the variable refernece in expressions. |
|
This class represents the concept of a C or C++ variable declaration. |
|
This class represents the definition (initialization) of a variable. |
|
This class represents the concept of a variable name within the compiler (a |
|
This class represents the concept of a do‐while statement. |
|
This class represents the location of the code associated with the IR node in the |
|
This provides some simple support mechanisms to create a graph of SimpleDirectedGraphNodes. |
|
This is a node in the directed graph. All the connectivity information for the graph is captured in this (by way of the successor and predecessor sets). |
|
|
|
|
|
A descriptor for an identifier |
|
Support for cross compilation or customized primitive type layouts. |
|
A symbolic function declaration with |
|
A list of symbolic function declarations, separated by ',', enclosed in '(..)' |
|
A list of parameter descriptors, separated by ',', enclosed in '(..)' |
|
SymbolicVal with I/O interface |
|
* Symbolic Operator interface ** |
|
Layout generator for the native system (uses sizeof) |
|
Taint Flow Analysis****** |
|
A pointer to a vertex of the static taint lattice. |
|
This traversal uses the Memory Pool traversal to test parent pointers. |
|
This tests the first non‐defining, referenced from each declaration, to make sure that it is not a forward declaration (a non‐defining declaration marked to be a forward declaration). |
|
|
|
This traversal uses the Memory Pool traversal to test declarations and if their associated symbol can be located. |
|
This traversal uses the Memory Pool traversal to test parent pointers. |
|
**** This is the graph to store the result of transitive analysis. An object of this class is passed as argument to construct a GraphTransAnalysis operator, and as we invoke GraphTransAnalysis::ComputeTransInfo to compute transitive info between nodes of the input graph, the transitive info is stored into TransInfoGraph by calling TransInfoGraph::SetTransInfo. Users of GraphTransAnalysis must implement all three virtual functions defined TransInfoGraph, to record and return transitive information already computed. The template paramter T is the type of transitive information (the result of transitive analysis). It models information regarding transitive paths in the input graph |
|
Interface class for processing each AstNode from within the TransformAstTraverse function. |
|
A map storing types and their descriptors, the descriptor could be any instantiated types as a template class. |
|
Backend C and C++ code generator. |
|
*** UnstructuredPassInterDataflow * The trivial inter‐procedural dataflow where a intra‐procedural * dataflow analysis is executed once on every function in the * application, with no guarantees about how dataflow information * is transmitted across function calls. **** |
|
UnstructuredPassAnalyses * |
|
This traversal implements the mechanism to reset all parent pointers (back edges in the AST graph) |
|
Inherited attribute required for ResetParentPointers class. |
|
This traversal implements the mechanism to reset all parent pointers (back edges in the AST graph) |
|
Class holding a unique name for a variable. Is attached to varRefs as a persistent attribute. This is used to assign absolute names to VarRefExp nodes during VariableRenaming. |
|
Class that defines an VariableRenaming of a program |
|
Virutal Function Analysis and PointerAliasAnalysis are dependent on each other for their accuracy. That's why they are done together |
|
Output interface of a container |
|
Layout generator for x86‐64 primitive types |
|
* affineInequalityFact ** |
|
Description of AST Diagnostics within ROSE |
|
AST construction |
|
Working with attributes |
|
Backend C and C++ Code Generator |
|
Boolean Query Library |
|
A function object to filter out builtin functions in a call graph (only non‐builtin functions will be considered) |
|
Writing Git commit messages |
|
Default constructors and destructors |
|
Library developers and collaborators |
|
A function object to be used as a predicate to filter out functions in a call graph: it does not filter out anything. |
|
High level AST builders |
|
Ownership of heap‐allocated objects |
|
How to install Zlib * Instructions for installing Zlib, a ROSE software dependency. */ struct installation_dependencies_zlib {}; ` |
|
Library general principles |
|
Local Node Query Library |
|
Name Query Library |
|
Node Query Library |
|
* numCallersAnnotator * Annotates every function's SgFunctionDefinition * node with a numCallersAttribute that contains the * number of functions that call the given function. **** |
|
** printDataflowInfoPass * Prints out the dataflow information associated * with a given analysis for every CFG node a * function. ***** |
|
Query Library |
|
Backend |
|
Frontend |
|
ROSE overview |
|
Midend |
|
Subtree Query Library |
|
Developing ROSE‐based tools |
|
Build systems |
|
Developing ROSE‐based tools |
|
Transformation Support Library |
|
General Utility Functions |
|
Mandatory logging are those critial msgs of the runtime including three levels of severity: MLOG_LEVEL_WARN: warning of likely problem, but the results might be ok MLOG_LEVEL_ERROR: error of runtime execution, program can continue, results will be wrong, but still useful MLOG_LEVEL_FATAL: fatal errors of runtime, program cannot continue. |
|
a set of names separated by ',', begin with '(', end with ')' |
|
A container of std::list<> of elment of NameGroup type |
|
Paramter names |
|
Parameter types |
|
Instance types for type annotations |
|
Enums
Name |
Description |
Mandatory logging are those critial msgs of the runtime including three levels of severity: MLOG_LEVEL_WARN: warning of likely problem, but the results might be ok MLOG_LEVEL_ERROR: error of runtime execution, program can continue, results will be wrong, but still useful MLOG_LEVEL_FATAL: fatal errors of runtime, program cannot continue. |
|
Functions
Name |
Description |
Generate a dot graph named 'fileName' from a call graph |
|
Traverse an entire AST, where op is invoked on each AST node to gather information. |
|
Traverse and transform an entire AST, where op is invoked to transform each sub‐Tree. |
|
Checks whether the physical source position information is consistant in the Sg_File_Info object |
|
Check for consistancy of isTransformation flags for nodes marked as a transformation. |
|
|
|
Combined procedure for cleaning up code after inlining. Does not do variable renaming or block flattening, however. |
|
Convert something like "int a = foo();" into "int a; a = foo();" |
|
Detect nodes marked as transformations (should not be present coming out of the frontend translation). |
|
Do finite differencing on one expression within one context. The expression must be defined and valid within the entire body of root. The rewrite rules are used to simplify expressions. When a variable var is updated from old_value to new_value, an expression of the form (var, (old_value, new_value)) is created and rewritten. The rewrite rules may either produce an arbitrary expression (which will be used as‐is) or one of the form (var, (something, value)) (which will be changed to (var = value)). |
|
Main inliner code. Accepts a function call as a parameter, and inlines only that single function call. Returns true if it succeeded, and false otherwise. The function call must be to a named function, static member function, or non‐virtual non‐static member function, and the function must be known (not through a function pointer or member function pointer). Also, the body of the function must already be visible. Recursive procedures are handled properly (when allowRecursion is set), by inlining one copy of the procedure into itself. Any other restrictions on what can be inlined are bugs in the inliner code. |
|
Are two expressions equal (using a deep comparison)? |
|
Are corresponding expressions in two lists equal (using a deep comparison)? |
|
* The function void filterGraph(_GraphStructure& graph, _NodePredicate _nodePred) will filter out all nodes which satisfy the criteria which makes_NodePredicate return 'true'. NodePredicate is any function object that takes a_GraphStructure::Node as a paramater and returns a bool. In order for this to work a function_GraphStructure::DeleteNode must be implemented in order to Delete the nodes. This exact function is implemented asprotected in IDGraphCreateTemplate so it should be easy.* |
|
Change all members in a program to be public. There should really be a smarter procedure for this that only changes members used by inlined code. Get all variable names declared within a scope, in the correct order for destruction |
|
Returns the function definition containing the specified statement. |
|
Find the path of a ROSE support file from the build tree. |
|
Find the path of a ROSE support file from the source tree. |
|
Find all variables referenced in a region |
|
Workaround for ROSE bug. Should be used whenever expressions in a program are modified. |
|
Flatten nested blocks of code in a program. This code requires that variable names in the region being processed are already distinct, and it may extend variable lifetimes to the end of the outer block of code. |
|
Simple APIs for ROSE (error codes are in SgProject.frontendErrorCode(), backendErrorCode()). @{ |
|
@} |
|
|
|
A standard set of algebraic rules for simple optimizations |
|
A standard set of algebraic and finite‐differencing rules |
|
Returns a unique positive integer ID to an SgScopeStatement within a function definition. |
|
Get the topmost enclosing expression of a given expression. Needs to be moved. |
|
Get the statement of an expression. Somewhat smarter than the standard version of this routine, but needs to be merged. |
|
A global function for getting the string associated with an enum (which is defined in global scope) |
|
Does expression expr potentially have its address taken somewhere in the tree pointed to by root? |
|
Internal routine to check whether a given variable declaration is a member variable. |
|
Is expression expr potentially modified (assigned to, address taken, passed by non‐const reference) somewhere in the tree pointed to by root? |
|
|
|
|
|
|
|
Joins two sets of mangled qualifiers to form a new mangled qualifier. |
|
Joins two sets of mangled qualifiers to form a new mangled qualifier. |
|
Utility function to make CFG Edges |
|
Mangles a constant expression, needed for template arguments. |
|
Returns a mangled form of a C++ function name, as an SgName object. |
|
Returns a mangled form of special C++ function names (excl. qualifiers). |
|
Produces a mangled name for a scope statement. |
|
Mangles a chain of qualifiers, returning an SgName object. |
|
Mangles a chain of qualifiers followed from a given scope. |
|
Mangles a boolean expression. |
|
|
|
|
|
Mangles an instantiated template function or member function, returning a SgName object. |
|
Mangles an instantiated template function or template member function. |
|
|
|
If the declaration has translation unit scope (as opposed to program scope), mangle the translation unit name. |
|
Mangles a list of types, returning an SgName object. |
|
Mangles a container of types, returning an STL std::string object. |
|
Mangles a value expression, as used in a template argument. |
|
Mark relavant expressions as l‐values explicitly. |
|
Move variables declared in a for statement to just outside that statement. |
|
Insert a new statement before or after a target statement. If allowForInit is true, the new statement can be inserted into the initializer of a for statement. Needs to be merged |
|
Bitwise conjunction operators |
|
Bitwise conjunction assignment operators |
|
Multiplication operators |
|
Addition operators |
|
Unary minus operators |
|
Bitwise disjunction operators |
|
Bitwise disjunction assignment operators |
|
Output at least some of the predefined macro settings. |
|
Match an addition operation |
|
Match a comma operation |
|
Match a multiplication operation |
|
Match an add‐assign operation |
|
Match a particular integer |
|
Match any constant into a variable |
|
Match anything into a variable |
|
Create a PatternActionRule |
|
Propagate hidden list information for variables, types, and class elaboration. |
|
Rewrites a while or for loop so that the official test is changed to "true" and what had previously been the test is now an if‐break combination (with an inverted condition) at the beginning of the loop body |
|
Read a list of items of type ItemGen, they are separated using 'sep' |
|
Change all variable and label references to point to new symbols, created to point to the matching declaration found in the program. This needs to be moved into somewhere in FixSgTree. |
|
Remove all null statements (those with only an integer constant or a null expression) |
|
Remove unused variables in a scope |
|
Remove the declaration of a given variable |
|
Rename all labels in a block of code. |
|
Rename all variables in a block of code, and ensure that all variable references point to the correct declarations. |
|
Replace an assignment statement with the result of a statement generator. Assumptions: from has assignment expr at top level of statement from is not in the test of a loop or if statement not currently traversing from |
|
Replace a child of a node. |
|
Replace the expression "from" with another expression "to", wherever it appears in the AST. The expression "from" is not deleted, and may be reused elsewhere in the AST. |
|
Rewrite a node and its children recursively using a rule. Iterate until no more changes can be made. |
|
Find the path of the ROSE install prefix. |
|
Reads a line of text from a stream. |
|
Convert a string to an unsigned long integer. |
|
affineInequalitiesPlacer * |
|
In code with declarations such as "int foo = bar", where foo and bar are not modified, replace "foo" with "bar" and remove the declaration |
|
Do a simple form of finite differencing on all functions contained within root (which should be a project, file, or function definition). |
|
Propagate definitions of a variable to its uses. Assumptions: var is only assigned at the top level of body nothing var depends on is assigned within body Very simple algorithm designed to only handle simplest cases |
|
This is a top level function not called recursively. |
|
Returns the input std::string stripped of leading and trailing spaces. |
|
Support for handling directories of files in ROSE (useful for code generation). |
|
User callable function available if compilation using the backend compiler is not required. |
|
Support for refactored handling directories of files. |
|
User callable function available if compilation using the backend compiler is not required. |
|
User callable function available if compilation using the backend compiler is not required. |
|
Validate a fresh detached construction transaction. |
|
Validate exact parent ownership for a published AST. |
|
This is a top level function not called recursively. |
|
Stream insertion operators |
|
Equality operators |
|
Inequality operators |
|
Less‐than operators |
|
Less‐than‐or‐equal operators |
|
Greater‐than operators |
|
Greater‐than‐or‐equal operators |
Variables
Name |
Description |
Numeric form of ROSE version. |
|
Match anything |
|
Translation (directive lowering) support for OpenMP 3.0 C/C++ |
|
Using Declarations
Using Namespace Directives
AST_Graph namespace
Types
Name |
Description |
* The class class DataMemberPointersToIR implements two different ways of constructing a graph from the AST. * The memory pool traversal which is why the class inherits fromROSE_VisitTraversal * Whole AST traversal through traversing on nodes This design decision is peculiar out from a inheritance perspective, butmakes sence to bridge between the iheritance style of Marcus and an STLalgorithm style. Caveats: * one member functions is only used by the memory pool traversal ‐visit(..) The member function generateGraphFromMemoryPool(..) is required toachieve STL style algorithms where the bace‐class uses implemenatation byvirtual functions. Great things: * avoid duplicate implementation * allows a very simple implementation****** |
|
* The functional struct defaultFilterBinary is an example filter on edges. |
|
* The functional struct defaultFilterUnary is an example filter on nodes. |
|
* Define custom return type from the filter functionals. This is an experiment to see if a std::pair like data structure where the variables names are not std::pair<>::first and std::pair<>::second. This data structure is expectedto change as the code develops.* |
|
Enums
Functions
Name |
Description |
|
|
|
|
Two my_pairs of the same type are equal iff their members are equal. |
|
Uses |
|
<http://gcc.gnu.org/onlinedocs/libstdc++/20_util/howto.html#my_pairlt> |
|
Uses |
|
Uses |
|
Uses |
ASTtools namespace
Types
Name |
Description |
Stable ordering for variable symbols used by outlining/lowering interfaces. |
|
Store a list of non‐local "jumps" (continues, breaks) and ids. |
|
Stores a list of 'this' expressions. |
|
Stores a collection of SgVariableSymbols (var syms). |
Functions
Name |
Description |
Append a deep‐copy of statement s onto the basic block b. |
|
Append a deep‐copy of statements from a to the basic block b. |
|
Attaches a string as a new C++‐style comment to the given statement. |
|
Build the exact semantic result type of applying unary '&' to an expression of operand_type. C++ reference declarations denote their referred‐to object in an expression, so this never constructs the illegal pointer‐to‐reference type. |
|
Return the canonical declaration that identifies a function family. |
|
Collect var syms for all local variable declarations at 's'. |
|
Collect var syms declared at 'root' or below that are visible to 'target'. |
|
Collect non‐local "goto" statements. |
|
Collect non‐local "jumps" within a statement. |
|
Collect variables suitable for using pointer dereferencing |
|
Collect var syms for all variable references at 's'. |
|
Collect 'this' expressions. |
|
Collect variable references with a type which does not support =operator or copy construction. Those two support is essential for temp variables used to copy and restore parameters |
|
Collect variable references using addresses for s |
|
Removes all preprocessing information at a given position. |
|
Create a deep‐copy of an SgNode |
|
Dumps a statement's preprocessing information. |
|
Dump a symbol table. |
|
Search for the first surrounding function definition. |
|
Search for the first surrounding scope that may contain a function def. |
|
Return the function that lexically owns a function‐local named type. |
|
Returns the name of the class of a member function. |
|
Returns the unqualified name of the member function. |
|
Returns the number of function arguments, including 'this' for member functions. |
|
Returns a non‐templated, unqualified name. |
|
Inserts an '#include' into every source file, including an empty file. |
|
Returns 'true' if this node is contained in a C99‐only project. |
|
Returns 'true' if the specific function is a 'const' member function. |
|
Returns 'true' if the specified type is a 'const' object. |
|
Returns true if 'func' is a constructor. |
|
Returns true if 'func' is a destructor. |
|
Returns 'true' iff the given function is declared 'extern "C"'. |
|
Returns true iff the function's unqualified name equals the target name. |
|
Returns true iff the function's unqualified name begins with the target prefix. |
|
Returns 'true' <==> 's' is the condition of some 'if' statement. |
|
Returns true if the info is an '#if', '#ifdef', or '#ifndef'. |
|
Returns true if the info is an '#elif' or '#else'. |
|
Returns 'true' if the function is 'main'. |
|
Returns true if info is positioned after its statement. |
|
Returns true if info is positioned before its statement. |
|
Returns true if info is positioned inside its statement. |
|
Returns true iff the given function declaration is 'static'. |
|
Returns 'true' if the scope is the '::std' namespace. |
|
Returns 'true' <==> 's' is the conditional selector of some 'switch' statement. |
|
|
|
Returns 'true' <==> 's' is the condition of some 'while' or 'do ... while' statement. |
|
Moves 'after' preprocessing information. |
|
Moves 'before' preprocessing information. |
|
Moves 'inside' preprocessing information. |
|
Move statements from one basic‐block to another. |
|
Moves preprocessingInfo of stmt2 to stmt1. |
|
Returns a newly allocated file info object for transformation nodes. |
|
Pastes preprocessing information at the back of a statement. |
|
Pastes preprocessing information at the front of a statement. |
|
Publish the exact use‐site pack‐expansion surface for an argument that references a template parameter. A type parameter's SgTemplateType owns the ellipsis in its declaration; the SgTemplateArgument owns the ellipsis in a generated template‐id use. |
|
Replaces one statement with another. |
|
Return true when two declarations belong to the same function family. |
|
Reset source position as transformation for the current node only |
|
Reset source position as transformation recursively |
|
Convert a variable symbol set to a string‐friendly form for debugging. |
|
Convert a node's location to a string‐friendly form. |
|
Create an SgBasicBlock shell around an existing SgBasicBlock. |
AstDOTGenerationExtended_Defaults namespace
AstQueryNamespace namespace
Inherited attribute for AstQuery class.
Namespaces
Name |
Types
Name |
Description |
* The class class AstQuery traverses the memory pool and performs the action specified in a functional on every node. The return value is a list of SgNode*.***** |
|
Simplifies development of queries on the AST that return lists of AST nodes. |
|
Enums
Name |
Functions
Name |
Description |
|
|
|
|
|
AstQueryNamespace::detail namespace
AstUtilInterface namespace
Types
Name |
Description |
Stores dependence entries in a table. |
|
Enums
Name |
Functions
Name |
Description |
Collect non‐local variables that are read and written within the given ast. This is a wrapper of the ComputeAstSideEffects function to provide a more convenient user interface. Returns true if the returned variables are guaranteed to be complete; returns false otherwise. |
|
Returns the collection of memory references modified, read, and invoked (as function calls) as potential side effects of running the given ast, inside the given scope. |
|
Returns a string that uniquely identifies the given variable. If provided with a dict_table, save the file name and line number for the signature. |
|
Stream insertion operator |
CLANG_ROSE_Graph namespace
Variables
Name |
CPreproc namespace
Types
Name |
Description |
Stores a preprocessor '#if' directive and nested directives. |
|
Find the '#if' case surrounding a given node. |
|
Traversal to extract '#if' directives. |
|
Stores lists of directives. |
Functions
Name |
Description |
|
|
Extracts the '#if' directive structure from a project. |
|
Locate the '#if' directive context at a node. |
CallTargetSet namespace
Functions
Name |
Description |
Populates functionList with declarations of all functions that may get called. This is basically a wrapper around getPropertiesForExpression. |
|
Populates functionList with definitions of all functions that may get called. This is basically a wrapper around getPropertiesForExpression that extracts the SgFunctionDefinition from the Properties object. This returns only callees that have definitions ‐ to get all possible callees, use getDeclarationsForExpression |
|
Returns the list of all constructors that may get called via an initialization. |
|
Finds all functions that match the function type of pointerDerefExp |
|
Checks if the functionDeclaration (node) matches functionType |
|
Return the source expression that denotes a callee after validating and traversing only compiler‐synthesized implicit callee conversions. Explicit casts and all non‐conversion call surfaces remain in the returned syntax. |
CommandlineProcessing namespace
Command line processing utility functions. Functions in this namespace are in the ROSE Utilities library and
Types
Name |
Description |
RAII storage for argv‐style arguments without heap allocation. |
|
Language state active at one exact driver input operand. |
Enums
Name |
Description |
Exact language family selected by Clang's ordered |
Functions
Name |
Description |
Add another valid source file suffix. |
|
Add the strings in argList to the command line. |
|
Return the ordered |
|
Return the exact Clang driver language selected by a supported suffix. |
|
Release argv allocated by generateArgcArgvFromList. |
|
Convert an argc‐argv pair into a string vector. |
|
Separate a string into individual parameters. |
|
Convert a string vector back to an argc‐argv pair. |
|
Looks for inputPrefix prefixed options. |
|
Looks for inputPrefix‐prefixed options. |
|
Find all options matching the given prefix. |
|
Build the list of isolated file names from the command line. |
|
Build a string from the argList. |
|
Search 'argv' for an option like optionPrefixOption. |
|
|
|
Remove file names specified in filenameList from argv. |
|
Remove all options matching a specified prefix. |
|
Remove all options matching a specified prefix along with their values. |
|
Build a per‐translation‐unit argv without changing ordered option state. |
|
Enforce the final per‐translation‐unit backend compile contract. |
|
Validate every split or joined Clang |
Variables
ConstantFolding namespace
Types
Functions
Name |
Description |
Calculate the result of a binary operation on two constant float‐kind values, |
|
string type and binary operator: the allowed operations on string values |
|
This is the external interface of constant folding: |
|
DUVariableAnalysisExt namespace
Dbg namespace
Functions
Name |
Description |
Generate dot graphs for an analysis: it handles intra‐procedural analysis for now. |
|
Variables
Name |
DominatorTreesAndDominanceFrontiers namespace
Types
Name |
Description |
This class constructs a control flow graph for a given function definition. It builds off of information provided by CFGImpl.h, and adds some additional bookkeeping information (such as entry and exit points, as well as having a separate node for each statement in the graph). |
|
This class is a node in the CFG. It can either be an SgNode or it can be a special entry or exit node (since there are some empty blocks in the CFG). |
|
This class provides a uniform view of the CFG dissregarding the direction of the CFG‐traversal (forward/backward) |
|
TemplatedDominatorTree constructs a dominator/postdominator tree for a cfg. For the template parameter any cfg following Jeremias interface may be used |
|
STD‐Dominator‐Tree |
Enums
Name |
IncludeFileGraph namespace
Functions
Variables
Name |
Inliner namespace
Variables
Name |
IntegerOps namespace
Bit‐wise operations on integers.
Types
Functions
Name |
Description |
Determines if one bitmask is a subset of another. Returns true if the bits set in the first argument form a subset of the bits set in the second argument. |
|
Counts how many bits are clear (zero). |
|
Counts how many bits are set (one). |
|
Extract bits from a value. Bits |
|
|
|
Returns true if the value is a power of two. Zero is considered a power of two. |
|
Returns the base‐2 logorithm of |
|
Optionally returns the zero‐origin position of the most significant set bit. Returns nothing if no bits are set. |
|
Rotate the bits of the value left by count bits. |
|
Rotate bits of the value right by |
|
Shifts bits of |
|
Shifts bits of |
|
Shifts bits of |
|
Create a shifted value. The return value is created by shifting |
|
Bitmask with bit |
|
Returns true if the sign bit is set, false if clear. |
|
Sign extend value. If the bit |
|
IntegerOpsPrivate namespace
MangledNameSupport namespace
Types
Name |
Functions
Variables
MaxSourceExtents namespace
Functions
NameQuery namespace
Functions
Name |
Description |
|
|
|
|
**** |
|
NewCallGraph namespace
NodeQuery namespace
Types
Functions
Name |
Description |
|
|
|
|
|
Using Namespace Directives
Name |
NumberQuery namespace
Functions
Name |
Description |
|
|
|
|
**** |
OmpSupport namespace
Types and functions to support OpenMP
Types
Name |
Description |
Exact identities produced when an outlined OpenMP clause‐variable record is transferred through one deep‐copy transaction. |
|
A driver to traverse AST trees and invoke individual translators for OpenMP constructs, (not in use) Postorder is preferred. |
|
Enums
Name |
Description |
Typed allowlists for the structural path from an OpenMP directive's exact body edge to its associated loop. Worksharing and SIMD constructs permit only transparent singleton basic blocks. Loop transformations additionally permit nested, supported loop‐transformation directives; semantic OpenMP regions and attributed statements are never transparent wrappers. |
|
Functions
Name |
Description |
Add a variable into a non‐reduction clause of an OpenMP statement, create the clause transparently if it does not exist |
|
Attach a transformation‐generated OpenMP clause, assigning exact source‐order provenance when the directive came from combined syntax. |
|
Attach an OpenMP clause to directive |
|
Special handling when trying to build and insert a variable declaration into a BB within Fortran OpenMP code |
|
Build a reference to a generated Fortran outlined procedure through its exact semantic‐only publication. |
|
Build a non‐reduction variable clause for a given OpenMP directive. It directly returns the clause if the clause already exists |
|
Collect all variables from OpenMP clauses associated with an omp statement: private, reduction, etc |
|
|
|
Collect threadprivate variables within the current project, return a set to avoid duplicated elements. No input parameters are needed since it finds match from memory pools |
|
Create an initial value according to reduction operator type |
|
Analysis helpers |
|
A helper function to generate implicit or explicit task for either omp parallel or omp task |
|
Generate XOMP loop schedule next function's name |
|
Generate XOMP loop schedule start function's name |
|
Get OpenMP clauses from an eligible OpenMP statement |
|
Collect expression from given types of OpenMP clauses associated with an omp statement: private, reduction, etc |
|
|
|
Find an enclosing parallel region or function definition's body |
|
Return the exact source‐language identifier for one LLVM OpenMP runtime entry point. C/C++ use the ABI spelling directly; Fortran uses the standards‐conforming REX adapter spelling exported by kmpc_fortran_wrappers.c. Non‐__kmpc names are contract violations. |
|
Return a reduction variable's reduction operation type |
|
Check if an OpenMP statement has a clause of type vt |
|
Insert runtime init and terminate routines to main() entry |
|
Insert #include "xxx.h", the interface of a runtime library to the compiler |
|
Check if an OpenMP construct is a clause |
|
Check if an OpenMP construct is a dependence type for omp task depend |
|
Check if an OpenMP construct is a directive |
|
Check if an OpenMP directive has a structured body |
|
Check if the construct is a Fortran directive which can (optionally) have a corresponding END directive |
|
Check if the construct is a Fortran END ... directive |
|
|
|
Check whether a SgNode is inside omp target |
|
Return true when an OpenMP statement is a syntax‐only construct selector owned by a MATCH/WHEN clause rather than an executable AST statement. |
|
Check if an OpenMP construct is a reduction operator |
|
Check if a variable access is a shared access , assuming it is already within an OpenMP region. |
|
Check if a variable is a threadprivate variable. It will search for all threadprivate directives to find the answer. |
|
The top level interface to translate OpenMP directives |
|
Patch up firstprivate variables for omp task. The reason is that the specification 3.0 defines rules for implicitly determined data‐sharing attributes and this function will make the firstprivate variable of omp task explicit. |
|
|
|
makeDataSharingExplicit() can call some of existing functions for some work in OmpSupport namespace by Hongyi 07/16/2012 TODO: add a function within the OmpSupport namespace, the function should transform the AST, so all variables' data‐sharing attributes are explicitied represented in the AST. ROSE has dedicated AST nodes for OpenMP directives and the associated clauses, such as private, shared, reduction. |
|
Remove one or more clauses of type vt |
|
|
|
Replace all variable references in a set by pointers to the variable |
|
Return the one exact loop owned by |
|
Resolve one original directive, all of the clause variable's exact expression identities, and its pointer‐backing symbol through the deep‐copy identity map. The copied clause expressions must agree on exactly one symbol/declaration. Missing, identity, ambiguous, or wrongly typed mappings are hard errors; spelling and scope lookup are never used. |
|
Require |
|
Evaluate a language‐valid, target‐ABI integral constant and require it to be in [1, maximum]. Unsupported, malformed, volatile, cyclic, or undefined constant expressions are hard errors; no textual parsing or fallback value is permitted. |
|
|
|
Translate omp atomic |
|
Translate omp barrier |
|
Translate omp critical |
|
Translate omp flush |
|
Translate omp for or omp do loops |
|
Translate omp master |
|
Translate omp metadirective |
|
Translate the ordered directive (not the ordered clause) |
|
Translate omp parallel |
|
Translate omp sections |
|
Translate omp simd |
|
Translate omp single |
|
Translate "omp target" |
|
Translate "omp target data" |
|
Translate omp for or omp do loops affected by the "omp target" directive, using naive 1‐to‐1 mapping Liao 1/28/2013 |
|
Translate omp for or omp do loops affected by the "omp target" directive, using a round robin‐scheduler Liao 7/10/2014 |
|
Translate omp parallel under "omp target" |
|
Translate omp task |
|
Translate omp taskwait |
|
Translate omp threadprivate |
|
Translate omp tile |
|
Translate omp unroll |
|
Translate OpenMP variables associated with an OpenMP pragma, such as private, firstprivate, lastprivate, reduction, etc. bb1 is the translation generated code block in which the variable handling statements will be inserted. Original loop upper bound is needed for implementing lastprivate (check if it is the last iteration). withinAcceleratorModel means if we only translate private() variables, used to support accelerator model |
|
Check if an omp for/do loop use static schedule or not, including: default schedule, or schedule(static[,chunk_size]) |
Variables
OpenAnalysis namespace
Types
Name |
Description |
BaseGraph is the abstract base class (the "interface") for a general graph. It defines graph properties common to directed and undirected graphs. It leaves out some loose ends in the interface: 1. A node has no notion of incident edges or neighboring nodes because the number of kinds of incident edges or neighboring nodes is dependent upon the graph being directed or undirected. 2. For the same reason, the method delete(node) cannot delete any incident edges. Therefore the directed or undirected graph must override it with a more complete version. Similarly, the method delete(edge) cannot delete the edge from the list(s) of the nodes involved. 3. In an analogous manner, the method add(edge) must be overridden with a more complete version that adds the edge into the records of the nodes involved, if needed. |
|
CFG is a DGraph (directed graph) with enhanced nodes and edges. Each node in the CFG points to a list of statements that together represent a basic block. The entire program would be represented by a set of CFGs, one for each subroutine, and one for the main program. |
|
DGraph is the base class for a general directed graph (DGraph) that is in turn derived from BaseGraph. Algorithms that operate upon abstract directed graphs should, normally, use only this base DGraph class for maximum portability. |
|
Exception is the abstract base class for all exceptions that can be thrown by Mint programs. |
|
The Iterator abstract base class defines the basic properties of an iterator. |
|
Enums
Name |
Functions
Using Declarations
Name |
Outliner namespace
Namespaces
Name |
Types
Name |
Description |
Stores the main results of an outlining transformation. |
Functions
Name |
Description |
Generates a function call parameter list using a set of symbols |
|
Computes the set of variables in 's' that need to be passed to the outlined routine (semantically equivalent to shared variables in OpenMP) |
|
Accept a set of command line options to adjust internal behaviors |
|
Establish the runtime‐header dependency required by a generated dlopen call. Source directives for a separately compiled outlined‐function library must be captured first so this call‐site‐only dependency cannot leak into it. |
|
Generates a call to an outlined function. |
|
Create a unique outlined‐function's wrapper argument name for the specified statement. |
|
Create a unique outlined‐function name for the specified statement. |
|
the lib source file's name convention is rose_input_lib.[c|cxx]. |
|
Generate a new source file under the same SgProject as target, the file's base name is file_name_str. Suffix is automatically generated according to the file suffix of s |
|
Generate packing (wrapping) statements for the variables to be passed |
|
Generate a struct declaration to wrap all variables to be passed to the outlined function There are two ways to wrap a variable: Using its value vs. Using its address (pointer type) |
|
Obtain the file handle to the separated source file storing outlined functions. This file will be compiled to .so dynamically loadable library. target is the input code block for outlining. It provides SgProject and input file name info. the lib source file's name convention is rose_input_lib.[c|cxx]. |
|
Return whether a pragma is the outliner's consumed control directive. |
|
Returns true iff the statement is "outlineable." |
|
|
|
Outlines all regions marked by outlining pragmas. |
|
Outlines the given basic block into a function named 'name'. |
|
Validate and adjust analysis settings. |
Variables
Name |
Description |
A set of flags to control the internal behavior of the outliner |
|
Outliner::Preprocess namespace
Functions
Name |
Description |
Sanity check and patch up outliner options |
|
Convert the "plain‐old" statement into an SgBasicBlock. This normalization simplifies outlining of single statements. |
|
Gathers non‐local declarations into the local scope. |
|
Normalizes outline targets that are variable declarations, returning a new SgBasicBlock to outline. |
|
Preprocesses the outline target and returns an equivalent SgBasicBlock to outline. |
|
Constant propagation for static member variables |
|
Preprocess non‐local control flow for outlining. |
|
Transform '#if' directive structure. It is possible that certain preprocessor directives may straddle the boundaries of a basic block. This routine attempts to detect and transform these instances so that the block may be safely outlined. |
|
Canonicalize references to 'this'. |
POET namespace
Types
Name |
ProcessExpression namespace
Functions
Name |
Description |
Helper Function to process Left Hand Side of an Expression |
|
Helper Function to process Right Hand Side of an Expression |
ROSE_Analysis namespace
Functions
Name |
ROSE_Statistics namespace
This is a mechanism for reporting statistical data about the AST, subtrees, and IR nodes.
ROSE_token_ids namespace
Rose namespace
Namespaces
Name |
Description |
Bit operations on unsigned integers. |
|
Functions for operating on files in a filesystem. |
|
Functions for operating on strings. |
|
Types
Name |
Description |
A nested logging mechanism to facilitate debbuging of tree traversal. |
|
A global registry used in conjunction with static constructors to make pluggable components (like targets or garbage collectors) "just work" when linked with an executable. |
|
Traits for registry entries. If using other than SimpleRegistryEntry, it is necessary to define an alternate traits class. |
|
A simple registry entry which provides only a name, description, and no‐argument constructor. |
|
A range adaptor for a pair of iterators. |
|
Functions
Name |
Description |
get the sourceDirectory directory |
|
get the filename from the full filename |
|
Functions to move to SgStatement object in SAGE III later |
|
get the current directory |
|
Convenience function for iterating over sub‐ranges. |
|
Variables
Name |
Description |
Invalid array index. |
|
Effectively unlimited size. |
|
Rose::AstJson namespace
Types
Name |
Enums
Name |
Functions
Name |
Variables
Name |
Rose::BitOps namespace
Bit operations on unsigned integers.
Functions
Name |
Description |
Generate a value with all bits set or cleared. |
|
Set or clear the low‐order bits. |
|
Extract a single bit. |
|
Extract a single bit. |
|
Extract part of a value. |
|
Extract part of a value limited by width. |
|
Extend or truncate a value. |
|
Sign extend or truncate a value. |
|
Generate a value with high order bits set. |
|
Generate a value with low order bits set. |
|
Generate a mask. |
|
Generate a mask without affecting other bits. |
|
Most significant bit. |
|
Most significant bit within lsb region. |
|
Number of bits in a type or value. |
|
Generate a single‐bit mask. |
|
Generate a single‐bit mask without affecting the high‐order bits. |
|
Replicate low‐order bits to fill return value. |
|
Replicate low‐order bits to fill region without affecting other bits. |
|
Rotate bits left. |
|
Rotate low‐order bits left without affecting others. |
|
Rotate bits right. |
|
Rotate low‐order bits right without affecting others. |
|
Combine two values based on a bit mask. |
|
Left shift a value. |
|
Left shift part of a value without affecting the rest. |
|
Right shift a value. |
|
Right shift part of a value without affecting the rest. |
|
|
|
Sign extend part of a value to the full width of the src type. |
|
Sign extend part of value without affecting other bits. |
Rose::Builder namespace
Namespaces
Name |
Rose::Builder::Templates namespace
Rose::ClangFrontend namespace
Types
Name |
Functions
Rose::Cmdline namespace
Enums
Name |
Description |
Constants to be used with CommandlineProcessing::isOptionWithParameter to specify the removeOption argument. |
|
Functions
Name |
Description |
Convert |
|
Removes "‐rose:" options, or transforms them into their associated compiler options. Whereas, this ROSE‐only option is completely removed: |
|
Variables
Name |
Rose::Cmdline::Fortran namespace
Functions
Name |
Description |
Process all Fortran commandline options. |
|
Rose::Cmdline::Gnu namespace
Functions
Rose::Cmdline::Unparser namespace
Functions
Name |
Description |
Process all Unparser‐specific commandline options, i.e. ‐rose:unparser. |
|
Rose::FileSystem namespace
Functions for operating on files in a filesystem.
Types
Name |
Description |
Predicate returning true for matching names. |
|
Iterate over directory contents non‐recursively. |
|
Name of entities in a filesystem. |
|
Iterate recursively into subdirectories. |
Functions
Name |
Description |
Copy a file. |
|
Copy files from one directory to another. |
|
Recursively copy files. |
|
Create a temporary directory. |
|
Entries within a directory. |
|
Recursive list of names satisfying predicate. |
|
Return a list of all rose_* files |
|
Predicate returning true for existing directories. |
|
Predicate returning true if path exists. |
|
Predicate returning true for existing regular files. |
|
Predicate returning inverse of |
|
Predicate returning true for existing symbolic links. |
|
Make path absolute. |
|
Normalize a path name. |
|
Make path relative. |
|
Load an entire file into an STL container. |
|
Convert a path to a string. |
|
Variables
Name |
Description |
Pattern to use when creating temporary files. |
Rose::FortranLineWrapSupport namespace
Rose::Frontend namespace
Rose::MemPool namespace
Functions
Name |
Rose::OpenMP namespace
Namespaces
Name |
Functions
Rose::OpenMP::Detail namespace
Rose::StringUtility namespace
Functions for operating on strings.
Types
Name |
Description |
String with source location information. |
|
A vector of strings with line numbers and file names. |
Enums
Name |
Description |
Find file names non‐recursively. |
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Functions
Name |
Description |
Convert an interval of virtual addresses to a string. |
|
Convert a virtual address to a string. |
|
Escapes characters that are special to the Bourne shell. |
|
Escapes characters that are special to C/C++. |
|
Unescapes C++ string literals. |
|
Center a string in a field. |
|
Determine whether a file is source code or system library. |
|
Convert to lower case. |
|
Replace all occurrences of a string with another string. |
|
Escapes characters that are special in CSV tables. |
|
Convert base‐64 to binary. |
|
Edit distance between two directory names. |
|
Convert binary data to base‐64. |
|
Escapes line feeds and double quotes. |
|
Get the file name suffix (extension) without the leading dot. |
|
Normalizes line termination. |
|
Compute a checkshum. |
|
Get the absolute path from the relative path. |
|
Obtain operating system type information. |
|
Returns all but the last component of a path in a filesystem. |
|
Convert an ASCII hexadecimal character to an integer. |
|
Name of the home directory. |
|
Escapes HTML special characters. |
|
Convert an integer to a hexadecimal string. |
|
Determines whether one string contains another. |
|
Returns true if the string ends with line termination. |
|
Join strings as if they were English prose. |
|
Join individual items to form a single string. |
|
Escapes characters that are special inside a JSON string. |
|
Left justify a string to specified width. |
|
|
|
Converts a multi‐line string to a single line. |
|
|
|
Concatenate vectors of strings with source location. |
|
Append strings with source location information to vector of such. |
|
Simple wrapper for Unix popen command. |
|
Insert a prefix string before every line. |
|
Reads entire text file. |
|
Reads an entire text file. |
|
Reads words from a file. |
|
Remove ANSI escape characters. |
|
Remove redundant and blank lines. |
|
Replace a pattern with another one in a string |
|
Right justify a string to specified width. |
|
Splits strings into parts. |
|
Splits string into substring based on a separator character. |
|
Split a string into substrings at line feeds. |
|
Remove leading dots. |
|
Get the file name without the ".suffix". |
|
Returns the last component of a path in a filesystem. |
|
Convert a number to a binary string. |
|
Convert a number to a hexadecimal and decimal string. |
|
Generate C preprocessor #line directives. |
|
Split a string into a list based on a separator character. |
|
Trims white space from the beginning and end of a string. |
|
Expand horizontal tab characters. |
|
Create a file. |
|
Stream insertion operators |
Rose::TestOutput namespace
Namespaces
Name |
Functions
Name |
Rose::TestOutput::detail namespace
Functions
Rose::Unique namespace
Functions
Name |
SageBuilder namespace
High level SAGE III AST node and subtree builders.
Types
Name |
Description |
Build a Fortran subroutine or procedure |
|
Exact structural ownership selected by named declaration producers. |
|
Exact, typed structural ownership established by function‐declaration builders. Invalid kind/owner combinations cannot be constructed. |
|
Exact semantic and canonical symbol scopes for a template‐class surface. |
|
Build a typedef declaration, such as: typedef int myint; typedef struct A {..} s_A; |
Enums
Functions
Name |
Description |
Transfer one detached signature scope to its exact function owner. |
|
Transfer a detached declarator‐local source scope to its exact non‐function declaration owner. The scope's declarations keep their independent semantic symbol scopes; only structural source ownership changes. |
|
Own a semantic‐only declaration without adding it to source emission. |
|
Attach semantic‐only declaration‐scope infrastructure to its exact structural owner. Both the container and scope must already carry exact semantic provenance; this operation never publishes a physical output owner or reclassifies their subtree. |
|
Attach a fresh source‐written class/enum declaration to its exact function declarator scope without changing its semantic symbol scope. This is the construction‐time structural transaction used by Clang TypeLoc producers; it does not synthesize source provenance or transfer an existing owner. |
|
Begin construction of a non‐function declaration whose TypeLoc owns nested source‐written tags. Both nodes must be fresh and the scope must be empty; finishSourceDeclaratorScopeConstruction() hard‐validates the populated source children before the declaration can be published. |
|
Build an Actual Argument Expression |
|
Build an aggregate initializer |
|
|
|
Build a source‐anonymous structure with an explicit, non‐empty semantic identity. The internal name is never emitted as source. |
|
|
|
Build a NULL statement |
|
Build the rhs of a variable declaration which includes an assignment |
|
Build an assignment statement from lefthand operand and right hand operand |
|
This version does not recursively reset the file info as a transformation. |
|
Build Fortran attribute specification statement |
|
Build a source‐backed Fortran attribute specification statement whose exact file information will be published by the frontend. |
|
Build a bfloat16 |
|
DQ (5/6/2013): Added build functions to support SgBaseClass construction. |
|
Build a SgBasicBlock, setting file info internally |
|
Build a SgBasicBlock and set its parent. This function does NOT link the parent scope to the block. |
|
Build the GNU omitted‐middle conditional |
|
Template function to build a binary expression of type T, taking care of parent pointers, file info, lvalue, etc. Available instances include: buildAddOp(), buildAndAssignOp(), buildAndOp(), buildArrowExp(),buildArrowStarOp(),buildAtOp, buildAssignOp(),buildBitAndOp(),buildBitOrOp(),buildBitXorOp(),buildCommaOpExp(), buildConcatenationOp(),buildDivAssignOp(),buildDivideOp(),buildDotExp(),buildEqualityOp(),buildExponentiationOp(),buildGreaterOrEqualOp(),buildGreaterThanOp(),buildIntegerDivideOp(),buildIorAssignOp(),buildLessOrEqualOp(),buildLessThanOp(),buildLshiftAssignOp(),buildLshiftOp(),buildMinusAssignOp(),buildModAssignOp(),buildModOp(),buildMultAssignOp(),buildMultiplyOp(),buildNotEqualOp(),buildOrOp(),buildPlusAssignOp(),buildPntrArrRefExp(),buildRshiftAssignOp(),buildRshiftOp(),buildReplicationOp,buildScopeOp(),buildSubtractOp()buildXorAssignOp() The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros. |
|
Template function to build a binary expression of type T, taking care of parent pointers, but without file‐info. Available instances include: buildAddOp(), buildAndAssignOp(), buildAndOp(), buildArrowExp(),buildArrowStarOp(),buildAtOp, buildAssignOp(),buildBitAndOp(),buildBitOrOp(),buildBitXorOp(),buildCommaOpExp(), buildConcatenationOp(),buildDivAssignOp(),buildDivideOp(),buildDotExp(),buildEqualityOp(),buildExponentiationOp(),buildGreaterOrEqualOp(),buildGreaterThanOp(),buildIntegerDivideOp(),buildIorAssignOp(),buildLessOrEqualOp(),buildLessThanOp(),buildLshiftAssignOp(),buildLshiftOp(),buildMinusAssignOp(),buildModAssignOp(),buildModOp(),buildMultAssignOp(),buildMultiplyOp(),buildNotEqualOp(),buildOrOp(),buildPlusAssignOp(),buildPntrArrRefExp(),buildRshiftAssignOp(),buildRshiftOp(),buildReplicationOp(),buildScopeOp(),buildSubtractOp()buildXorAssignOp() The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros. |
|
|
|
Build a bool value expression, the name convention of SgBoolValExp is little different from others for some unknown reason |
|
Build an braced initializer |
|
Build a break statement |
|
Build a case option statement |
|
|
|
Build a catch statement. |
|
Build an initial sequence of Catch blocks containing 0 or 1 element. |
|
DQ (11/7/2009): Added function to build C++ class (builds both the non‐defining and defining declarations; in that order). |
|
Build a generic class declaration statement (SgClassDeclaration or subclass) with a class declaration and definition (creating both the defining and nondefining declarations as required. |
|
Build class pointer |
|
Some support for building class template instantiation declarations. Note, the template is not actually instantiated, but a `forward declaration' node is created. |
|
Build a Fortran colon‐shape expression, set file info as the default one. |
|
No file info version of buildColonShapeExp(). File info is to be set later on. |
|
Build and attach a comment with an explicit lexical comment style. It is a wrapper of SageInterface::attachComment(). |
|
Build a Fortran Common statement |
|
Build a Fortran common block, possibly with a name |
|
Build a complex type |
|
Build function for compound literals (uses a SgVariableSymbol and is similar to buildVarRefExp_nfi()). |
|
Build a conditional expression ?: |
|
Build a const type. |
|
Build a const/volatile type qualifier |
|
Build a const volatile type. |
|
Build a continue statement |
|
Build and attach #define XX directives, pass "#define xxx xxx" as content. |
|
Build a CUDA kernel call expression (kernel<[config]>(parameters)) |
|
Build a CUDA kernel execution configuration (<blocks, shared, stream>) |
|
Build a decltype reference type |
|
Build a scope statement. Used to build SgNonrealDecl and SgNonrealType |
|
Build a default option statement |
|
Build a function declaration with a function body |
|
Build a defining ( non‐prototype) member function declaration |
|
Build a delete statement |
|
Build an SgDerivedTypeStatement Fortran derived type declaration with a class declaration and definition (creating both the defining and nondefining declarations as required). |
|
Build do‐while statement |
|
Build a double value expression |
|
Build a detached empty declaration with one explicit lexical role. This builder never consults the ambient scope stack; callers must publish the result through one explicit structural ownership transaction and must distinguish a real |
|
Build an enum, It is also a declaration statement in SAGE III |
|
Build one enum definition over an explicit canonical type identity. |
|
Build a SgExprListExp, used for function call parameter list etc. |
|
Build a SgExprStatement, set File_Info automatically |
|
AST high level builders for others |
|
Build a float16 |
|
Build a float32 |
|
Build a float64 |
|
Build a float value expression by converting the string |
|
Build a for init statement |
|
Build a for statement, assume none of the arguments is NULL |
|
Build a Fortran continue statement |
|
Build a Fortran do construct |
|
Build a Fortran function reference with separate resolved‐procedure and source‐visible binding identities. |
|
Build a type based on Fortran's implicit typing rules. Currently this interface does not take into account possible implicit statements that change the rules. |
|
Build Fortran include line |
|
Build a type based on the Fortran kind mechanism |
|
Build a C++11 type‐only friend declaration, such as |
|
|
|
|
|
|
|
|
|
|
|
|
|
Build an independent generated prototype signature from an existing parameter list. Default arguments remain owned by the source declaration; the result contains fresh transformation identities with the same names, types, pack roles, and qualification metadata. This is the generated‐source counterpart to buildSemanticFunctionParameterList(). |
|
Build an output‐only SgSourceFile node and attach it to SgProject The file is constructed with an empty global scope without creating an input file or invoking a frontend. The output filename is canonicalized to one absolute translation‐unit identity before construction and determines the source language. The same identity owns the file command line, source positions, and unparse output. If project is null, a new SgProject is created and can be retrieved with SgFile::get_project(). |
|
|
|
Build a goto statement from a label expression, supporting only C/C++ and not Fortran cases |
|
Build if statement |
|
Build an imaginary type |
|
e.g the scope of arguments of functions are different for defining and nondefining functions. |
|
Build an integer value expression |
|
Build an integer value expression by converting the string |
|
Build a Fortran numeric label ref exp |
|
Note that the scope of a label statement is special. It is SgFunctionDefinition, not the closest scope statement such as SgBasicBlock. |
|
DQ (9/3/2014): Adding support for C++11 Lambda expressions |
|
Build a long integer value expression |
|
Build a long long integer value expression |
|
|
|
DQ (8/19/2012): Refactored some of the code supporting construction of the SgMemberFunctionType. |
|
Build ‐‐ expression, Sgop_mode is a value of either SgUnaryOp::prefix or SgUnaryOp::postfix |
|
Build a modifier type. |
|
Build a Fortran module declaration. |
|
DQ (4/30/2010): Added support for building nop statement using asm statement Building nop statement using asm statement |
|
tps (09/02/2009) : Added support for building namespaces |
|
Build one namespace declaration with explicit semantic and lexical ownership. Source‐lexical declarations require source‐spelled fragments and a positive producer‐wide namespace order in the final expanded token stream; generated and semantic‐only declarations require no order. |
|
Build noexcept operator expression with an expression parameter |
|
DQ (11/7/2009): Added functions to build C++ class. |
|
Build a class first nondefining declaration, without file info. |
|
Build the canonical semantic forward declaration for a Fortran derived type. A derived‐type forward has no source surface or definition and must be completed later by exactly one buildDerivedTypeStatement() call. |
|
Build an enum first nondefining declaration, without file info |
|
|
|
Build a prototype member function declaration |
|
Build a nondefining SgProcedureHeaderStatement, handle function type, symbol etc transparently |
|
buildNondefiningTemplateClassDeclaration() |
|
DQ (11/29/2011): Adding template declaration support to the AST. |
|
Build one nondefining redeclaration of an existing template class. The canonical declaration is required explicitly; the redeclaration reuses its exact type and symbol and never publishes another symbol. |
|
Build a declaration of a non‐real class or class‐member in an explicit, non‐null lexical declaration scope. A null child scope requests creation of a new owned child declaration scope. |
|
Build a reference to the non‐real declaration of a member of a non‐real class |
|
Build a non real type used for template parameter. Internally a SgNorealDecl is also built. |
|
Build a typed null‐expression placeholder, set file info as the default one. |
|
No file info version of buildNullExpression(). File info is to be set later on. |
|
Build a NULL statement |
|
DQ (7/31/2014): Adding support for C++11 nullptr const value expressions. |
|
Build ++x or x++ , specify prefix or postfix using either SgUnaryOp::prefix or SgUnaryOp::postfix |
|
Pei‐Hung (06/30/2023): support for SgPointerMemberType |
|
Build a pointer type |
|
Build SgPragma |
|
Build pragma declaration, handle SgPragma and defining/nondefining pointers internally |
|
Build a defining Fortran procedure with an explicit lexical source form. |
|
Complete a bottom‐up Fortran procedure construction around its exact preconstructed definition and body. The definition is consumed exactly once and must already carry final source classification and scope identity. |
|
Build a reference type |
|
Build a restrict type. |
|
Build a return statement |
|
Build a rvalue reference type |
|
Build and publish one named semantic‐only variable declaration under the scope's exact auxiliary owner. Structural ownership is established before the variable symbol is inserted, so copied scope symbol tables can map the symbol only to an attached declaration basis. |
|
Build an independent semantic‐only signature from an existing parameter list. Default arguments remain owned by the source declaration; the result contains fresh parameter identities with the same names, types, pack roles, and qualification metadata. |
|
Build an initialized name that has no independently written source surface. The result is classified and validated as exact frontend semantic output at this producer; callers must not repair its provenance after attachment. |
|
Build a semantic non‐real dependent type (optionally with template arguments). Every structurally owned located template‐argument node must be unclassified or already have exact compiler‐generated semantic provenance. Internally a SgNonrealDecl is also built. |
|
Build a signed char |
|
|
|
Build a SgSourceFile node and attach it to SgProject The input file will be loaded if exists, or an empty one will be generated from scratch transparently. Output file name is used to specify the output file name of unparsing. The final SgFile will be inserted to project automatically. If not provided, a new SgProject will be generated internally. Using SgFile‐>get_project() to retrieve it in this case. |
|
Build a GNU statement expression |
|
DQ (7/25/2014): Adding support for C11 static assertions. |
|
Build a StmtDeclarationStmt |
|
DQ (8/21/2010): We want to move to the new buildStringType( SgExpression*,size_t) function over the older buildStringType() function. |
|
Build a structure, It is also a declaration statement in SAGE III |
|
Build a SgSubscriptExpression, used for array shape expressions. The lower bound and stride may be nullptrs |
|
Build super pointer |
|
Build a switch statement |
|
Build tempplate class declaration |
|
Build a template class definition statement |
|
Same as buildClassTemplateType(), just better name |
|
DQ (12/15/2011): Adding template declaration support to the AST. |
|
DQ (12/29/2011): Adding template declaration support to the AST. |
|
Build a template parameter, passing enum kind and SgTemplateType template_parameter_enum { parameter_undefined = 0, type_parameter = 1, nontype_parameter = 2, template_parameter = 3} |
|
Build an template parameter value expression |
|
Build a template type, used for template parameter and later argument |
|
Build and atomically publish a template variable declaration with explicit structural ownership. The semantic scope is supplied separately; sourceLexicalIn() represents an out‐of‐class definition without changing the variable entity's semantic class scope. |
|
Build this pointer |
|
Build a ThrowOp expression |
|
Build a source‐emitting transformation cast whose semantics are completely determined by its exact operand and result types. Ambiguous conversions are rejected instead of being assigned a guessed conversion kind. |
|
Build a try statement. |
|
DQ (7/24/2014): Adding support for c11 generic operands. |
|
DQ (1/25/2013): Added support for typeId operators. |
|
Build a GNU typeof operator |
|
Template function to build a unary expression of type T. Instantiated functions include:buildAddressOfOp(),buildBitComplementOp(),buildBitComplementOp(),buildMinusOp(),buildNotOp(),buildPointerDerefExp(),buildUnaryAddOp(),buildMinusMinusOp(),buildPlusPlusOp(). They are also used for the unary vararg operators (which are not technically unary operators). The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros. |
|
Template function to build a unary expression of type T with no file info. Instantiated functions include:buildAddressOfOp(),buildBitComplementOp(),buildBitComplementOp(),buildMinusOp(),buildNotOp(),buildPointerDerefExp(),buildUnaryAddOp(),buildMinusMinusOp(),buildPlusPlusOp(). They are also used for the unary vararg operators (which are not technically unary operators). The instantiated functions' prototypes are not shown since they are expanded using macros. Documentation tools do not expand these macros. |
|
Build one source‐positioned variable declaration without publishing a symbol. This is an internal transaction primitive: the caller must establish exact lexical ownership and publish the symbol before returning the declaration to application code. |
|
Build an embedded‐tag variable subtree without publishing its symbol. The frontend must attach exact redeclaration identity and publish the symbol in the same construction transaction. |
|
Build an unsigned char |
|
Build an unsigned integer |
|
Build an unsigned long long integer |
|
Build a unsigned long integer |
|
Build an unsigned short integer |
|
Build a using directive statement |
|
Build vararg op expression |
|
|
|
Build a fresh, structurally detached variable declaration in an exact semantic scope. A same‐scope declaration with the same name is a hard error; use buildVariableRedeclaration() when the prior declaration is known. |
|
Build a fresh variable declaration which is the exact physical owner of a source‐spelled class/enum definition embedded in its declarator. |
|
Build an embedded‐tag variable declaration with null frontend positions. |
|
Build a fresh variable declaration with null frontend source positions. |
|
Build variable definition |
|
Build a fresh, detached redeclaration with an explicit prior identity. |
|
Build a fresh, detached redeclaration with null frontend source positions. |
|
handle side effects of parent pointers, Sg_File_Info, lvalue etc. |
|
DQ (2/14/2019): Adding support for C++14 void value expressions. |
|
Build a volatile type. |
|
Build while statement |
|
Complete one source‐less semantic function declaration as its own definition when no distinct declaration precedes it. |
|
Remove a semantic‐only declaration ownership edge. |
|
display function for debugging |
|
Error checking the inserted snippet AST. |
|
Complete a source‐declarator scope begun by beginSourceDeclaratorScopeConstruction(). Every child must have one exact nonautonomous structural role and already‐published physical provenance. |
|
Fixup any AST moved from one file two another (references to symbols, types, etc.). |
|
Sharing IR nodes requires that the file id be added to the fileIDsToUnparse held in the Sg_File_Info object. |
|
Support to retrive the SgGlobal from the internal scope stack (error if not present in a non‐empty list, return null for empty list). |
|
Get the nonreal declaration scope associated with a declaration (if any). |
|
Get or create the nonreal declaration scope associated with a declaration. |
|
Get the current source position classification (defines how IR nodes built by the SageBuilder interface will be classified). |
|
Complete the provenance of a detached frontend source declaration before its exact declaration range is known. Fresh structural wrappers receive semantic generated provenance while already source‐positioned expression operands retain their exact immutable provenance. |
|
Classify one fresh semantic‐only expression with complete compiler‐generated provenance. Source‐positioned or partially positioned input is malformed. |
|
Classify a freshly built semantic‐only variable declaration and every structurally owned located child with exact compiler‐generated provenance. Source‐positioned or partially positioned input is malformed and aborts. |
|
Complete one source‐lexical declaration transaction whose builder used sourceLexicalPendingExactSource(). The declaration must still be detached and must already own exact physical source provenance. This operation publishes the lexical owner exactly once and never synthesizes or repairs source information. |
|
Public interfaces of the scope stack, should be stable |
|
Commit the physical identity of a parsed source‐file copy. The source file must still identify the primary file it was parsed from. Positions owned by that primary file are rebound to newFileName. Positions originating in included files retain their exact physical provenance. Incomplete, shared, or mixed source ranges are hard producer errors. |
|
Enforce the construction‐time contract shared by all expression builders whose names end in _nfi: the newly allocated root must not already own any source‐position object. This validator never clears or repairs provenance. |
|
Attach a nonreal declaration scope to a declaration. |
|
Set the current source position classification (defines how IR nodes built by the SageBuilder interface will be classified). |
|
DQ (9/16/2012): Added function to support setting the template arguments and setting their parents (and for any relevant declaration). |
|
DQ (2/11/2012): Added support to set the template name in function template instantiations (member and non‐member). |
|
DQ (9/16/2012): Added function to support setting the template parameters and setting their parents (and for any relevant declaration). |
|
Variables
Name |
Description |
intended to be a private member, don't access it directly. could be changed any time |
|
C++ SageBuilder namespace specific state for storage of the source code position state (used to control how the source code positon is defined for IR nodes built within the SageBuilder interface). |
|
Support for construction of case sensitive/insensitive symbol table handling in scopes. |
Using Namespace Directives
Name |
SageInterface namespace
Functions that are useful when operating on the AST.
Namespaces
Name |
Types
Name |
Description |
Immutable, fully checked description of one transformable C/C++ loop. |
|
Exact positive stride captured by a checked canonical‐loop plan. |
|
Add, remove,and replace AST |
|
Interface for creating a statement whose computation writes its answer into a given variable. |
|
A persistent attribute to represent a unique name for an expression |
|
One variable‐reference spelling and the exact statement that emits it. |
|
The datastructure is used as the return type for SageInterface::evaluateConstIntegerExpression(). One needs to always check whether hasValue_ is true before accessing value_ |
Enums
Name |
Description |
Function to delete AST subtree's nodes only, users must take care of any dangling pointers, symbols or types that result. |
Functions
Name |
Description |
strip off typedef and modifer types, then check if a type is a class type, excluding union type. |
|
Recognize and collect reduction variables and operations within a C/C++ loop, following OpenMP 3.0 specification for allowed reduction variable types and operation types. |
|
Function to add "C" style comment to statement. |
|
Add a step statement to the end of a loop body Add a new label to the end of the loop, with the step statement after it; then change all continue statements in the old loop body into jumps to the label |
|
Find all SgPntrArrRefExp under astNode, then add SgVarRefExp (if any) of SgPntrArrRefExp's dim_info into NodeList_t |
|
Generate unique names for expressions and attach the names as persistent attributes ("UniqueNameAttribute") |
|
Append an argument to SgFunctionParameterList, transparently set parent,scope, and symbols for arguments when possible We recommend to build SgFunctionParameterList before building a function declaration However, it is still allowed to append new arguments for existing function declarations. |
|
Append an expression to a SgExprListExp, set the parent pointer also |
|
Append an expression list to a SgExprListExp, set the parent pointers also |
|
|
|
Append a list of statements to the end of an explicit lexical scope. |
|
Append a copy ('decl') of a function ('original_statement') into a 'scope', include any referenced declarations required if the scope is within a compiler generated file. All referenced declarations, including those from headers, are inserted if excludeHeaderFiles is set to true (the new file will not have any headers). |
|
Compute the intersection set for two ASTs. |
|
Build and attach a comment with an explicit lexical comment style. |
|
Begin the one exact bottom‐up construction transaction for a detached function‐parameter scope. The scope is semantic name infrastructure and must already carry exact semantic‐only provenance. The physical output owner and semantic lookup scope are independent, explicit roles; this is required for a parameter scope nested in another detached declarative region. No parent‐chain inference is performed. |
|
Generate a non‐defining (forward) declaration from a defining function declaration. |
|
Build a nondefining declaration from an exact function definition whose structural and semantic scopes permit a prototype at the same source location. In particular, out‐of‐class member definitions are rejected: their existing in‐class declaration is the only legal prototype. Malformed or unsupported inputs are hard errors; this function never returns null. |
|
Call liveness analysis on an entire project |
|
Fix up ifs, loops, while, switch, Catch, OmpBodyStatement, etc. to have blocks as body components. It also adds an empty else body to if statements that don't have them. |
|
If the given statement contains any break statements in its body, add a new label below the statement and change the breaks into gotos to that new label. |
|
Change continue statements in a given block of code to gotos to a label |
|
Remove unused basic block IR nodes added as part of normalization. |
|
Clears the cache of scope,integer pairs for the input function. |
|
Clone one template parameter for a generated declaration. Template‐template declaration identities are copied independently, and every generated located descendant is left detached until the destination declaration publishes its exact physical output owner. |
|
Capture the primary source file's preprocessing directives in physical source order. The returned values are independent of later AST mutations. |
|
Return the exact system/application role of every direct textual include in a source file, keyed by its source spelling. A lazily absent graph root is accepted only when the exact primary preprocessing stream proves that the source has no includes. Conflicting or incomplete include‐graph ownership is a frontend invariant violation. |
|
This collects the SgLocatedNodes that are marked as modified (a flag automatically set by all set_* generated functions) (useful in debugging). |
|
This collects the statements that are marked as modified (a flag automatically set by all set_* generated functions) (useful in debugging). |
|
Collect read only variable symbols within a statement. The statement can be either of a function, a scope, or a single line statement. For accesses to members of aggregate data, we return the coarse grain aggregate mem obj by default. |
|
Collect read only variables within a statement. The statement can be either of a function, a scope, or a single line statement. For accesses to members of aggregate data, we return the coarse grain aggregate mem obj by default. |
|
Collect all read and write references within stmt, which can be a function, a scope statement, or a single statement. Note that a reference can be both read and written, like i++ |
|
Collect unique variables which are read or written within a statement. Note that a variable can be both read and written. The statement can be either of a function, a scope, or a single line statement. For accesses to members of aggregate data, we return the coarse grain aggregate mem obj by default. |
|
This collects the statements that are marked as transformed (useful in debugging). |
|
Collect variable references involving use by address: including &a expression and foo(a) when type2 foo(Type& parameter) in C++ |
|
Collect all variable references in a subtree |
|
Collect variable references together with their exact source use sites. |
|
Collect variable references in array types. The default NodeQuery::querySubTree() will miss variables referenced in array type's index list. e.g. double *buffer = new double[numItems]; |
|
Attach a parameter scope to its final declaration and consume its exact detached construction transaction. The scope remains semantic‐only while physically emitted descendants retain the transaction's explicit output owner. Missing, stale, or mismatched transactions are hard errors. |
|
Attach a detached local‐parameter scope to the requires‐expression that owns its declarative region and consume the same exact construction transaction used while translating the local parameters. |
|
Traversal to set the global map of names to node and node to names.collisions to support generateUniqueNameForUseAsIdentifier() function. |
|
Constant folding an AST subtree rooted at 'r' (replacing its children with their constant values, if applicable). Please be advised that constant folding on floating point computation may decrease the accuracy of floating point computations! It is a wrapper function for ConstantFolding::constantFoldingOptimization(). Note that only r's children are replaced with their corresponding constant values, not the input SgNode r itself. You have to call this upon an expression's parent node if you want to fold the expression. |
|
Check if a type (or any nested type) is unknown/incomplete. |
|
Variable references can be introduced by SgVarRef, SgPntrArrRefExp, SgInitializedName, SgMemberFunctionRef etc. For Dot and Arrow Expressions, their lhs is used to obtain SgInitializedName (coarse grain) by default. Otherwise, fine‐grain rhs is used. |
|
Deep copy an expression |
|
Deep copy a statement |
|
Given an expression and an exact attached insertion anchor, atomically inserts a temporary variable immediately before the anchor and publishes its symbol. The returned variable‐reference expression can be used instead of the original expression. The optional SgAssignOp reevaluates the expression. Reference types are represented by pointer temporaries. |
|
Cut preprocessing information from a source node and save it into a buffer. Used in combination of pastePreprocessingInfo(). The cut‐paste operation is equivalent to a split movePreprocessingInfo() operation and permits the destination node to be unknown during the cut operation. |
|
Verify that the exact type of a written C++ non‐type template argument can undergo the standard conversion represented by its canonical parameter type. This is deliberately narrower than general implicit conversion: it covers top‐level cv removal, qualification adjustment, array/function decay, reference binding, and null pointer conversion without treating unrelated but similarly spelled types as equivalent. |
|
Verify that a list of written C++ template arguments is the exact explicit prefix of a resolved semantic argument list. The semantic list may contain a defaulted suffix and may canonicalize source type spelling. |
|
Verify that a distinct C++ TypeLoc‐owned source type resolves to its exact canonical semantic type. This includes written template‐id graphs whose SgNonrealType identity is intentionally distinct from the resolved class or alias‐template instantiation. |
|
Generate a unique string from the source file position information |
|
Check if a defining declaration comes before of after the non‐defining declaration. |
|
A template function for deep copying a subtree. It is also used to create deepcopy functions with specialized parameter and return types. e.g SgExpression* copyExpression(SgExpression* e); |
|
Deep copy an arbitrary subtree |
|
Deep copy an arbitrary subtree and return the copy transaction's exact original‐to‐copy identity map. Consumers must use this map instead of reconstructing correspondence from traversal order or spelling. |
|
Typed frontend‐semantic counterpart to deepCopy(). |
|
Deep copy a frontend‐owned semantic subtree while preserving its exact source‐provenance classification. This is distinct from deepCopyNode(), which creates a new transformation output surface. |
|
Deep delete a sub AST tree. It uses postorder traversal to delete each child node. Users must take care of any dangling pointers, symbols or types that result. This is identical to deleteAST() |
|
Detach every symbol through the symbol table's exact ownership API. |
|
Normalize a Fortran Do loop. Make the default increment expression (1) explicit |
|
Dump information about a SgNode for debugging |
|
Dumps a located node's preprocessing information. |
|
Find the enclosing namespace of a declaration |
|
Check if the body of a 'case option' statement is a SgBasicBlock, create one if not. |
|
Check if the body of a 'catch' statement is a SgBasicBlock, create one if not. |
|
Check if the body of a 'default option' statement is a SgBasicBlock, create one if not. |
|
Check if the body of a 'do .. while' statement is a SgBasicBlock, create one if not. |
|
Check if the body of a 'for' statement is a SgBasicBlock, create one if not. |
|
Check if the body of a SgOmpBodyStatement is a SgBasicBlock, create one if not |
|
Check if the body of a 'switch' statement is a SgBasicBlock, create one if not. |
|
Check if the body of a 'while' statement is a SgBasicBlock, create one if not. |
|
Check if the false body of a 'if' statement is a SgBasicBlock, create one if not when the flag is true. |
|
Check if the true body of a 'if' statement is a SgBasicBlock, create one if not. |
|
Ensure a located node has the file‐info objects required before marking it as a transformation/output subtree. |
|
The function tries to evaluate const integer expressions (such as are used in array dimension sizes). It follows variable symbols, and requires constness. |
|
Return an exact constant trip count when both bounds are exact integer constants in the induction type's domain and the terminal increment cannot overflow or wrap. Dynamic bounds, an unsafe terminal increment, and an unrepresentable count return nullopt; a consumer requiring a constant count must reject nullopt. |
|
Extract a SgPragmaDeclaration's leading keyword . For example "#pragma omp parallel" has a keyword of "omp". |
|
Find break statements inside a particular statement, stopping at nested loops or switches loops or switch statements defines their own contexts for break statements. The function will stop immediately if run on a loop or switch statement. If fortranLabel is non‐empty, breaks (EXITs) to that label within nested loops are included in the returned list. |
|
Find all continue statements inside a particular statement, stopping at nested loops Nested loops define their own contexts for continue statements. The function will stop immediately if run on a loop statement. If fortranLabel is non‐empty, continues (CYCLEs) to that label within nested loops are included in the returned list. |
|
Topdown traverse a subtree from root to find the first declaration given its name, scope (optional, can be NULL), and defining or nondefining flag. |
|
Find the closest loop outside the given statement; if fortranLabel is not empty, the Fortran label of the loop must be equal to it |
|
Find enclosing OpenMP clause body statement from s. If s is already one, return it directly. |
|
Find the closest switch outside a given statement (normally used for case and default statements) |
|
Find the first defining function declaration statement in a scope |
|
Topdown traverse a subtree from root to find the first function declaration matching the given name, scope (optional, can be NULL), and defining or nondefining flag. This is an instantiation of findDeclarationStatement<T>. |
|
Find the function type matching a function signature plus a given return type |
|
Find the last declaration statement within a scope (if any). This is often useful to decide where to insert another variable declaration statement. Pragma declarations are not treated as a declaration by default in this context. |
|
top‐down traversal from current node to find the main() function declaration |
|
Supporting function to comment relocation in insertStatement() and removeStatement(). |
|
Find unused labels which are not targets of any goto statements |
|
Fix symbols, parent and scope pointers. Used internally within appendStatment(), insertStatement() etc when a class declaration was built without knowing its target scope. |
|
Fix the symbol table and set scope (only if scope in declaration is not already set). |
|
Fix symbol table for SgLabelStatement. Used Internally when the label is built without knowing its target scope. Both parameters cannot be NULL. |
|
Fix symbols, parent and scope pointers. Used internally within appendStatment(), insertStatement() etc when a namespace declaration was built without knowing its target scope. |
|
A wrapper containing fixes (fixVariableDeclaration(),fixStructDeclaration(), fixLabelStatement(), etc) for all kinds statements. Should be used before attaching the statement into AST. |
|
Fix symbols, parent and scope pointers. Used internally within appendStatment(), insertStatement() etc when a struct declaration was built without knowing its target scope. |
|
Fix the symbol table and set scope (only if scope in declaration is not already set). |
|
Patch up symbol, scope, and parent information when a SgVariableDeclaration's scope is known. |
|
All the symbol table references in the copied AST need to be reset after rebuilding the copied scope's symbol table. |
|
Normalize a for loop. Malformed or non‐canonicalizable loop headers are hard errors detected by a read‐only preflight before the AST is mutated. |
|
Get the mask expression from the header of a SgForAllStatement |
|
Verify that a Fortran source‐syntax function result has the same resolved meaning as its canonical semantic result. Explicit KIND/LEN selectors use typed folded metadata; only omitted selectors may match by intrinsic family. |
|
Verify that an exact Fortran source type resolves to a semantic expression result type. A nonconstant source CHARACTER LEN selector may match only the explicit dynamic‐result marker used by semantic expression types. |
|
Verify that an exact Fortran source scalar type resolves to the canonical semantic scalar type without discarding explicit KIND/LEN selectors. |
|
|
|
Returns STL vector of SgFile IR node pointers. |
|
Added mechanism to generate project name from list of file names |
|
Generate unique name from C and C++ constructs. The name may contain space. |
|
Generate a useful name to support construction of identifiers from declarations. |
|
Generate a name like temp# that is unique in the current scope and any parent and children scopes. # is a unique integer counter. |
|
Obtain all the queryed statement at line of a source file |
|
Calculate the number of elements of an array type: dim1* dim2*... , assume element count is 1 for int a[]. |
|
Get the element type of an array. It recursively find the base type for multi‐dimension array types |
|
Get the enclosing type of this associated node, not used other than in ./src/backend/unparser/nameQualificationSupport.C |
|
Get the type of the associated argument expression from the function type. |
|
Get the right bool type according to C or C++ language input |
|
Given a SgExpression that represents a named function (or bound member function), return the mentioned function |
|
Returns the type introduced by a declaration. |
|
Get the default constructor from the class declaration |
|
Get the default destructor from the class declaration |
|
Get a statement's dependent declarations which declares the types used in the statement. The returned vector of declaration statements are sorted according to their appearance order in the original AST. Any reference to a class or template class from a namespace will treated as a reference to the enclosing namespace. |
|
Get the number of dimensions of an array type |
|
Get the element type of an array, pointer or string, or NULL if not applicable. This function only check one level base type. No recursion. |
|
Get the closest class declaration enclosing the specified AST node, |
|
Get the closest class definition enclosing the specified AST node, |
|
Get the enclosing SgExprListExp (used as part of function argument index evaluation in subexpressions). |
|
get the SgFile node from current node |
|
Find the enclosing function declaration, including its derived instances like isSgProcedureHeaderStatement, isSgProgramHeaderStatement, and isSgMemberFunctionDeclaration. |
|
Get the closest module statement enclosing the specified AST node, |
|
Find a node by type using upward traversal. |
|
Find the function definition |
|
Get the enclosing scope from a node n |
|
Find enclosing source file node |
|
Find the closest enclosing statement, including the given node |
|
return the first global scope under current project |
|
Get the first initialized name of a declaration statement |
|
Get the first statement within a scope, return NULL if it does not exist. Skip compiler‐generated statement by default. Count transformation‐generated ones, but excluding those which are not to be outputted in unparsers. |
|
Obtain the first queryed statement at line of a source file |
|
Get the variable symbol for the first initialized name of a declaration stmt. |
|
Get the data type of the first initialized name of a declaration statement |
|
convenience function that returns the first initialized name in a list of variable declarations. |
|
Return the symbol‐table key for a Fortran program unit. Anonymous program units receive a stable, source‐position‐derived internal key while their public SgFunctionDeclaration::get_name() remains empty. |
|
Traverse back through a node's parents to find the enclosing global scope |
|
Get a vector of input parameters from the function parameter list |
|
Get the initializer containing an expression if it is within an initializer. |
|
Get the constant value from a constant integer expression; abort on everything else. Note that signed long longs are converted to unsigned. |
|
get the last statement within a scope, return NULL if it does not exit |
|
get liveIn and liveOut variables for a for loop from liveness analysis result liv. |
|
Routines to get and set the body of a loop |
|
Routines to get the condition of a loop. It recognize While‐loop, For‐loop, and Do‐While‐loop |
|
Return the loop index variable for a for loop |
|
Get next statement within the same scope of current statement |
|
Get a vector of output parameters from the function parameter list |
|
Get previous statement of the current statement. It may return a previous statement of a parent scope by default (climbOutScope is true), otherwise only a previous statement of the same scope is returned. |
|
Get the current SgProject IR Node. |
|
Get the closest scope from astNode. Return astNode if it is already a scope. |
|
Query memory pools to grab SgNode of a specified type |
|
Find referenced symbols within an expression |
|
Get the enclosing TemplateDeclaration statement |
|
Get the string representing the type name |
|
returns the array dimensions in an array as defined for arrtype |
|
|
|
Return whether every owned source position on a located node identifies one exact detached transformation surface awaiting an output owner. |
|
Return whether a declaration has exact semantic‐auxiliary ownership. A declaration whose parent is an auxiliary container must satisfy the complete reciprocal scope/container/list contract; malformed partial ownership is a hard error. |
|
Return whether one file‐info record is exact semantic‐only frontend provenance owned by |
|
Check if a for loop uses C99 style initialization statement with multiple expressions like for (int i=0, j=0; ..) or for (i=0,j=0;...) |
|
This is supporting the recognition of functions in header files from two different ASTs |
|
Return whether every owned source position on a located node identifies one exact compiler‐generated, frontend‐specific semantic‐only surface. |
|
Check if a scope statement has a simple children statement list so insert additional statements under the scope is straightforward and unambiguous . for example, SgBasicBlock has a simple statement list while IfStmt does not. |
|
Does a type have a trivial (built‐in) destructor? |
|
Support function used for variable declarations in conditionals |
|
Support function used for variable declarations in conditionals |
|
Support function used for variable declarations in conditionals |
|
Insert an expression (new_exp ) after another expression (anchor_exp) has possible side effects, without changing the original semantics. This is done by using two comma operators: type T1; ... ((T1 = anchor_exp, new_exp),T1) )... , where T1 is a temp variable saving the possible side effect of anchor_exp. The top level comma op exp is returned. The reference to T1 in T1 = anchor_exp is saved in temp_ref. |
|
Insert an expression (new_exp )before another expression (anchor_exp) has possible side effects, without changing the original semantics. This is achieved by using a comma operator: (new_exp, anchor_exp). The comma operator is returned. |
|
|
|
Insert a statement before or after the target statement within the target's scope. Move around preprocessing info automatically |
|
Insert a statement after a target statement, Move around preprocessing info automatically by default |
|
|
|
Insert a statement before a target statement |
|
Insert a statement before the first non‐declaration statement in a scope. If the scope has no non‐declaration statements |
|
Insert a list of statements before or after the target statement within the |
|
Insert a list of statements after a target statement |
|
Insert a list of statements before a target statement |
|
Insert statements before the first non‐declaration statement in a scope. If the scope has no non‐declaration statements |
|
Check if a node is from a header file |
|
Check if a node is from a system header file |
|
Instrument(Add a statement, often a function call) into a function right before the return points, handle multiple return statements (with duplicated statement s) and return expressions with side effects. Return the number of statements inserted. Useful when adding a runtime library call to terminate the runtime system right before the end of a program (e.g., OpenMP). Return with complex expressions with side effects are rewritten using an additional assignment statement. |
|
check if node1 is a strict ancestor of node 2. (a node is not considered its own ancestor) |
|
Check if an expression is an array access (SgPntrArrRefExp). If so, return its name expression and subscripts if requested. Users can use convertRefToInitializedName() to get the possible name. It does not check if the expression is a top level SgPntrArrRefExp. |
|
Is a type assignable? This may not quite work properly. |
|
Check if a SgNode _s is an assignment statement (any of =,+=,‐=,&=,/=, ˆ=, etc) |
|
Returns true if AST teardown is enabled for this process. |
|
Check if a statement is a (true or false) body of a container‐like parent, such as For, Do‐while, switch, If, Catch, OmpBodyStmt, etc |
|
Check if a Fortran Do loop has a complete canonical form: Do I=1, 10, 1. A nonconstant step has runtime direction; it must never be guessed to be increasing by consumers. |
|
Check if a for‐loop has a canonical form, return loop index, bounds, step, and body if requested |
|
Check if a bool or int constant expression evaluates to be a false value |
|
Check if a bool or int constant expression evaluates to be a true value |
|
Is a type copy constructible? This may not quite work properly. |
|
Is a type default constructible? This may not quite work properly. |
|
Compare AST nodes, subtree, etc |
|
Test if two types are equivalent SgFunctionType nodes. This is necessary for template function types They may differ in one SgTemplateType pointer but identical otherwise. |
|
Test for equivalence of types independent of access permissions (private or protected modes for members of classes). |
|
Returns true when a declarator type names the supplied exact source‐owned class or enum declaration. Externally named tag types are shared across a project, so the type's canonical declaration family may belong to another translation unit while the supplied declaration remains the sole owner of its local source surface. |
|
Check if a declaration has an "extern" modifier |
|
Return true only for a Fortran main program or BLOCK DATA program unit whose source syntax has no name. The function hard‐fails when the public declaration name and the explicit source‐name metadata disagree. |
|
Is an overloaded operator an index operator (also referred to as call or subscript operators). (e.g. X & operator()() or X & operator[]). |
|
check if a variable reference is this‐>a[i]inside of a lambda function |
|
Check if a function declaration is a C++11 lambda function |
|
Check if a statement is the last statement within its closed scope |
|
Check if a SgInitializedName is used as a loop index within a AST subtree This function will use a bottom‐up traverse starting from the subtree_root to find all enclosing loops and check if ivar is used as an index for either of them. |
|
Check if a SgNode is a main() function declaration |
|
True if an SgInitializedName is "mutable' (has storage modifier set) |
|
Is this type a non‐constant reference type? (Handles typedefs correctly) |
|
Check if a node is SgOmp*Statement |
|
Return true if function is overloaded. |
|
|
|
Return true if expr is part of an overloaded operator‐> call chain. |
|
Is this a pointer to a non‐const type? Note that this function will return true for const pointers pointing to non‐const types. For example, (int* const y) points to a modifiable int, so this function returns true. Meanwhile, it returns false for (int const * x) and (int const * const x) because these types point to a const int. Also, only the outer layer of nested pointers is unwrapped. So the function returns true for (const int ** y), but returns false for const (int * const * x) |
|
Is this type a pointer type? (Handles typedefs correctly) |
|
Is an overloaded operator a postfix operator. (e.g. ). |
|
Check for proper names of possible prefix operators (used in isPrefixOperator()). |
|
Check if a class type is a pure virtual class. True means that there is at least one pure virtual function that has not been overridden. In the case of an incomplete class type (forward declaration), this function returns false. |
|
Is this type a const or non‐const reference type? (Handles typedefs correctly) |
|
Is this a restrict type? |
|
Check if two function declarations refer to the same one. Two function declarations are the same when they are a) identical, b) same name in C c) same qualified named and mangled name in C++. A nondefining (prototype) declaration and a defining declaration of a same function are treated as the same. |
|
Is this a scalar type? We define the following SgType as scalar types: char, short, int, long , void, Wchar, Float, double, long long, string, bool, complex, imaginary |
|
Check if a declaration has a "static' modifier |
|
Check if a type is an integral type, only allowing signed/unsigned short, int, long, long long./!/! There is another similar function named SgType::isIntegerType(), which allows additional types char, wchar, and bool to be treated as integer types |
|
Check if a SgNode is a declaration for a structure |
|
Check if a type is a struct type (a special SgClassType in ROSE). Typedef and modifier types are not stripped off. Only direct struct type is returned as true. |
|
Check if a SgNode is a declaration for a union |
|
Check if a variable reference is used by its address: including &a expression and foo(a) when type2 foo(Type& parameter) in C++ |
|
Return whether a spelling is a valid Fortran source identifier. |
|
Is this a volatile type? |
|
Used to support token unparsing (when the output the trailing token sequence). |
|
return path prefix for subtree of include files. |
|
Resolve a Fortran common‐block designator in its lexical program‐unit scope. Missing and ambiguous declarations are hard errors. |
|
|
|
Lookup a named type based on its name, bottomup searching from a specified scope. Note name collison might be allowed for c (not C++) between typedef and enum/struct. Only the first matched named type will be returned in this case. typedef is returned as it is, not the base type it actually refers to. |
|
Parent‐scope lookup used only by AST snippet‐copy fixup. Recursive base‐class search is explicit to this call and never changes global state. |
|
Parent‐scope lookup for one name‐qualification invocation. The caller must supply the exact symbol kind and its invocation‐owned alias visibility set. |
|
utility functions for symbol tables |
|
Interchange/permutate a n‐level perfectly‐nested loop rooted at 'loop' using a lexicographical order number within (0,depth!). |
|
|
|
Unroll a target loop by grouping exact source iterations. The checked implementation never synthesizes range, endpoint, or stride products. |
|
Make a single statement body to be a basic block. Its parent is if, while, catch, etc. |
|
Generated mangled modifier types, include const, volatile,according to Itanium C++ ABI. |
|
Generate mangled scalar type names according to Itanium C++ ABI, the input type should pass isScalarType() in ROSE |
|
Generate a mangled string for a given type based on Itanium C++ ABI |
|
Merge an assignment into its upstream declaration statement. Callers should make sure the merge is semantically correct. |
|
Merge a variable assignment statement into a matching variable declaration statement. Callers should make sure the merge is semantically correct (by not introducing compilation errors). This function simply does the merge transformation, without eligibility check. |
|
Merge a declaration statement into a matching followed variable assignment. Callers should make sure the merge is semantically correct (by not introducing compilation errors). This function simply does the merge transformation, without eligibility check. |
|
Relocate comments and CPP directives from one statement to another. |
|
Move preprocessing information of stmt_src to stmt_dst, Only move preprocessing information from the specified source‐relative position to a specified target position, otherwise move all preprocessing information with position information intact. The preprocessing information is appended to the existing preprocessing information list of the target node by default. Prepending is used if usePreprend is set to true. Optionally, the relative position can be adjust after the moving using dst_position. |
|
|
|
Move file to be generated in a subdirectory (will be generated by the unparser). |
|
Move a variable declaration to a new scope, handle symbol, special scopes like For loop, etc. |
|
A special purpose statement removal function, originally from inlinerSupport.h, Need Jeremiah's attention to refine it. Please don't use it for now. |
|
Convert all code within root matching the patern of (&left)‐>right, and translate them into left.right. Return the number of matches of the pattern. Be default, only transformation generated nodes will be normalized. |
|
Normalize the structure of |
|
Normalize loop init stmt by promoting the single variable declaration statement outside of the for loop header's init statement, e.g. for (int i=0;) becomes int i_x; for (i_x=0;..) and rewrite the loop with the new index variable, if necessary |
|
Validate a for loop's typed comparison without changing its inclusivity. |
|
Output function type symbols in global function type symbol table. |
|
Output the local symbol tables. |
|
Paste preprocessing information from a buffer to a destination node. Used in combination of cutPreprocessingInfo() |
|
Normalize an attached statement into the exact lexical anchor used by a subsequent sibling insertion. |
|
Prepend an argument to SgFunctionParameterList |
|
|
|
Prepend a list of statements to the beginning of an explicit lexical scope. |
|
|
|
|
|
Promote one exact semantic‐only frontend node that a transformation has rewritten into an independently emitted lexical node. The caller supplies the attached physical output owner explicitly; semantic descendants are not reclassified implicitly. |
|
Publish and validate the effective access of a declaration at its exact structural position in a C++ class definition. Fresh builder declarations may arrive with an unclassified access modifier; source‐backed declarations must already agree with the surrounding access‐label stream. |
|
Publish a generated preprocessing record with one exact physical output owner. The record remains typed as a transformation; its Sg_File_Info keeps logical spelling provenance and stores physical output identity separately. |
|
Publish or validate the exact output owner for generated located nodes before a subtree crosses an attached AST mutation boundary. A physical owner publishes its exact file and occurrence. A semantic owner instead publishes detached transformation descendants as semantic‐only frontend structure and validates existing semantic descendants. |
|
Publish a generated trailing comment whose explicit attachment is after the owner's syntax on the owner's current output line. |
|
Publish an existing preprocessing record at a new exact physical output owner. Source‐spelled records retain their logical spelling and semantic classification while their physical output identity changes; generated records are validated by publishGeneratedPreprocessingInfo(). |
|
Query a subtree to get all nodes of a given type, with an appropriate downcast. |
|
Mostly used internally when some AST pieces are built without knowing their target scope/parent, especially during bottom‐up construction of AST. The associated symbols, parent and scope pointers cannot be set on construction then. A set of utility functions are provided to patch up scope, parent, symbol for them when the target scope/parent become know. |
|
Regenerate the symbol table. |
|
Record where normalization have been done so that we can preform denormalizations as required for the token‐based unparsing to generate minimal diffs. |
|
Recursively print current and parent nodes. used within gdb to probe the context of a node. |
|
Register an AST teardown handler to run at process exit if cleanup was not invoked. |
|
Record a project for teardown when running exit handlers. |
|
Relocate an already‐published preprocessing record whose typed output placement is the attached AST boundary. The record must identify priorOwner exactly; detached, shared, source‐position‐owned, or differently owned records are hard errors. Source/generated spelling provenance is immutable. |
|
Relocate generated descendants of an already‐published subtree through one explicit physical‐output file‐and‐occurrence transfer. Source‐spelled descendants retain their original physical provenance. Every generated position must identify priorOwner exactly; this API never infers or repairs an owner. |
|
Delete exactly owned source‐provenance trees before transforming their semantic expression owners. |
|
Remove consecutive labels |
|
Remove const (if present) from a type. stripType() cannot do this because it removes all modifiers. |
|
Remove jumps whose label is immediately after the jump. Used to clean up inlined code fragments. |
|
Remove labeled goto statements |
|
Remove a statement from its attach point of the AST. Automatically keep its associated preprocessing information at the original place after the removal. The statement is still in memory and it is up to the users to decide if the removed one will be inserted somewhere else or released from memory (deleteAST()). |
|
Remove labels which are not targets of any goto statements: its child statement is also removed by default. |
|
Replace an expression with another, used for variable reference substitution and others. the old expression can be deleted (default case) or kept. |
|
Replace a given expression with a list of statements produced by a generator |
|
Replace an exact defining function declaration with a legal declaration source surface. Free functions and member definitions written in their class are replaced by a newly built prototype. A member definition written outside its semantic class scope is replaced by SgEmptyDeclaration because a namespace‐scope qualified member prototype is ill‐formed C++. The removed definition remains semantically owned by its scope's SgAuxiliaryDeclarationList and its complete declaration family and symbol are preserved. Malformed or unsupported inputs are hard errors; this function never returns null. |
|
XXX This function operates on the new file used to support outlined function definitions. We use a copy of the file where the code will be outlined FROM, so that if there are references to declarations in the outlined code we can support the outpiled code with those references. This approach has the added advantage of also supporting the same include file tree as the original file where the outlined code is being taken from. |
|
Replace a statement with another. Move preprocessing information from oldStmt to newStmt if requested. |
|
Similar to replaceExpressionWithStatement, but with more restrictions. Assumptions: from is not within the test of a loop or ifStmt, not currently traversing from or the statement it is in |
|
Replace all variable references to an old symbol in a scope to being references to a new symbol. |
|
Replace an anchor node with a specified pattern subtree with optional SgVariantExpression. All SgVariantExpression in the pattern will be replaced with copies of the anchor node. |
|
Return the canonical source variable template reached from a specialization after validating the complete, acyclic specialized‐template chain. |
|
Build a checked loop plan without modifying or allocating into the AST. |
|
Validate a complete perfect nest and all tile sizes without mutation, then commit the planned strip‐mining transformations in place. |
|
Read‐only unroll planning and one atomic commit. |
|
Return an existing named type or terminate if the current AST has no such declaration. This never synthesizes a placeholder declaration. |
|
Validate and return the exact callable denoted by a resolved function‐ template nonreal reference. This is a hard AST contract: the synthetic source‐spelling node, the real callable declaration, its canonical symbol, its function type, and both copies of the written arguments must agree. |
|
Validate and return the exact initialized name denoted by a resolved variable‐template nonreal reference. This is a hard AST contract: the synthetic source‐spelling node, the real specialization, its source template, its symbol, and both copies of the written arguments must agree. |
|
Require exact physical/include ownership before mutating a statement in a token‐unparsed header. Ambiguous or unsupported ownership is a hard error. |
|
Return the exact target ABI type used by sizeof/alignof for the context's one owning translation unit. Detached or untyped contexts are malformed. |
|
Use the set of IR nodes and set the isModified flag in each IR node to true. |
|
Assigns unique numbers to each SgScopeStatement of a function. |
|
Reset map variables used to support generateUniqueNameForUseAsIdentifier() function. |
|
Save AST into a pdf file. Start from a node to find its enclosing file node. The entire file's AST will be saved into a pdf. |
|
This function supports the token‐based unparsing when used with unparsing of header files to know when the scope can be unparsed via it's token stream, even though a statement from a header file may contain a transformation. returns true if there is a statement in the scope that has to be unparsed (is from the same file as the scope). returns false if the scope is empty or contains only statements associated with one or more header files. |
|
we have two serialize() functions, one for a single node, the other for a list of pointers |
|
a better version for SgVariableDeclaration::set_baseTypeDefininingDeclaration(), handling all side effects automatically Used to have a struct declaration embedded into a variable declaration |
|
Publish an exactly constructed ctor‐initializer list for a member function. |
|
Set a declaration as extern |
|
Set a numerical label for a Fortran statement in its exact program‐unit label scope. SgLabelSymbol and SgLabelRefExp are created as needed. |
|
set left hand operand for binary expressions, transparently downcasting target expressions when necessary |
|
Set the condition statement of a loop, including While‐loop, For‐loop, and Do‐While‐loop. |
|
Set the lower bound of a loop header for (i=lb; ...) |
|
Set the stride(step) of a loop 's incremental expression, regardless the expression types (i+=s; i= i+s, etc) |
|
Set the upper bound of a loop header,regardless the condition expression type. for (i=lb; i op up, ...) |
|
Set current node's source position as transformation generated |
|
Set current node's source position as NULL |
|
Set operands for expressions with single operand, such as unary expressions. handle file info, lvalue, pointer downcasting, parent pointer etc. |
|
Set parameter list for a function declaration, considering existing parameter list etc. |
|
Set a pragma of a pragma declaration. handle memory release for preexisting pragma, and set parent pointer. |
|
set left hand operand for binary expression |
|
Classify one freshly constructed, non‐expression frontend node as semantic name/structure infrastructure. Any existing or partial source position is a producer error. |
|
Set the source code positon for the current (input) node. |
|
DQ (5/1/2012): New function with improved name. |
|
Set the source code positon for the subtree (including the root). |
|
Recursively set source position info(Sg_File_Info) as transformation generated |
|
Set a declaration as static |
|
set_name of symbol in symbol table. |
|
Reorder a list of declaration statements based on their appearance order in source files |
|
Replace an expression with a temporary variable and an assignment statement |
|
Split long expressions into blocks of statements |
|
|
|
Suggest next usable (non‐conflicting) numeric label value for a Fortran function definition scope |
|
Explicitly tear down an AST and release global caches and memory pools. AST pointers are invalid after this call. |
|
Verify that 2 SgTemplateArgument are equivalent (same type, same expression, or same template declaration) |
|
Verify that 2 SgTemplateArgumentPtrList are equivalent. |
|
Return true if template definition is in the class, false if outside of class. |
|
Verify that two template parameters describe the same parameter identity. |
|
Verify that two template parameter lists describe the same signature. |
|
Undo the normalization of for loop's C99 init declaration. Previous record of normalization is used to ease the reverse transformation. |
|
Update defining and nondefining links due to a newly introduced function declaration. Should be used after inserting the function into a scope. This function not only set the defining and nondefining links of the newly introduced function declaration inside a scope, but also update other same function declarations' links accordingly if there are any. Assumption: The function has already inserted/appended/prepended into the scope before calling this function. |
|
Apply the C/C++ usual arithmetic conversions using the target ABI owned by context. Invalid, non‐arithmetic, or detached inputs are hard errors. |
|
Enforce the semantic and exact‐source identity contract of a typed Fortran common‐block directive designator. |
|
Validate that every symbol has one exact owning symbol‐table entry. |
|
Diagnostic function for tracing back through the parent list to understand at runtime where in the AST a failure happened. |
|
|
Variables
Name |
Description |
An internal counter for generating unique SgName |
|
Global map of name collisions to support generateUniqueNameForUseAsIdentifier() function. |
|
SageInterface::Detail namespace
Functions
Name |
SgNodeHelper namespace
Namespaces
Name |
Description |
Provides functions which match a certain AST pattern and return a pointer to a node of interest inside that pattern. |
Types
Name |
Description |
Result structure of extended C++ function call matching |
|
Functions for simplifying access to SgNode information |
|
collects all pragmas with name 'pragmaName' and creates a list of all pragma strings (with stripped off prefix) and the associated SgNode. |
Functions
Name |
Description |
returns location (consisting of filename, line, column) Abbreviates fileName if too long, max file name length can be set |
|
computes a list representing the nesting structure of classes (including structs and unions). It traverses the AST upwards and collects SgClassDeclaration(s) only. This covers nested classes, nested structs, and nested unions, and combinations of those. |
|
this function should only be called for a node in the subtree of a SgFunctionDefinition node. For a given 'node' it determines the correspondnig functionDefinition node when searching upwards in the AST for such a SgFunctionDefinition node. It is useful as a simple lookup function from inside the AST subtree of a SgFunctionDefinition. Returns 0 if no SgFunctionDefinition is found (e.g. global scope). |
|
computes for a given node the index number of it from the parent. e.g. node1(node2,node3,node4) : node4 has index 2 (starting at 0) For the root node of an AST (e.g. SgProject) this function returns ‐1. |
|
This function determines for a given function‐call‐expression its corresponding function‐definition (by using get_definingDeclaration). This function has constant complexity. It does not perform a search, but uses the information as present in the AST. If this information is not sufficient to determine the definition of a function it returns 0. For a consistent AST this will find all definitions in the same file, but not in a other SgFile. |
|
determines all VarRefExp in the subtree of 'node'. The order in the vector corresponds to the traversal order on the AST. |
|
Same as doubleQuotedEscapedString but also replaces <,<=,>=,> with the corresponding HTML codes. This is required when printing program code inside HTML tables of a dot file. |
|
computes a new string from s1 where each doublequote is replaced with a backslash followed by the doublequote. This is helpful when printing unparsed program fragments which contain doublequoted strings to a dot file (used by nodeToString). This function also replaces <,<=,>=,> with the corresponding HTML codes. |
|
returns the function declaration statement found for a given function symbol. |
|
returns the declaration statement found for a given variable symbol. |
|
schroder3 (2016‐07‐22): Returns the closest function definition that contains the given node |
|
returns the root node representing the AST of the condition of If, While, DoWhile, For, CondOperator, switch. |
|
returns the child of SgExpressionRoot (which is guaranteed to be unique and to exist) |
|
returns the child of SgExprStatement (which is guaranteed to be unique and to exist) |
|
returns the root node representing the AST of the false branch of If, CondOperator. |
|
returns the first child of an arbitrary AST node (throws exception if numChildren==0) |
|
returns the first Statement of SgBasicBlock (throws exception if numChildren==0) |
|
returns the incr/derc‐expr of For. |
|
returns the initializer‐list of For. |
|
return a function‐call's argument list |
|
return a function‐definition's list of formal paramters |
|
returns function name of SgFunctionDefinition, SgFunctionDeclaration, SgFunctionCall. |
|
return a function‐definition's return type |
|
returns the initialized name object of a variable declaration. Otherwise it throws an exception. |
|
returns the initializer expression of a variable declaration. If no initializer exists it returns 0. |
|
returns the label name of a SgLabelStatement without trailing ":" |
|
returns the last Statement of SgBasicBlock (throws exception if numChildren==0) |
|
return lhs of a binary node (if it is not a binary node it throws an exception) |
|
returns the root node representing the AST of the loop body of While, DoWhile, For. |
|
returns the parent of a node. Essentially a wrapper function of the ROSE get_parent() function, but throws an exception if no parent exists. For SgProject node no exception is thrown if no parent exists because it is the root node of a ROSE AST. |
|
return the verbatim pragma string as it is found in the source code this string includes the leading "#pragma". |
|
return rhs of a binary node (if it is not a binary node it throws an exception) |
|
returns the SgSymbol* of the function in a SgFunctionRefExp |
|
returns the SgSymbol* of the variable in a function declaration |
|
returns the SgSymbol* of a SgInitializedName |
|
returns the SgSymbol* of the variable in a SgVarRefExp |
|
returns the SgSymbol* of the variable in a variable declaration |
|
returns the root node representing the AST of the true branch of If, CondOperator. |
|
returns the child of a SgUnaryExp (which is guaranteed to be unique and to exist) |
|
returns true if the declaration has an assign initializer (e.g. char[2]="";) |
|
Checks if an OpenMP construct is marked with a nowait clause |
|
returns true if the declaration has an initializer list (e.g. char[2]={'a',0}; |
|
checks whether the expression 'node' represents an assignment to an array's element considers all assignment operators and arrays of any size |
|
checks whether the node 'node' is the root node of the AST by using the get_parent function. |
|
is true if 'node' is the root node of the AST representing the condition of If, While, DoWhile, For, switch, CondExp. |
|
is true if 'node' is the root node of the AST representing the condition of If, While, DoWhile, For, switch. |
|
is true if 'node' is the root node of the AST representing If, While, DoWhile, For, switch. |
|
is true if 'node' is the root node of the AST representing If, While, DoWhile, For, switch, CondExp. |
|
determines whether a node is the root node of an AST representing the inc‐expr in a SgForStatement. This function is helpful to deal with this special case in the ROSE AST where an expression does not have a root node which can be easily determined to be a root node of an expression (i.e. here it can be any binary or unary node in constrast to all other expressions in the ROSE AST which are either a SgExprStatement or have a SgExpressionRoot node. |
|
Determines whether a provided function declaration is a forward declaration |
|
checks whether a SgVariableSymbol is representing a function parameter (this does not apply for forward declarations) |
|
Determines if a variable is declared in global name space |
|
checks whether 'elem' is the last child (in traversal order) of node 'parent'. |
|
is true if 'node' is the root node of the AST representing the condition of a Loop construct (While, DoWhile, For). |
|
is true if 'node' is the root node of the AST representing a Loop construct (While, DoWhile, For). |
|
returns true for Expr‐‐ and Expr‐‐, otherwise false; |
|
checks whether prefix 'prefix' is a prefix in string 's'. |
|
returns true for ‐‐Expr and ++Expr, otherwise false. |
|
checks whether a SgVariableSymbol is representing a variable in |
|
returns line, column, and unparsed node in one string. |
|
returns a std::pair of line and column number. If no file info exists at this node it returns (‐1,‐1). |
|
identifies the list of SgFunctionDefinitions in global scope Functions/methods of classes are NOT included in this list. Note: static/external can be resolved by further processing those objects |
|
identifies the list of global variables Note: static/external can be resolved by further processing those objects |
|
searches in the provided Project for SgGlobal nodes |
|
returns the set of all local variable‐declarations of a function |
|
returns location (consisting of filename, line, column) and source code of unparsed node in one string. Abbreviates fileName and unparsed source if too long (defaults are 30,20) |
|
returns location (consisting of filename, line, column) |
|
returns a set of SgNode where each node is a break node, but properly excludes all nested loops. |
|
matches C and C++ function calls (also ctor and dtor) |
|
Returns for a given class/struct/union a list with the variable declarations of the member variables. Note this is a filtered list returned by the SgType::returnDataMemberPointers function which also returns pointers to methods |
|
returns a string representing the node (excluding the subtree) |
|
returns the number of children as int (intentionally not as t_size) ensures that the number of children fits into an int, otherwise throws exception. |
|
replaces expression e1 by expression e2. Currently it uses the SageInterface::rewriteExpression function but wraps around some addtional checks that significantly improve performance of the replace operation. |
|
replace in string 'str' each string 'from' with string 'to'. |
|
computes for a given node at which scope nesting level this node is in its AST |
|
computes for a given node at which scope nesting level this node is in its AST |
|
sets 'cond' as the root node of the AST representing the condition in statements if, while, dowhile, for, switch. |
|
returns filename+line+column information of AST fragment in format "filename:line:column". Used for generating readable output |
|
returns filename as stored in AST node. Used for generating readable output. |
|
|
|
collects all case labels from the switch it started in (excludes nested switch stmts). This function also works for Duff's device code where 'case' labels can be inside nested loop/if constructs. |
|
returns the default stmt if it exists. Otherwise return 0 and can be used to test whether a default stmt exists in a given switch stmt. This function also works for Duff's device code. code where 'default' labels can be inside nested loop/if constructs. |
|
returns name of symbol as string |
|
Creates a long unique variable name for a given node of type SgVariableDeclaration or SgVarRefExp |
|
returns the string representing the condition (removes trailing ';') |
SgNodeHelper::Pattern namespace
Provides functions which match a certain AST pattern and return a pointer to a node of interest inside that pattern.
Types
Name |
Functions
Name |
Description |
tests pattern for an assert |
|
tests pattern SgExprStatement(SgAssignOp(VarRefExp,FunctionCallExp)) and returns pointer to FunctionCallExp otherwise 0. |
|
tests pattern SgExprStatement(FunctionCallExp) and returns pointer to FunctionCallExp, otherwise 0. |
|
tests several patterns and returns pointer to FunctionCallExp inside that matched pattern, otherwise 0. |
|
tests pattern for function call in variable declaration and returns pointer to FunctionCallExp otherwise 0. |
|
tests pattern SgReturnStmt(FunctionCallExp) and returns pointer to FunctionCallExp, otherwise 0. |
|
tests pattern SgFunctionCall(...) where the name of the function is fprintf with 3 params |
|
tests pattern SgFunctionCall(...) where the name of the function is printf with 2 params |
|
tests pattern SgFunctionCall(...) where the name of the function is scanf with 2 params |
|
checks variable declaration with function call, returns variable declaration. Otherwise 0. e.g. int x=f(); |
|
checks variable declaration with function call, returns both in a pair, or a with (0,0). |
StaticCFG namespace
Types
Name |
Description |
This class stores index of each node as an attribuite of SgGraphNode. |
|
A CFG implementation with Custom filters |
|
TransformationTracking namespace
Functions
Name |
Description |
Assign Ids and save current File Info. |
|
Variables
Name |
VirtualCFG namespace
Types
Name |
Description |
A control flow edge connecting two CFG nodes, with an edge condition to indicate edge types |
|
A node in the control flow graph. Each CFG node corresponds to an AST node, but there can be several CFG nodes for a given AST node. |
|
"Interesting" node and edge filters |
|
Enums
Name |
Description |
The conditions attached to edges are marked to determine which conditions trigger control to flow along that edge (as opposed to other edges out of the same source node). For conditional branches (except eckCaseLabel and eckDefault), the conditions are implicit and depend on knowledge of the particular control structure. Fortran support for this is underdeveloped; single AST nodes representing variable‐length loops was not part of the original design of the CFG code. |
Functions
Name |
Description |
The first CFG node for a construct (before the construct starts to execute) |
|
The last CFG node for a construct (after the entire construct has finished executing). This node may not actually be reached if, for example, a goto causes a loop to be exited in the middle |
|
Dump the filtered dot graph of a virtual control flow graph starting from SgNode (start) |
|
Dump the full dot graph of a virtual control flow graph starting from SgNode (start) |
|
Dump a CFG with only interesting nodes for a SgNode |
|
Returns CFG node for just before start |
|
Utility function to make CFG Edges |
|
* CALL‐BACK FUNCTIONS FOR cfgRWTransaction::transform() ** |
|
Edge printer |
|
Helper function to print Node information |
|
Print out a node plus all its outgoing edges |
|
Variables
Name |
WalrusGraph namespace
Types
Functions
Variables
arrIndexLabeler namespace
cfgUtils namespace
Functions
Name |
Description |
/ SgExpression that is that/ assignment (effectively a type cast) or NULL otherwise |
|
legacy namespace
Namespaces
Name |
Functions
Name |
Description |
Are any variables in syms modified anywhere within n, or is n a declaration of one of them? |
|
Count how many computations of expr are within root. Same caveats as expressionComputedIn. |
|
Is the expression expr computed within root? This test is simple, and does not account for changes to the variables in expr. |
legacy::PRE namespace
Types
Name |
Description |
The whole CFG structure, including some external properties |
|
Graph structure for control flow graphs. Based loosely on BGL graph type. |
|
Functions
Name |
Description |
Add information to each edge on where to insert statements on that edge. The insertion point structure is a pair of (SgNode*, bool), where the bool is true for inserting before the given node and false for inserting after it. |
|
Get the function definition containing a given node |
|
Make the control flow graph for a given node |
|
Do partial redundancy elimination on all functions within the scope n. |
|
Do partial redundancy for all expressions within a given function, whose definition is given in n. |
|
Do partial redundancy elimination, looking for copies of one expression expr within the basic block root. A control flow graph for root must be provided in cfg, with a map from nodes to their statements in node_statements, a map from edges to their CFG edge types in edge_type, and a map from edges to their insertion points in edge_insertion_point. The algorithm used is that of Paleri, Srikant, and Shankar ("Partial redundancy elimination: a simple, pragmatic, and provably correct algorithm", Science of Computer Programming 48 (2003) 1‐‐20). |
|
Print out a CFG as a dot file |
rwAccessLabeler namespace
Types
Name |
Enums
Name |
Functions
sg namespace
This namespace contains template functions that operate on the ROSE AST
Types
Name |
Description |
helper class for _ancestor |
|
projects the constness of T1 on T2 |
|
struct DefaultHandler |
|
Base class for any handlers passed to |
|
Functor copying an initialized name into a different scope |
|
Generic inserter for sage containers |
|
Functor setting the scope of a sage node to a specified (at Functor construction time) scope |
|
executes a functor for a specific node type |
|
Functor building a variable reference from an initialized name |
|
Functions
Name |
Description |
implements the ancestor search |
|
finds an ancestor node with a given type |
|
returns the same node n upcasted to its base type |
|
asserts that n has type SageNode |
|
unchecked down cast from SgNode to SageNode |
|
returns a deep copy of a sage node |
|
converts object of type E to T via string conversion |
|
creates a functor that executes code for a specific node type |
|
dereferences an object (= checked dereference in debug mode) |
|
uncovers the type of SgNode and passes it to an function "handle" in RoseVisitor. which should be overloaded with every possible target node. After the traversal, RoseVisitor should contain the intended return data. |
|
calls fn with all applicable nodes in the AST |
|
generates a SageInserter, adding elements at the end of a sequence |
|
swaps children (of equal kind) between two ancestor nodes of the same type |
|
portable implementation to avoid compiler warnings for unused parameter. |