[abc-users] Adding tags in a ReweavingAnalysis

From: Nathan Weston <npweston@gmail.com>
Date: Wed May 09 2007 - 13:52:03 BST

Hello!

I'm currently working on an extension to ABC which performs an
analysis of potential interactions between aspects. As it makes sense
to analyse these interactions post-weave-time, I've included the
analysis as a Reweaving Pass and it seems to work quite well in that
context.

One of the things I would like to do is be able to output Jimple files
which are tagged with the interactions my analysis has found, such
that they can be seen by the developer. Thus in my analyze() method I
have this sort of thing:

Stmt s = ...;
s.addTag(new StringTag("Link: " + link + " at " + defname));
s.addTag(new ColorTag(ColorTag.RED, "IA"));
return true; // thus ensuring reweaving happens

However, when I run the analysis with the Soot options "-f jimple" and
"-print-tags", these tags are seemingly not preserved past the
ReweavingAnalysis stage. I suspect this has something to do with the
analysis not being a BodyTransformer which is added to a
transformation pack, but I was wondering if anyone knew of a way of
adding tags to Stmts within a ReweavingAnalysis that could be
preserved and output along with the Jimple?

Thank you for any help!
Nathan Weston
Lancaster University
Received on Wed May 09 13:52:08 2007

This archive was generated by hypermail 2.1.8 : Wed May 09 2007 - 14:20:09 BST