From owner-sc22wg5@open-std.org  Thu Jan 29 11:07:22 2009
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id C373CC56CFF; Thu, 29 Jan 2009 11:07:22 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ns.nag-j.co.jp (218-42-159-107.cust.bit-drive.ne.jp [218.42.159.107])
	by www2.open-std.org (Postfix) with ESMTP id 1B09EC56CF9
	for <sc22wg5@open-std.org>; Thu, 29 Jan 2009 11:07:20 +0100 (CET)
Received: from 218-42-159-108.cust.bit-drive.ne.jp ([218.42.159.108] helo=[127.0.0.1])
	by ns.nag-j.co.jp with esmtp (Exim 4.50)
	id 1LSTmz-0003Rw-2E
	for sc22wg5@open-std.org; Thu, 29 Jan 2009 19:06:25 +0900
Message-ID: <49817FEE.9010404@nag-j.co.jp>
Date: Thu, 29 Jan 2009 19:07:42 +0900
From: Malcolm Cohen <malcolm@nag-j.co.jp>
User-Agent: Thunderbird 3.0a1pre (Windows/2008022014)
MIME-Version: 1.0
To: sc22wg5 <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.3935)   Call graph generator?
References: <20090129014452.0D13AC178D9@www2.open-std.org>	<20090129030501.C80B3C56CF9@www2.open-std.org> <20090129091105.A40CDC178D9@www2.open-std.org>
In-Reply-To: <20090129091105.A40CDC178D9@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk



N.M. Maclaren wrote:
>
> This isn't TOTALLY off-list, so please bear with me.  WHICH call graph?
> I assume that it is one of the static ones (i.e. A has the potential to
> call B).
Yes.
>
> The simple one consists only of the explicit calls, with no procedure
> arguments.
>
> With procedure arguments, there is a question of which procedure should
> be classed as the caller:  the one that declares the external
It does not do that - it only adds them for actual invocations.
> or the one(s)
> that call the argument.
This tool effectively "clones" the called procedure when this happens, 
so you get lines like

   SS(DUMMY=FRED)
and
   SS(DUMMY=BANANA)

and in those, counts references to the dummy as references to the 
particular actual.

I'm not sure I would have chosen to do it like that (I didn't write the 
tool), but I think it is a reasonable approach.
>
> With procedure variables, things get even hairier,
That is certainly true, though in this case the English version is one 
release behind so does not accept procedure arguments anyway.  Hmm, I'll 
have to go and make sure it does something reasonable... whatever that is!

Cheers,
-- 
.......................Malcolm Cohen, Nihon NAG, Tokyo.


