[Soot-list] loading class files with Soot in abc

Prof. Laurie HENDREN hendren at cs.mcgill.ca
Sun Feb 5 15:05:06 EST 2006


Pat,

What do you think is the cleanest way of doing this?

Laurie


+-----------------------------------------------------------------
| Laurie Hendren --- laurie.hendren at mcgill.ca
| Associate Dean (Academic), Faculty of Science,
| Dawson Hall, McGill University, 853 Sherbrooke St W,
| Montreal QC H3A 2T6 Canada, 514-398-7179, fax 514-398-1774
+----------------------------------------------------------------
| For contact and home page info as Professor, Computer Science:
| http://www.sable.mcgill.ca/~hendren   ---  hendren at cs.mcgill.ca
| Research: http://www.sable.mcgill.ca  http://aspectbench.org
+----------------------------------------------------------------

On Sun, 5 Feb 2006, Oege de Moor wrote:

>
> The exact behaviour is dictated by the use of abc's inpath
> option:
>
> abc -inpath dir1 -sourceroots dir2
>
> should read only class files from dir1, whereas we read java files
> from dir2. So as I said in my original post, this particular
> call to
>
> soot.SourceLocator.v().getClassesUnder(jar);
>
> should pick up only class files. There is another call to the
> same method from within abc that should pick up only classes
> stored in a jar file.
>
> All java inputs in abc have to be piped through our
> frontend: abc never uses soot to read *.java or *.aj files.
> So on reflection, it may well be that we can just tell Soot
> never to read *.java when used from abc.
>
>
>
>
>
> On Sun, 5 Feb 2006, Prof. Laurie HENDREN wrote:
>
> > Exactly what behaviour do we want?
> >
> > Cheers, Laurie
> >
> >
> > +-----------------------------------------------------------------
> > | Laurie Hendren --- laurie.hendren at mcgill.ca
> > | Associate Dean (Academic), Faculty of Science,
> > | Dawson Hall, McGill University, 853 Sherbrooke St W,
> > | Montreal QC H3A 2T6 Canada, 514-398-7179, fax 514-398-1774
> > +----------------------------------------------------------------
> > | For contact and home page info as Professor, Computer Science:
> > | http://www.sable.mcgill.ca/~hendren   ---  hendren at cs.mcgill.ca
> > | Research: http://www.sable.mcgill.ca  http://aspectbench.org
> > +----------------------------------------------------------------
> >
> > On Sun, 5 Feb 2006, Oege de Moor wrote:
> >
> >>
> >> Hi Pat, thanks!
> >>
> >> We also want to load *.java files in the same run,
> >> just not in the same place. So setting a global option
> >> may not be the way to go?
> >>
> >> -Oege
> >>
> >> On Sun, 5 Feb 2006, Patrick LAM wrote:
> >>
> >>> On Sun, 5 Feb 2006, Oege de Moor wrote:
> >>>
> >>>>              List/*String*/ this_jar_classes =
> >>>>                 soot.SourceLocator.v().getClassesUnder(jar);
> >>>>
> >>>> Unfortunately, the call to getClassesUnder(..) picks up not
> >>>> only *.class files, but also *.java and *.jimple, which we
> >>>> do not want: it should pick up *.class and nothing else.
> >>>
> >>> Soot's SourceLocator tells it what types of files it should read.  If
> >>> abc is only supposed to read .class files, then you need
> >>> soot.SourceLocator.setupClassProviders to handle another case, i.e.
> >>>
> >>> 	case Options.src_only_class:
> >>> 		classProviders.add(new CoffiClassProvider());
> >>> 		break;
> >>>
> >>> and abc should, in its initialization phase, add Options.v().src_prec
> >>> return Options.src_only_class.
> >>>
> >>> Ondrej and Jennifer are trying to make a release this weekend, so I'm not
> >>> going to commit this change without coordinating with them, but it should
> >>> be a trivial change.
> >>>
> >>> pat
> >>>
> >>>
> >>>
> >> _______________________________________________
> >> Soot-list mailing list
> >> Soot-list at sable.mcgill.ca
> >> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >>
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >
>
>



More information about the Soot-list mailing list