News: Haskell bindings have been released.

News: OpenMP 3.0 implementation has been released.

News: Autotuning draft tutorial has been released.

News: ROSE wins R&D 100 Award!

ROSE is an open source compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale Fortran 77/95/2003, C, C++, OpenMP, and UPC applications. The intended users of ROSE could be either experienced compiler researchers or library and tool developers who may have minimal compiler experience. ROSE is particularly well suited for building custom tools for static analysis, program optimization, arbitrary program transformation, domain-specific optimizations, complex loop optimizations, performance analysis, and cyber-security.

Like other compiler infrastructures, ROSE consists of front-ends, a midend, and backends, but ROSE backends generate (unparse) source code. Thus ROSE is a source-to-source compiler infrastructure. The intermediate representation (IR) used in ROSE is high level to build an abstract syntax tree (AST) that is well suited to source-to-source (so ROSE does not loose any information about the structure of the original source code). The midend contains an evolving set of analyzes and optimizations. The Edison Design Group (EDG) front-end is used to parse C and C++ applications. Although the EDG source code and interfaces are protected, they may be distributed freely in binary form. Language support for Fortran 2003 and earlier versions (including Fortran 90/95, F77, F66, and Fortran 4) is based on the Open Fortran Parser (OFP) developed at Los Alamos National Laboratory. ROSE converts the intermediate representations (IRs) produced by the front-ends into abstract syntax trees.

A number of program analyzes and transformations have been developed for ROSE. They are designed to be utilized by users via simple function calls to interfaces. The program analysis available include call graph analysis, control flow analysis, data flow analysis (live variables, def-use chain, reaching definition, alias analysis, etc.), class hierarchy analysis, data dependence and system dependence analysis, and MPI communication pattern analysis. Representative program optimizations and translations developed with ROSE are partial redundancy elimination, constant folding, inlining, outlining (separating out a portion of code as a function), OpenMP directive lowering, automatic parallelization and loop transformations (a loop optimizer supporting aggressive loop optimizations such as fusion, fission, interchange, unrolling, and blocking).

ROSE is released under a BSD-style license and is portable to Linux and Mac OS X on IA-32 and x86-64 platforms. It has attracted more than three dozen user groups worldwide for various research, development, and education purposes. For example, internal users at Lawrence Livermore National Laboratory are using it for optimizing data structure abstractions and components. External users from other national laboratories and universities have been using ROSE for code instrumentation, static analysis, formal rewrite systems, empirical tuning, MPI verification, etc. It also is being used by five universities for teaching and seven companies to support the development of commercial products. We welcome both external users and potential collaborators to work with us.