[Soot-list] Parsing Java source with Soot

Christoph Reichenbach christoph.reichenbach at cs.lth.se
Mon Jul 15 08:50:47 EDT 2019


Hi Wim,

  I can't claim to be on top of Soot's source frontends, but according
to their homepage, Polyglot support for Java goes up to Java 7, while
ExtendJ (formerly JastAddJ) support for Java 8 is very recent and not
part of an official release yet (
https://bitbucket.org/extendj/extendj/src/master/ ).  According to
Jesper Öqvist, the main developer, there are still a few corner cases
in type inference that need fixing, but the git version of JastAdd
supposedly works for most of the Java 8 projects that you'll find in
the wild.

  The following are guesses on my part, based on the above:

(1) Soot 3.3.0 probably has no source-level support for Java 8.
(2) If you need source-level support for Java 8, upgrading the ExtendJ
    frontend may help.

  That being said, I don't know how complex the integration between
Soot and ExtendJ is and how much effort it would be to upgrade.  If
this would be an option for you, you can check whether the most recent
ExtendJ supports your programs.

  All the best,

-- Christoph

On Mon, Jul 15, 2019 at 01:24:31PM +0200, Wim Keirsgieter wrote:
> Hi there
> 
> I am having trouble analysing Java source code (Java 8) with Soot. Parsing
> class files works fine, but parsing source files (with both the JastAdd and
> Polyglot front ends) gives me a myriad of errors, even with trivially small
> programs. I can give examples if needed, but the errors often differ
> (however from the stack trace it's clear the errors are coming from the
> parser).
> 
> From the Soot documentation it's unclear whether what I'm trying to do is
> even possible. I'm using Soot v3.3.0, and from what I can tell the parser
> front ends are quite outdated on this branch.
> 
> Is there a way to reliably parse Java 8< source code using any version of
> Soot? Or am I out of luck on this front?
> 
> Kind regards
> Wim

> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20190715/e076a6d2/attachment.sig>


More information about the Soot-list mailing list