-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ganesh Sittampalam wrote:
> If Soot has an AST for the class that can go via Java2Jimple, it
> shouldn't try to load it from disk. At what stage is this new
> aspect being created?
Actually it's *created* before the very first compiler pass. I add it
as job to the scheduler as follows:
for(String formula: formulas) {
SyntheticSource sourceUnit;
try {
sourceUnit = new
SyntheticSource(classContentFromFormula(formula));
extensionInfo.addJob(sourceUnit);
} catch (IOException e) {
//cannot occur - actually
System.err.println("Internal error!!!");
e.printStackTrace();
}
}
Then I perform some AST rewrites to transform the "formula aspect" to
an "normal AspectJ syntax aspect"; between
passes_disambiguate_signatures(l, job);
and
passes_add_members(l, job);
- From a formula aspect as...
package rwth.i2.ltlrv.formulas;
public aspect F1213089635 {
public F1213089635() {
initFormula();
}
LTL(G(!call(void TestClass.foo())));
}
... I get something like ...
public aspect F1213089635 {
public F1213089635() {
super();
initFormula();
}
public void initFormula() {
Verifier.getInstance().addFormula("F1213089635", new Globally_c(new
PointcutProposition("!call(void (TestClass).foo())"))); }
after(): !call(void (TestClass).foo()) {
Verifier.getInstance().evalFormula("F1213089635", "!call(void
(TestClass).foo())"); }
after(): call(void (TestClass).foo()) {
Verifier.getInstance().evalFormula("F1213089635", "call(void
(TestClass).foo())"); }
}
This is valid AspectJ syntax (I can compile and weave this code e.g.
with ajc and it works) and is not fed to passes_add_members(l, job)
and its successor passes.
I guess, Soot should actually not kick in before that, should it?
Maybe the polyglot AST of the aspect is simply not exposed to Soot
for some reason. Do I need to register it with Soot or similar?
Thanks,
Eric
- --
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3
iQA/AwUBQh7j58wiFCm7RlWCEQKnpwCcCdr/2LBiUtAc+hfvRkv3EYrM04oAnicY
bTVIawbwHsp3CUi2XqfKfwA+
=4GX4
-----END PGP SIGNATURE-----
Received on Fri Feb 25 08:38:14 2005
This archive was generated by hypermail 2.1.8 : Fri Feb 25 2005 - 15:20:04 GMT