<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Linghui,<div class=""><br class=""></div><div class="">Thanks for your suggestion.</div><div class=""><br class=""></div><div class="">Unfortunately, it does not work in my problem.</div><div class="">I used the following command:</div><div class=""><br class=""></div><div class="">$ java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j -p jop enabled z12</div><div class="">$ java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f s -p jop enabled z12</div><div class=""><br class=""></div><div class="">The jimple outputs are the same as before. </div><div class=""><br class=""><div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Best,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">- Kihong Heo</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">2017. 8. 21. 오전 3:56, Linghui Luo <<a href="mailto:linghui.luo@uni-paderborn.de" class="">linghui.luo@uni-paderborn.de</a>> 작성:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Hi Kihong,<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">I think you should take a look into the Jimple Optimization Pack<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><a href="https://soot-build.cs.uni-paderborn.de/doc/sootoptions/#phase_15" style="color: purple; text-decoration: underline;" class="">https://soot-build.cs.uni-paderborn.de/doc/sootoptions/#phase_15</a><o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">best regards,<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Linghui<o:p class=""></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><a name="_MailEndCompose" class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><o:p class=""> </o:p></span></a></div><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">Von:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span>Soot-list [<a href="mailto:soot-list-bounces@CS.McGill.CA" class="">mailto:soot-list-bounces@CS.McGill.CA</a>]<span class="Apple-converted-space"> </span><b class="">Im Auftrag von<span class="Apple-converted-space"> </span></b>K</span><span lang="DE" style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">ihong Heo<br class=""><b class="">Gesendet:</b><span class="Apple-converted-space"> </span>Montag, 21. August 2017 04:15<br class=""><b class="">An:</b><span class="Apple-converted-space"> </span><a href="mailto:soot-list@CS.McGill.CA" class="">soot-list@CS.McGill.CA</a><br class=""><b class="">Betreff:</b><span class="Apple-converted-space"> </span>[Soot-list] registers in Jimple<o:p class=""></o:p></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Hi Soot users,<o:p class=""></o:p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Is there any way to optimize the number of registers when translating to Jimple?<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I run Soot on the Ashes(<a href="http://www.sable.mcgill.ca/ashes/" style="color: purple; text-decoration: underline;" class="">http://www.sable.mcgill.ca/ashes/</a>) benchmarks. <o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">One constructor of a class (symjpack-t/classes/z12.class, I attached) has thousands of registers<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">in Jimple (actually bytecode -> Jimple is not a big problem, only 3 seconds).<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">Consequently it takes very long time (5 minutes) when I transform the Jimple file into Shimple. <o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">The bottle neck is the constructor of z12.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I disassembled the constructor (because I couldn’t find the java source file of the class), it looks like:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: 'Times New Roman', serif;">/* disassembled JAVA code */<br class="">public z12() {<br class="">    z7[] arrayOfz7 = new z7[1500];<br class="">    arrayOfz7[0] = new z7("0", 14, null, null, this.z0);<br class="">    arrayOfz7[1] = new z7(null, 9, arrayOfz7[0], arrayOfz7[0], this.z0);<br class="">    …<br class="">    arrayOfz7[1499] = new z7(...);<br class="">}<o:p class=""></o:p></p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">This code is translated to <o:p class=""></o:p></div></div><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: 'Times New Roman', serif;">/* Jimple  */<br class="">public z12() {<br class="">    r1 = newarray (z7)[1500];    //  z7[] arrayOfz7 = new z7[1500];<br class="">    ….<br class="">    specialinvoke $r6.<init>("0", 14, null, null, $r7);  //  new z7();<br class="">    r1[0] = $r6;                                                          // arrayOfz7[0] = ...<br class="">    $r8 = new z7;<br class="">    $r10 = r1[0];<br class="">    $r11 = r1[0];<br class="">    $r9 = r0.z0;<br class="">    specialinvoke $r8.<init>(null, 9, $r10, $r11, $r9);<br class="">    r1[1] = $r8;                                                          // arrayOfz7[1] = ...<br class="">    $r12 = new z7;<br class="">    $r15 = r1[1];<br class="">    $r13 = r1[0];<br class="">    $r14 = r0.z0;<br class="">    ….<br class="">    r1[1499] = …<br class="">    $r6919 = …<br class="">}<o:p class=""></o:p></p></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">As you can see, the Jimple file is almost in the form of SSA as it is,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">so it seems to take a long time because of the large number of registers.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">I used the latest Soot with the following command:<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j z12   #for jimple<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">java -cp soot-trunk.jar soot.Main -cp symjpack-t/classes -pp -f j z12   #for shimple</div></div></div></div></blockquote></div><br class=""></div></body></html>