[Prev][Next][Index]

tag probems (was: Re: an example ...)




[Re: Juan's problem with tags which should not be there]

I have fixed this, or at least I think so. As soon as I have sent this
message, I will check in new versions of 
	instr/cgm.C
	Sage++/extentions/sgCallGraph.C
	lib/include/sage++callgraph.h
so look for those in a couple of hours. All changes are minor.

What I have done is make the code for -dumpch and -dumptxt do another
level of lookup: a function symbol is first resolved to get the real
symbol for that symbol, then the id (tag) of the latter symbol is
gotten. The problem is essentially that any symbol which is not obtained
from the call graph (as is the case when dumping the class hierarchy:
symbols are taken out of the Sage tables by the class hierarchy code)
must be resolved in the context of the call graph before being used;
this was not done by the existing code.

What I have not corrected is the problem that you may sometimes receive
duplicate information, precisely when there is more than one function
with the same name and scope and the same number of argument, regardless
of types -- the tag of the first of the functions will be used for all
of them, but other information given for each may or may not be
identical. For example,

  ctag: 3 foo -
 cfile: 1 juan1.pc @ 1.0 1.9 1.9 4.1
 cbase:
  cpos: { - - } { - - } { - - } { - - }
 cmpos: { 6 2.2 2.5 } { 6 3.2 3.5 }

Notice that foo has one tag in two instances with differing information.
To the extent that this is a bug, it will not be fixed; I think we are
getting to the point with cgm and the tools where a good parser is needed
to resolve the significant remaining problems.

I have also added another command line switch to cgm: "-nohack" will
turn off all attempts to correct or alter the overloading information
given to the program by Sage. (This means function forward declaration
will again be messed up.)

--lars