[Soot-list] Geometric Encoding: points-to set

Florian Strauß f_straus at cs.uni-kl.de
Sun Jun 10 07:24:11 EDT 2012


Hi Richard,

thanks for your reply.

I downloaded the nightly built version from
http://vandyk.st.informatik.tu-darmstadt.de/abc/soot.jar
Are there changes in the API ? Because now I get imprecise points-to results
(= I don't see a difference compared to Spark).

Example:
public class AMain{
	public static void main(String[] args){
		ClassA c1 = new ClassA();
		ClassA c2 = new ClassA();
		
		Object o1 = new Object();
		Object o2 = new Object();
		
		c1.setO(o1);
		c2.setO(o2);
		
		Object testVariable1 = c1.getO();
		Object testVariable2 = c2.getO();
		
		testVariable1.equals(testVariable2);
	}	
}

public class ClassA{
	Object o;
	public Object getO() {
		return o;
	}
	public void setO(Object paramO) {
		this.o = paramO;
	}
}

-----
Output older soot version:

1 starts working on untitled benchmark.
Preprocess Time : 0,015s 

Round 0 : 
Reachable Methods = 9, in which #Condensed Nodes = 10, #Full Context Nodes =
0 Maximum SCC = 1 The maximum context size = 4.000000e+00 We have 19 legal
constraints at the beginning, occupies 0,475 of the total.
Totally 5 virtual edges, we find 0 of them are obsoleted.
Current Reachable Methods = 10, Originally = 9 

Geometric [Time] : 0,000s
Geometric [Memory] : 14,445MB 

Points-to set testVariable1:
AllocNode 3 new java.lang.Object in method <tests.data.simpleTest.AMain:
void main(java.lang.String[])>, Points-to set testVariable1:
AllocNode 4 new java.lang.Object in method <tests.data.simpleTest.AMain:
void main(java.lang.String[])>, Non empty intersection? false

----
Nightly build version:
Geom starts working on untitled benchmark.

Round 0 : 
Reachable Methods = 9, in which #Condensed Nodes = 10, #Full Context Nodes =
0 Maximum SCC = 1 The maximum context size = 4.000000e+00 We have 19 legal
constraints at the beginning, accounting for 47,5% of the total.
Totally 5 virtual edges, we find 0 of them are obsoleted.

Sorry, it's not necessary to iterate more times. We stop here.

Preprocess [Time] : 0,000s
Geometric [Time] : 0,265s
Geometric [Memory] : 14,454MB 

Points-to set testVariable1:
AllocNode 4 new java.lang.Object in method <tests.data.simpleTest.AMain:
void main(java.lang.String[])>,AllocNode 3 new java.lang.Object in method
<tests.data.simpleTest.AMain: void main(java.lang.String[])>, Points-to set
testVariable2:
AllocNode 4 new java.lang.Object in method <tests.data.simpleTest.AMain:
void main(java.lang.String[])>,AllocNode 3 new java.lang.Object in method
<tests.data.simpleTest.AMain: void main(java.lang.String[])>, Non empty
intersection? true


Thanks for your help
Regards,
Florian



-----Ursprüngliche Nachricht-----
Von: frogxx at gmail.com [mailto:frogxx at gmail.com] Im Auftrag von Richard Xiao
Gesendet: Freitag, 8. Juni 2012 21:59
An: Florian Strauß
Cc: soot-list at sable.mcgill.ca
Betreff: Re: [Soot-list] Geometric Encoding: points-to set

Hi, Florian Strauß:

Thanks a lot for your interest in the geometric encoding and your report.
Please download and try the nightly built version to see if the problem is
still there. I have changed the code a lot since the
2.5 release. Since I'm on a travel, I will try your case myself and fix the
problem soon.

Regards,
Richard



On 6/8/12, Florian Strauß <f_straus at cs.uni-kl.de> wrote:
> Hello,
>
>
>
> thanks for your help in the past.
>
> For my alias analysis I am using the Geometric Encoding approach. It 
> works fine in most of the cases, but I am wondering about the results 
> in the following example:
>
>
>
> public class AMain {
>
>
>
>        Object field = new Object();
>
>
>
>        public static void main(String[] args) {
>
>              AMain thisMain = new AMain();
>
>              Object alias = thisMain.field;
>
>              alias.equals(alias);
>
>        }
>
>
>
> }
>
>
>
>
>
> If I ask for all reachable Objects of field, I expect a representation 
> of new Object().
>
> Unfortunately, the returned points-to set is empty. Do you have an 
> idea, what am I doing wrong?
>
>
>
> More details about my configuration:
>
> I use the following options
>
>              Options.v().setPhaseOption("cg","implicit-entry:false");
>
>
>
>              //spark configuration
>
>              Options.v().setPhaseOption("cg.spark","enabled:true");
>
>
> Options.v().setPhaseOption("cg.spark","string-constants:true");
>
>              
> Options.v().setPhaseOption("cg.spark","field-based:false");
>
>
> Options.v().setPhaseOption("cg.spark","empties-as-allocs:true");
>
>              Options.v().setPhaseOption("cg.spark","on-fly-cg:true");
>
>
> Options.v().setPhaseOption("cg.spark","merge-stringbuffer:false");
>
>              //Spark + Geometric Encoding
>
>              Options.v().setPhaseOption("cg.spark","geom-pta:true");
>
>
>
>
>
> I cannot explain the results of
> Scene.v().getPointsToAnalysis().reachingObjects(local, field);
>
> If I use Spark only (= geom-pta:false), then it returns an allocation 
> node (AllocNode 4 new java.lang.Object in method <AMain: void 
> <init>()>,) , which is the same allocation node being reachable from 
> the local variable alias.
> Otherwise the points-to sets of thisMain.field  and  alias are 
> different, because the points-to set of alias is empty.
>
>
>
> Could you please help me?
>
>
>
> Have a good weekend
>
> Florian
>
>
>
>
>
>
>
>
>
>


--
One day I met you then love appears to the world.




More information about the Soot-list mailing list