<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hello,<br>
<br>
Thanks for building and maintaining soot!<br>
<br>
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>
<br>
<pre>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>
So, is there some way to implement this hypothetical G.save_state()
method?<br>
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>
<br>
Said otherwise, instead of doing that :<br>
<br>
<pre>app --parse---> initial soot Scene ---P1---> scene s ----instrument1--> app1</pre>
<pre>app --parse---> initial soot Scene ---P1---> scene s ----instrument2--> app2</pre>
<br>
I'd like to do that :<br>
<br>
<pre> ,---instrument1--> app1
app --parse---> initial soot Scene ---P1---> scene s |
`---instrument2--> app2
</pre>
<br>
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>
<br>
Best,<br>
Pierre<br>
</body>
</html>