|sage++ package and a question email@example.com (Frank Schinkmann) (1997-01-22)|
|From:||Frank Schinkmann <firstname.lastname@example.org>|
|Date:||22 Jan 1997 00:16:56 -0500|
SAGE++ is a tool for restructuring C++ (and also Fortran 90) source
code. Therefore it has a Parser for PC++ (which is a superset of C++
they have defined; I have not worked with it yet so I can not say much
The parser translates the source code into a machine independent
format (called .dep file). If someone wants to write a tool that
modifies the source code then he instanciates a SAGE++ object with
this .dep file as argument for the constructor and gets a parse tree
comprising statements (top level elements). These statements are
formed with up to three expressions (for example for-loops). These
again are build with symbols. One can trverse the code in lexical
order or in form of a descent in the tree (statements -> expressions
-> symbols). It is possible to add statements, expressions and symbols
(also comments) and to modify the parse tree as one wants.
After modifying the tree is possible to create source code again and
write it to stdout, a string or a file. Projects comprising several
files are supported. The reason why I chose this package is that is is
extremely flexible. For example there are methods for unrolling loops
and also dependence analysis of variables. The source code (C++) is
available. And there is a user's guide of 250 pages. The only problem
is that not all methods are explained in there (although it seems that
they are all mentioned in the guide saying 'document me' instead of a
description). This is why I'm interested in reading from people who
perhaps have worked with the tool and have some experience.
As I have just started (last week) working with SAGE++ I am not able
to write a FAQ list. My only problem are these undocumented functions.
Of course it is possible to have a look at the sources of SAGE++ but
this takes time, so a try to avoid it.
For a short intro one can read the .ps file
simply click on OONSKI 94 and you get a 17 page intro, which covers
most of the features.
Return to the
Search the comp.compilers archives again.