[Soot-list] How to obtain the topological graph in the transactional transformation phase (wjtp.tn)?

Eric Bodden eric.bodden at mail.mcgill.ca
Thu Nov 27 09:39:35 EST 2008


Marco does this happen when you apply Soot to any application or only
if you apply it to one special program? In the latter case it would
help to know what program that would be.

Cheers,
Eric

2008/11/27 Marco Bakera <marco.bakera at tu-dortmund.de>:
> On Monday 10 November 2008 19:42:52 Richard L. Halpert wrote:
>>
>> 1) The LockAllocator uses a may-alias relationship to group locks together
>> - so if lock1 in *may* be the same as lock2, they would be treated as a
>> single lock (and the two critical sections would be put in the same
>> CriticalSectionGroup).  The Lock allocator constructs this graph for the
>> sake of deadlock detection.  You can use the deadlock detection graph by
>> calling
>> soot.jimple.toolkits.thread.synchronization.LockAllocation.getDeadlockGraph
>>(). The nodes are CriticalSectionGroups, and the edges represent calls from
>> a critical section in one group to a critical section in another group.  Be
>> sure to call Soot with "-p wjtp.tn avoid-deadlock:false", or else the
>> deadlock detector may stop constructing the graph early if it finds
>> potential deadlock.
>
> That sounds great and I will use this. :) Thanks for that hint. However when
> trying the following lines of code.
>
>                String args =
>                        "-w --app " +
>                        // options for call graph creation
>                        "-p cg.cha enabled:false " +
>                        "-p cg.spark enabled:true " +
>                        // options for whole jimple transformation pack
>                        "-p wjtp.tn enabled:true " +
>                        "-p wjtp.tn avoid-deadlock:false " +
>                        "-p wjtp.tn do-tlo:false " +
>                        "-p wjtp.tn do-mhp:true " +
>                        // the main application class
>                        mainClass.getName();
>
>                // start soot
>                LOG.debug("Starting Soot with command line: "+args);
>                Main.main(args.split(" "));
>
> I get the following exception from the main method:
>
> java.lang.RuntimeException: trying to hash null value.
>        at soot.util.HashChain.getPredOf(HashChain.java:338)
>        at soot.PatchingChain.getPredOf(PatchingChain.java:225)
>        at
> soot.toolkits.graph.ExceptionalUnitGraph.buildExceptionDests(ExceptionalUnitGraph.java:337)
>        at
> soot.toolkits.graph.ExceptionalUnitGraph.initialize(ExceptionalUnitGraph.java:263)
>        at
> soot.toolkits.graph.ExceptionalUnitGraph.<init>(ExceptionalUnitGraph.java:149)
>        at
> soot.toolkits.graph.ExceptionalUnitGraph.<init>(ExceptionalUnitGraph.java:182)
>        at
> soot.toolkits.scalar.LocalSplitter.internalTransform(LocalSplitter.java:77)
>        at soot.BodyTransformer.transform(BodyTransformer.java:51)
>        at soot.Transform.apply(Transform.java:104)
>        at soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:57)
>        at soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:89)
>        at soot.Pack.apply(Pack.java:124)
>        at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:117)
>        at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:82)
>        at soot.SootMethod.retrieveActiveBody(SootMethod.java:329)
>        at
> soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(OnFlyCallGraphBuilder.java:181)
>        at
> soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(OnFlyCallGraphBuilder.java:81)
>        at soot.jimple.spark.solver.OnFlyCallGraph.build(OnFlyCallGraph.java:55)
>        at soot.jimple.spark.solver.PropWorklist.handleVarNode(PropWorklist.java:123)
>        at soot.jimple.spark.solver.PropWorklist.propagate(PropWorklist.java:53)
>        at
> soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:151)
>        at soot.SceneTransformer.transform(SceneTransformer.java:39)
>        at soot.Transform.apply(Transform.java:89)
>        at soot.RadioScenePack.internalApply(RadioScenePack.java:57)
>        at
> soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:47)
>        at soot.Pack.apply(Pack.java:114)
>        at soot.PackManager.runWholeProgramPacks(PackManager.java:406)
>        at soot.PackManager.runPacks(PackManager.java:327)
>        at soot.Main.run(Main.java:202)
>        at soot.Main.main(Main.java:145)
>
> The problem is only present when using the development version of Soot from
> the SVN repository. Release 2.3.0 has no problems. However, the method to
> obtain the Deadlock Graph is not present there. :)
>
> Thanks for your help.
>
>
>
> Greetings,
> Marco.
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Eric Bodden
Sable Research Group, McGill University, Montréal, Canada
Got an interesting job offer? http://www.bodden.de/hire-me/


More information about the Soot-list mailing list