ROSETTA: the compile-time recognition of object-oriented library abstractions and their use within user applications

Quinlan, D, Bobby Philip · University of North Texas Digital Library (University of North Texas) · 2001

Libraries arise naturally from the increasing complexity of developing scientific applications, the optimization of libraries is just one type of high-performance optimization. Many complex applications areas can today be addressed by domain-specific object-oriented frameworks. Such object-oriented frameworks provide an effective compliment to an object-oriented language and effectively permit the design of what amount to essentially domain-specific languages. The optimization of such a domain-specific library/language combination however is particularly complicated due to the inability of the compiler to optimize the use of the libraries abstractions. The recognition of the use of object-oriented abstractions within user applications is a particularly difficult but important step in the optimization of how objects are used within expressions and statements. Such recognition entails more than just complex pattern matching. The approach presented within this paper uses specially built grammars to parse the C++ representation. The C++ representation is itself obtained using a modified version of the SAGE II C/C++ source code restructuring tool which is inturn based upon the Edison Design Group (EDG) C++ front-end. ROSETTA is a tool which automatically builds grammars and parsers from class definitions, associated parsers parse abstract syntax trees (ASTs) of lower level grammars into ASTs of higher level grammars. The lowest level grammar is that associated with the full C++ language itself, higher level grammars specialize the grammars specific to user defined objects. The grammars form a hierarchy and permit a high-degree of specialization in the recognition of complex use of user defined abstractions.

Read the paper · More papers on PaperTik