[abc-users] adding jimple

From: Amjad Nusayr <anusayr_at_cs.nmsu.edu>
Date: Mon, 20 Apr 2009 12:55:06 -0600

Hi,
I trying to add jimple stmts to the IR code generated in abc using
MyResidue.codeGen method. The jimple code I writing should call a method
from a helper class I created.
I used the code from this link to aid me.
http://www.sable.mcgill.ca/soot/tutorial/profiler2/index.html

abc compiles but when run abc with my extension using the following
command line
 +soot -f J -soot -argfile files.lst

I get
Exception in thread "main" polyglot.util.InternalCompilerError:
unhandled exception during we
ving/optimisation
        at abc.main.CompileSequence.runSequence(CompileSequence.java:142)
        at abc.main.Main.run(Main.java:406)
        at abc.main.Main.main(Main.java:144)
Caused by: polyglot.util.InternalCompilerError: World.aj:29,3-32:4:
Error during matching
        at
abc.weaving.matching.AdviceApplication.doShadows(AdviceApplication.java:209)
        at abc.main.AbcExtension.findMethodShadows(AbcExtension.java:541)
        at abc.bbs.AbcExtension.findMethodShadows(AbcExtension.java:230)
        at
abc.weaving.matching.AdviceApplication.doMethod(AdviceApplication.java:275)
        at
abc.weaving.matching.AdviceApplication.computeAdviceLists(AdviceApplication.java:3
2)
        at
abc.weaving.aspectinfo.GlobalAspectInfo.computeAdviceLists(GlobalAspectInfo.java:4
2)
        at abc.main.CompileSequence.weave(CompileSequence.java:447)
        at abc.main.CompileSequence.runSequence(CompileSequence.java:115)
        ... 2 more
Caused by: java.lang.ExceptionInInitializerError
        at
abc.bbs.weaving.aspectinfo.ProbabilityD.matchesAt(ProbabilityD.java:52)
        at
abc.weaving.aspectinfo.ShadowPointcut.matchesAt(ShadowPointcut.java:38)
        at abc.weaving.aspectinfo.AndPointcut.matchesAt(AndPointcut.java:65)
        at abc.weaving.aspectinfo.AndPointcut.matchesAt(AndPointcut.java:65)
        at abc.weaving.aspectinfo.AndPointcut.matchesAt(AndPointcut.java:65)
        at
abc.weaving.matching.AdviceApplication$2.run(AdviceApplication.java:115)
        at
abc.weaving.matching.AdviceApplication.doShadows(AdviceApplication.java:192)
        ... 9 more
Caused by: java.lang.RuntimeException: This operation requires resolving
level SIGNATURES but
Helper is at resolving level HIERARCHY
If you are extending Soot, try to add the following call before calling
soot.Main.main(..):
Scene.v().addBasicClass(Helper,SIGNATURES);
Otherwise, try whole-program mode (-w).
        at soot.SootClass.checkLevel(SootClass.java:121)
        at soot.SootClass.addMethod(SootClass.java:570)
        at soot.coffi.Util.resolveFromClassFile(Util.java:249)
        at soot.CoffiClassSource.resolve(CoffiClassSource.java:39)
        at soot.SootResolver.bringToHierarchy(SootResolver.java:194)
        at soot.SootResolver.bringToSignatures(SootResolver.java:219)
        at soot.SootResolver.processResolveWorklist(SootResolver.java:139)
        at soot.SootResolver.resolveClass(SootResolver.java:124)
        at soot.Scene.loadClass(Scene.java:390)
        at soot.Scene.loadClassAndSupport(Scene.java:375)
        at
abc.bbs.weaving.residues.ProbabilityDResidue.<clinit>(ProbabilityDResidue.java:37)
        ... 16 more

Could someone tell me what this means and how to fix it.

thanks
Amjad
Received on Mon Apr 20 2009 - 19:55:17 BST

This archive was generated by hypermail 2.2.0 : Mon Apr 20 2009 - 20:20:12 BST