<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div style="-webkit-text-size-adjust: auto;">You might want to check out the Java String Analysis (JSA) work. It's been used to some cases if reflective invocation.</div><div style="-webkit-text-size-adjust: auto;"><br></div><div><span style="-webkit-text-size-adjust: auto;"><a href="http://www.brics.dk/JSA/">http://www.brics.dk/JSA/</a></span><br><br><span style="-webkit-text-size-adjust: auto;">~Benjamin Holland</span></div><div style="-webkit-text-size-adjust: auto;"><br>On Sep 5, 2015, at 5:35 PM, Andrew Bedford <<a href="mailto:andrew.bedford.1@ulaval.ca">andrew.bedford.1@ulaval.ca</a>> wrote:<br><br></div><blockquote type="cite" style="-webkit-text-size-adjust: auto;"><div>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
<div class="WordSection1">
<p>Hi!</p>
<p><o:p> </o:p></p>
<p>I am trying to use the points-to analysis of Soot (spark) to statically resolve reflection calls in Android applications. I have a question regarding the string propagation. Let’s suppose that we have the following code:</p>
<p><o:p> </o:p></p>
<p> String a = “hello”</p>
<p> String b = “world”</p>
<p> String c = a</p>
<p> c = b</p>
<p> String d = a + c</p>
<p><o:p> </o:p></p>
<p>The points-to analysis (with the “string-constants” and “simulate-natives” options turned on) returns something like this:</p>
<p>PointsTo(a) = {“hello”}</p>
<p>PointsTo(b) = {“world”)</p>
<p>PointsTo(c) = {“hello”, “world”}</p>
<p>PointsTo(d) = {new Alloc of String}</p>
<p><o:p> </o:p></p>
<p>Is there a way to set it up so that the PointsTo(d) returns instead {“hellohello”, “helloworld”}? Or is another type of analysis required?</p>
<p><o:p> </o:p></p>
<p>Thanks!</p>
<p><o:p> </o:p></p>
</div>
</div></blockquote><blockquote type="cite" style="-webkit-text-size-adjust: auto;"><div><span>_______________________________________________</span><br><span>Soot-list mailing list</span><br><span><a href="mailto:Soot-list@CS.McGill.CA">Soot-list@CS.McGill.CA</a></span><br><span><a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a></span><br></div></blockquote></body></html>