sage++ package and a question

Frank Schinkmann <fkschink@cpc.wmin.ac.uk>
22 Jan 1997 00:16:56 -0500

          From comp.compilers

Related articles
sage++ package and a question fkschink@cpc.wmin.ac.uk (Frank Schinkmann) (1997-01-22)
| List of all articles for this month |

From: Frank Schinkmann <fkschink@cpc.wmin.ac.uk>
Newsgroups: comp.compilers
Date: 22 Jan 1997 00:16:56 -0500
Organization: Compilers Central
Keywords: tools, question

Hello


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
about it).


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


http://www.extreme.indiana.edu/sage/docs.html


simply click on OONSKI 94 and you get a 17 page intro, which covers
most of the features.


Regards


Frank Schinkmann


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.