[Soot-list] Shimple -> Continuation Passing Style

Chris Pickett chris.pickett at mail.mcgill.ca
Mon Jan 29 23:18:41 EST 2007


J Malcolm wrote:
> Chris Pickett <chris.pickett at mail.mcgill.ca> writes:
> 
>> Oh no, I was thinking that your input files could be directly parsed
>> into the toy SSA IR.  Some small examples would get you a long way.
> 
>>From a subclass of Java to the toy SSA IR?

No, forget about Java, your input files would be a textual 
representation of the toy SSA IR.

   It would be instructive to
> then go from there, but maybe a subset of Shimple to CFA is easier?

I think you mean CPS (unless CFA is an acronym I don't know), but 
nevertheless, yes, use a (very) stripped down Shimple as the toy SSA IR. 
  Or not even, just some basic SSA form.  The idea being to play around 
and figure out at a high level what needs to be done, before you begin 
worrying about all the Java-specific stuff.

example.toy_ssa (written by you)
     |
     | (SableCC-generated parser)
     |
     V
in-memory toy SSA IR
     |
     | (your SSA->CPS compiler)
     |
     V
in-memory toy CPS IR
     |
     | (SableCC-generated printer)
     |
     V
example.toy_cps (which you manually compare against example.toy_ssa)

Anyway, I honestly don't know if it will be useful, and I haven't read 
any of the related work, but it seems likely that you're going to throw 
away your first attempt, so you might as well plan for it to be 
throwaway from the get go.

Cheers,
Chris


More information about the Soot-list mailing list