C++ Source to Source and Analysis Responses

"Terrence M. Brannon" <brannon@rana.usc.edu>
18 Feb 1996 13:28:12 -0500

          From comp.compilers

Related articles
C++ Source to Source and Analysis Responses brannon@rana.usc.edu (Terrence M. Brannon) (1996-02-18)
| List of all articles for this month |

From: "Terrence M. Brannon" <brannon@rana.usc.edu>
Newsgroups: comp.compilers
Date: 18 Feb 1996 13:28:12 -0500
Organization: Compilers Central
Keywords: C++, tools, summary

Enclosed is a RFC934 digest of the responses I got for the C++ Source
to Source tools. Sage would have been an excellent choice but it does
not appear to be upgraded for gcc 2.7.0. I don't know how Sage is with
Cfront as I haven't tried. All the others are commercial so I haven't
looked into them.

As a general tip, a lot of the C++ Parallel Languages probably have to
do this sort of thing. Sage is part of pC++, a data-parallel C++
developed at U. Indiana. They are now collaborating with Caltech to
create High Performance C++ because Caltech's parallel C++ was
task-parallel and they hope to create the best of both worlds. I have
a few pointers to these sorts of systems in my bookmarks on my home
page --- Mentat, Illinois Concert C++, and some others.

------- start of digest (7 messages) (RFC 934 encapsulation) -------

From: "john (j.d.) hickin" <hickin@bnr.ca>
Subject: Re: C++ Application Analysis/Transformation Tool Needed
Date: Mon, 12 Feb 1996 11:00:45 -0500

The C++ Auditor may be useful. I havn't used it but I have seen a reference to
it. This tool may be too general or powerful for your application but you be
the judge of that.

Write to Declarative Systems and ask for info on the C++ Auditor. Their email


- --
John Hickin Nortel Technology, Montreal, Quebec
(514) 765-7924 hickin@bnr.ca


From: jcoffin@rmii.com (Jerry Coffin)
Subject: Re: C++ Application Analysis/Transformation Tool Needed
Date: Tue, 13 Feb 1996 06:57:16 GMT

On 11 Feb 1996 19:42:39 -0000, you wrote:

>I need a (C++-based) library which will take a compiled C++
>application and allow me to search this application for its symbols
>and once I have the list of symbols, query each symbol for its type
>(ie, variable, constant, function).

Generally speaking, this isn't possible. This information is
generally lost during compilation. If the C++ is being written by the
user so you can require that they include debugging information,
you'll stand a much better chance, but the format used to store
debugging information is _extremely_ non-portable. On most UNIX
systems you can use nm to get some information, which you can then
massage into a form of your choosing. Other systems frequently
include similar tools, but the names vary widely, and the format in
which information is presented vary even more so. (In fact, there's
some variation in the output format of different versions of nm.)

In addition, once you obtain the debugging information, you'll have to
demangle names of functions. Since name mangling is specific to a
particular compiler, this will further narrow the scope of the tool.
Some versions of nm also know how to demangle names for you, but these
generally work only with a specific compiler. (E.g. on at least some
ports of UNIX Sys Vr4, nm knows about cfront's name mangling, but
fails if you use gcc instead. )

>The reason is I have written a C++-based neurosimulator and instead of
>forcing the user to manually tie his (Tcl/Perl) code to C++, I would
>like to scan the C++ for all scriptable components (ie, variables,
>control flow) and present them to the user in an GUI.

As long as you're interested only in supporting a single compiler on a
single machine, this may not be terribly difficult. If you want a
general, portable solution, you'll probably have to parse the source
code instead of dealing with compiled applications. However, parsing
C++ source code is a decidedly non-trivial task to start with, and
this is only useful if you _have_ source code -- if you want to
support shrink-wrap software on things like PCs running MS-DOS, you
generally won't have source code...


From: collison@iced.com (Mike Collison)
Subject: Re: C++ Source Transformation/Analysis Tool Needed
Date: Wed, 05 Jan 94 03:17:01 PST

Check out sage++ at:




From: tmoog@mcs.com (Thomas H. Moog)
Subject: Re: C++ Source Transformation/Analysis Tool Needed
Date: Tue, 13 Feb 96 16:55 CST

A few years ago there was a C++ pre-processor (it really knew C++)
which had a C++ like macro language which was integrated with it. The
macro language supported compile-time symbols, flow control, and could
test information about C++ variables at macro-time.

Contact arsoftware@aol.com

You could also contact jss@declarative.com for a C++ symbol table

Tom Moog
From: Zsolt Koppany <zkoppany@multix.de>
Subject: Announce: PathFinder 3.1
Date: 15 Feb 1996 09:07:34 GMT
Organization: multiX Software

                                        We are pleased to announce PathFinder 3.1

PathFinder is a code analyze, reverse engineering tool to understand,
develop and document C/C++, FORTRAN and iTcl source codes. PathFinder
dramatically reduces the learning curve of Large Fortran code and C++
class libraries, and helps in re-structuring and re-engineering
existing software. PathFinder directs you with an intuitive graphical
interface through the analysis, change, compile and debug cycles. It
is capable to analyze:

            o 1 MILLION lines of source code
            o to parse 100,000 lines takes less than one minute

even incomplete and erroneous code can be parsed, no compiler is
required. The parser is customizable for special, proprietary language
extensions. The ability to parse incomplete code is an invaluable aid
porting code incomplete or incompilable on the new platform.

Key Features:
            o Ease to use, full Visual interface like PC GUIs
            o Motif & Windows
            o Graphical editor with syntax coloring
            o Revision Control Support
            o Project editor to select/deselect files and directories for projects
            o Symbol browser to search for specific symbols and declarations/definitions
            o comprehensive GUI editor
            o Info Retriever with regular expressions
            o Cross referencer with interactive traversing, You can find who calls who, who refes to who
            o Difference visualization between source versions
            o Make interface
            o Symbol table interface to extract Symbols, and save as flat file
            o Full documented API for custom solutions
            o Generates PostScript output
            o Symbol Browser

Free evaluation Kit:
The evaluation kit, and evaluation license is free of charge. The get
more info about PathFinder with screen images or download the
evaluation kit code please visit:


The Evaluation kit (for SUN/Solaris and HP9000/700) contains a
restricted C/C++ parser only. To download the binaries please register
yourself, a license code will be generated and mailed to your mail

Release Notes for PathFinder 3.1

PathFinder 3.1 has been released on 9 February 1996 for SunOS 4.1,
Solaris 2.4 and HP-UX 9 platforms. The most important new features:

                o Full FORTRAN support including extensions:
structures,includes .... (Fortran sources
                    can contain `C' preprocessor instructions too).
                o The Cross reference tool provides information for function,
subroutine structure,
                      common and local variable usage.
                o New layout styles in the Hierarchy browser and in the Cross
reference tool.
                o Multiple (class, common and file) browsers can be activated.
                o When a new project is created, the names of the files -
found in the project
                    and in sudirectories - are displayed in a graphic tree to
select the files to
                    include in the new project.
                o Every tool can be activated from every application.
                o The `Grep' tool highlights the found patterns.

Platforms Unix:
            IBM/RS6000 (3.0)

Platforms PC/Windows:
            NT 3.5*
            Windows 95


Post a followup to this message

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