<div dir="ltr">Hi,<div><br></div><div>Yes, using retrieveActiveBody works better. Any idea on the Reachable Methods vs. Listing all Invoke expressions? I am guessing that using reachable methods is more precise since it will not give me any dead code</div><div><br></div><div>-earlence</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 11:04 AM, Marc Miltenberger <span dir="ltr">&lt;<a href="mailto:Marc.Miltenberger@cased.de" target="_blank">Marc.Miltenberger@cased.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi there,<br>
  as far es I know, both are correct usages.<br>
<br>
  getActiveBody might fail if the method has not been loaded yet (with<br>
retrieveActiveBody) or if the method has not have an implementation at<br>
all such as interface methods or native methods.<br>
<br>
Marc<br>
<div><div class="h5"><br>
Am 28.07.2015 um 19:59 schrieb Earlence Fernandes:<br>
&gt; I am writing a pack that generates a list of all method calls made by a<br>
&gt; program. Currently, my strategy is to use a SceneTransformer (wjtp) that<br>
&gt; will simply useScene.v().getReachableMethods() (for a given set of entry<br>
&gt; points I defined when setting up the pack). Is this the correct use?<br>
&gt;<br>
&gt; Another strategy is to write a BodyTransformer that will iterate each<br>
&gt; Stmt in a body and then determine if it&#39;s a method call.<br>
&gt;<br>
&gt; Which strategy is the correct one?<br>
&gt;<br>
&gt; Also, I tried iterating Stmts from a SceneTransformer using<br>
&gt; getActiveBody but sometimes that throws a runtime exception saying that<br>
&gt; there is no active body.<br>
&gt;<br>
&gt; -Earlence<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Soot-list mailing list<br>
&gt; <a href="mailto:Soot-list@CS.McGill.CA">Soot-list@CS.McGill.CA</a><br>
&gt; <a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" rel="noreferrer" target="_blank">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a><br>
<br>
_______________________________________________<br>
Soot-list mailing list<br>
<a href="mailto:Soot-list@CS.McGill.CA">Soot-list@CS.McGill.CA</a><br>
<a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" rel="noreferrer" target="_blank">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a><br>
</blockquote></div><br></div>