[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

forwarded message from owner-soot-list@sable.mcgill.ca



I'm forwarding a submission which was bounced from soot-list last
week because the submitter is not a member of the list (I
originally suggested that the submitter join the list and then
resend the question, but he has opted not to).  

So if you answer the question, you'll need to CC the answer to
rvprasad@ksu.edu, as well as to soot-list.



>From sysadmin@sable.mcgill.ca  Sun Jun 10 03:25:08 2001
Received: from ccn.CS.McGill.CA (ccn.CS.McGill.CA [132.206.3.87])
	by gloom.cs.mcgill.ca (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id DAA18837
	for <soot-list@sable.mcgill.ca>; Sun, 10 Jun 2001 03:25:07 -0400
Received: from mailhub.cns.ksu.edu (root@grunt.ksu.ksu.edu [129.130.12.17])
	by ccn.CS.McGill.CA (8.9.3/8.9.3) with ESMTP id DAA43846
	for <soot-list@sable.mcgill.ca>; Sun, 10 Jun 2001 03:25:05 -0400 (EDT)
	(envelope-from rvprasad@ksu.edu)
Received: from ksu.edu (mA31-093.dialin.k-state.net [129.130.231.93])
	by mailhub.cns.ksu.edu (8.9.1/8.9.1/mailhub+tar) with ESMTP id CAA19803
	for <soot-list@sable.mcgill.ca>; Sun, 10 Jun 2001 02:25:03 -0500 (CDT)
Sender: venku@ksu.edu
Message-ID: <3B2320BA.80C6EE90@ksu.edu>
Date: Sun, 10 Jun 2001 02:24:42 -0500
From: Venkatesh Prasad Ranganath <rvprasad@ksu.edu>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-22 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: soot-list@sable.mcgill.ca
Subject: Q: getBoxesPointingToThis()
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

Version of soot: 1.0.0

It is my understanding that q.getBoxesPointingToThis(), where q is a
Stmt, should return a list of UnitBoxes which may transfer control to
the statement, q.  Is this correct?  If so, is the preceeding non-jump
statement considered as a Unit pointing to the current Unit?  It is
strange that when I get to a target UnitBox, retrieve it's pointing set
and print all I ever see is the current target printed the number of
times the size of set and not the sources.

public void caseTableSwitchStmt(TableSwitchStmt v)
{
  	cat.error("TSwitchStmt: " + v);
  	cat.error("TSwitchStmt: -- " + v.getDefaultTarget());
  	for (Iterator i =
((Stmt)v.getDefaultTarget()).getBoxesPointingToThis().iterator();
i.hasNext();)           {
  		cat.error("TSwitchStmt: >> " + ((UnitBox)i.next()).getUnit());
  	} // end of for (Iterator i =
((Stmt)v.getTarget()).getBoxesPointingToThis().iterator(); i.hasNex();)
}

When I execute the above code, I expect to see the last statement in
each case block, but rather I see the target printed the same number of
times as there are case blocks.

Could the maintainers of soot or others who have a better understanding
explain the situation?

waiting for reply,

 - Venkatesh