[Soot-list] Ball-Larus algorithm
Marc-André Laverdière-Papineau
marc-andre.laverdiere-papineau at polymtl.ca
Fri Apr 12 20:50:30 EDT 2013
Hello,
I don't know enough of Soot's internals to know what algorithms are
implemented and which ones are not, so I have the suspicion you'd have
to look at the code a bit.
Coming to your second question, I may be able to give answers :)
The first thing is that the Jimple IR is statement-based, which may be
helpful for you or not.
The Shimple IR is Jimple + SSA, so the same observation should be valid.
To observe the statements, you can use SootMethod.getActiveBody().getUnits()
But there is no need to build the CFG yourself though, as Soot has many
options to do that for you. You can look at the classes implementing
ExceptionalGraph<N> to see which option makes more sense for your
particular problem.
Ideally, you could put your algorithm in a BodyTransformer and add it to
one of the phases that accepts extra transformers (jtp, IIRC). Then your
code will be executed for every method.
I hope I was clear, and best of luck in your implementation.
Marc-André Laverdière-Papineau
Doctorant - PhD Candidate
On 13-04-10 01:08 PM, Nuno Machado wrote:
> Hi everyone,
>
> I was wondering if there is already an implementation in Soot of the Ball-Larus algorithm for path profiling (after quickly googling for it I only found one for LLVM). If not, what is the best way to deal with CFGs and basic blocks in Soot? Should I also use the BodyTransformer?
>
> Thank you for your time,
> Nuno
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
More information about the Soot-list
mailing list