<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi.
<div class=""><br class="">
</div>
<div class="">Unfortunately not. We are working on a new Soot variant that supports such snapshots of the Scene.</div>
<div class=""><br class="">
</div>
<div class="">However, I’ve implemented a serialisation feature sometime ago which you could use to serialize your Scene state to a binary file and re-apply it before each new analysis run. This should save a lot of time since the state will already contain
 the completely parsed and transformed Jimple code for the read-in classes.</div>
<div class="">The feature is not yet merged into the official Soot repository. I still might be able to give you access, if there is interest.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Manuel<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">Am 30.06.2020 um 15:15 schrieb Pierre Wilke <<a href="mailto:pierre.wilke@centralesupelec.fr" class="">pierre.wilke@centralesupelec.fr</a>>:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hello,<br class="">
<br class="">
Thanks for building and maintaining soot!<br class="">
<br class="">
I'd like to know whether it's possible to save Soot's state at some point during its execution and from this point run several distinct instrumentations. Something along the lines of :<br class="">
<br class="">
<pre class="">init_stuff();
Scene.v().loadNecessaryClasses();
...
// perhaps run a first pack P1
PackManager.v().runPacks()
// now save state
HypotheticalSootSavedState s = G.save_state();
// apply first instrumentation
PackManager.v().runPacks()
PackManager.v().writeOutput()
// restore saved state
G.restore_state(s)
// apply second instrumentation
PackManager.v().runPacks()
PackManager.v().writeOutput()</pre>
<br class="">
So, is there some way to implement this hypothetical G.save_state() method?<br class="">
I could of course launch Soot twice, but I would end up parsing and performing my first pack P1 twice, when I only need to do it once.<br class="">
<br class="">
Said otherwise, instead of doing that :<br class="">
<br class="">
<pre class="">app --parse---> initial soot Scene ---P1---> scene s ----instrument1--> app1</pre>
<pre class="">app --parse---> initial soot Scene ---P1---> scene s ----instrument2--> app2</pre>
<br class="">
I'd like to do that :<br class="">
<br class="">
<pre class="">                                                     ,---instrument1--> app1
app --parse---> initial soot Scene ---P1---> scene s |
                                                     `---instrument2--> app2
</pre>
<br class="">
I suspect this old message ( <a class="moz-txt-link-freetext" href="https://mailman.cs.mcgill.ca/pipermail/soot-list/2014-December/007612.html">
https://mailman.cs.mcgill.ca/pipermail/soot-list/2014-December/007612.html</a> ) might be related, but I'm unfortunately not familiar enough with soot or Clojure to be able to translate this solution into the Java equivalent.<br class="">
<br class="">
Best,<br class="">
Pierre<br class="">
</div>
_______________________________________________<br class="">
Soot-list mailing list<br class="">
<a href="mailto:Soot-list@CS.McGill.CA" class="">Soot-list@CS.McGill.CA</a><br class="">
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>