[Soot-list] Shimple -> Continuation Passing Style

J Malcolm malcolm at ece.gatech.edu
Tue Jan 30 01:07:59 EST 2007


Chris Pickett <chris.pickett at mail.mcgill.ca> writes:

> So then actually just implement it first if it's so simple.  Getting
> your head around that and SableCC in two weeks, well, I'd say that was
> a realistic target.  If it's too easy, try adding some Java-like
> features and then figure out how to deal with them.  At some point it
> will become too cumbersome and then you'll say, OK, I feel like doing
> this in Soot now.  The whole point is just to reduce the complexity by
> breaking it up into manageable pieces.

You've convinced me.  As you suggest, I'll use Sable to take a toy SSA
to CPS.  Looking at the daunting list below, there's a lot of work to be
done and, on top of that, I don't want to have to fuss over interacting
with Soot--a system I'm just learning.  Better use the simpler SableCC
for now.

>> Any specific Java stuff you have in mind that I will hit?
>
> I really don't know that much about functional languages, so I'll just
> list all of the Java features I know to be problematic in general:
>
> object allocation
> static (class) and dynamic (object) fields
> virtual functions
> primitive vs. object types
> pointers
> native methods
> exceptions
> class loading
> threads
> finals
> volatiles
> synchronization

Wow.  Lots of work ahead.  Thanks for the heads up on these things.
It'll take some time to think through.

>> The printer is obviously trivial since it can be generated in a nested
>> fashion with S-expressions.
>
> Well, you'll have this CPS IR, and therefore you'll also have a
> SableCC grammar for that IR (unless for some reason you intend on
> building your CPS IR without a grammar, but I don't recommend that),
> and so finally you'll also have a mechanism to print out something in
> that IR---literally ast.toString() IIRC.  (I possibly don't.)

Good, printing (code generation) will be the least of my worries.

Thanks so much for helping baby step me through all those design
decisions.  Much appreciated.

I'm sure I'll have many more questions when I come back to working with
Soot.

-jm


More information about the Soot-list mailing list