[Soot-list] Slicing or transitive closure RD

Zeinab Lashkaripour lashkaripour at yahoo.com
Sun Jun 30 02:13:21 EDT 2013


Is there anybody to guide me?
It seems that both solutions could work but, maybe slicing takes more effort.

Regards


________________________________
 From: Zeinab Lashkaripour <lashkaripour at yahoo.com>
To: "soot-list at sable.mcgill.ca" <soot-list at sable.mcgill.ca> 
Sent: Saturday, June 29, 2013 3:54 PM
Subject: Slicing or transitive closure RD
 




Hi everyone,

I was getting information about Indus from Venkatesh Prasad Ranganath in order to use there slicer for the issue I want to solve mentioned in [1] (which has been previously discussed in the list) and he said:

> Here's a simple solution to the simplified version of the problem -- w/o aliasing and concurrency.  
> For every function,
	1. calculate the def-use relation that relates every def to every use site.  Note, 
every def site is an assignment statement; hence, most often, every def 
site is also a use site (because of the LHS expression). 
	2. calculate the transitive closure of the above relation.
	3. identify the expressions influenced by function parameter definition 
site d as every use site u such that (d, u) is a member of the above 
transitive relation. 

> The def-use relation may be influenced by the granularity of expressions 
and statements. 
> Something to keep in mind while implementing the above 
idea.

I am not aware of transitive closure therefore could the compiler experts please tell me what I should do?
Is the above solution enough or do I need slicing in my case?

Regards,
Zeinab

[1]
I have some functions that they have inputs. In these functions these inputs can be used in local variables of the function,
 inside loop conditions (I only need intra-procrdural information).
I want to identify those local variables 
that have used these inputs and also process loop conditions to see if 
they are related to the input or not. (relation with input in condition 
and local variable can be direct or indirect)

Consider the function bellow:
(I should mention that by loop I mean both loops and if-else statements)
fn (input1)
{
      loop with condition related to input -----> direct / indirect / not  related
      {
             string that can use the input either direct or indirect
      }
 }

I
 might have the situations bellow that I want to extract these parts and use
 them for adding transformation (in some cases even the body of "else" might be needed):

	1. no loop only the string that uses the input (direct or indirect) -> I want that string
	2. loop's condition is not related to the input but has a string that uses the input inside the loop -> I want that string
	3. loop's condition is related to the input (direct or indirect) but has no 
string that uses the input inside the loop -> I want that condition
	4. loop's condition is related to 
the input (direct or indirect) and has a string that uses the input 
inside the loop -> I want that condition and the string
As I said loops might be if-else statements therefore there might be an else and that should be considered too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130629/799ff620/attachment.html 


More information about the Soot-list mailing list