[abc-users] abc and soot's "-whole-program" option

From: Bruno Harbulot <bruno.harbulot@cs.man.ac.uk>
Date: Tue Oct 12 2004 - 15:37:44 BST

Hello,

I'm trying to compile a program using abc and the -whole-program option
to make some performance tests.

The following command works fine (files.txt contains the list of my
java/aspectj files):
java -Xmx512M abc.main.Main `cat files.txt`

However, the following command throws the exception pasted at the end of
this message:
java -Xmx512M abc.main.Main +soot -whole-program -soot `cat files.txt`

I am not so familiar with soot's command line options, since I've mainly
been using it through its Eclipse plugin. But I've managed to make the
"-whole-program" option work using soot without Eclipse (on the class
files). (I also thought it might be necessary to specify which class is
the main class in case there were several classes with "static void
main", but I haven't found anything in the documentation about this.)

Would this option provide any benefit at all for a program compiled with
abc? What are the default soot optimisations performed by abc?

Regards,

Bruno.

Here is the error message:

$java -Xmx512M abc.main.Main +soot -whole-program -soot `cat files.txt`
  java.lang.NullPointerException null
soot.AbstractValueBox.setValue(AbstractValueBox.java:42)
soot.jimple.internal.VariableBox.<init>(VariableBox.java:40)
soot.jimple.internal.JAssignStmt$LinkedVariableBox.<init>(JAssignStmt.java:50)
soot.jimple.internal.JAssignStmt$LinkedVariableBox.<init>(JAssignStmt.java:44)
soot.jimple.internal.JAssignStmt.<init>(JAssignStmt.java:86)
soot.jimple.Jimple.newAssignStmt(Jimple.java:687)
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod.assignCorrectParametersToLocals(AroundWeaver.java:1810)
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod.access$800(AroundWeaver.java:596)
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod$AdviceApplicationInfo.doWeave(AroundWeaver.java:951)
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod.doWeave(AroundWeaver.java:704)
abc.weaving.weaver.AroundWeaver$AdviceMethod.doWeave(AroundWeaver.java:594)
abc.weaving.weaver.AroundWeaver.doWeave(AroundWeaver.java:391)
abc.weaving.aspectinfo.AroundAdvice.weave(AroundAdvice.java:155)
abc.weaving.weaver.PointcutCodeGen.weave_one(PointcutCodeGen.java:339)
abc.weaving.weaver.PointcutCodeGen.weaveInAspectsPass(PointcutCodeGen.java:109)
abc.weaving.weaver.Weaver.weaveAdvice(Weaver.java:119)
abc.weaving.weaver.Weaver.weave(Weaver.java:58)
abc.main.Main.weave(Main.java:872)
abc.main.Main.run(Main.java:549)
abc.main.Main.main(Main.java:181)
Exception in thread "main"
abc.weaving.weaver.AroundWeaver$InternalAroundError: ARD around weaver
internal error:
         at abc.weaving.weaver.AroundWeaver.doWeave(AroundWeaver.java:402)
         at abc.weaving.aspectinfo.AroundAdvice.weave(AroundAdvice.java:155)
         at
abc.weaving.weaver.PointcutCodeGen.weave_one(PointcutCodeGen.java:339)
         at
abc.weaving.weaver.PointcutCodeGen.weaveInAspectsPass(PointcutCodeGen.java:109)
         at abc.weaving.weaver.Weaver.weaveAdvice(Weaver.java:119)
         at abc.weaving.weaver.Weaver.weave(Weaver.java:58)
         at abc.main.Main.weave(Main.java:872)
         at abc.main.Main.run(Main.java:549)
         at abc.main.Main.main(Main.java:181)
Caused by: java.lang.NullPointerException
         at soot.AbstractValueBox.setValue(AbstractValueBox.java:42)
         at soot.jimple.internal.VariableBox.<init>(VariableBox.java:40)
         at
soot.jimple.internal.JAssignStmt$LinkedVariableBox.<init>(JAssignStmt.java:50)
         at
soot.jimple.internal.JAssignStmt$LinkedVariableBox.<init>(JAssignStmt.java:44)
         at soot.jimple.internal.JAssignStmt.<init>(JAssignStmt.java:86)
         at soot.jimple.Jimple.newAssignStmt(Jimple.java:687)
         at
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod.assignCorrectParametersToLocals(AroundWeaver.java:1810)
         at
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod.access$800(AroundWeaver.java:596)
         at
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod$AdviceApplicationInfo.doWeave(AroundWeaver.java:951)
         at
abc.weaving.weaver.AroundWeaver$AdviceMethod$ProceedMethod.doWeave(AroundWeaver.java:704)
         at
abc.weaving.weaver.AroundWeaver$AdviceMethod.doWeave(AroundWeaver.java:594)
         at abc.weaving.weaver.AroundWeaver.doWeave(AroundWeaver.java:391)
         ... 8 more
Received on Tue Oct 12 15:37:50 2004

This archive was generated by hypermail 2.1.8 : Wed Oct 13 2004 - 04:20:03 BST