This tool is the simplest tool built using ROSE. It takes input source files , builds AST, and then unparses the AST back to compilable source code. It tries its best to preserve everything from the input file. Any other ROSE-based tools can be built using this tool's skeleton by adding customized AST analysis and transformation.

#include "rose.h"
int main(int argc, char *argv[]){
// Build the AST used by ROSE
SgProject *project = frontend(argc, argv);
// Run internal consistency tests on AST
// Insert your own manipulation of the AST here...
// Generate source code from AST and call the vendor's compiler
return backend(project);


Type make install-core -j4 under $ROSE_build will build and install this tool into $ROSE_INSTALL/bin.

User Instructions

There are too many options to be displayed here. So please refer to –help for details.


You can run the tool as follows to produce an output file rose_input.c file below:

identityTranslator -c input.c


Due to limitations of the frontends used by ROSE and some internal processing, identityTranslator cannot generate 100% identical output compared to the input file. Some notable changes it may introduce include:

This page is generated from $ROSE/docs/Rose/Tools/identityTranslator.dox

Collaboration diagram for Identity Translator: