Monday, November 19, 2007

Recent thoughts

Variety of thoughts recently, but, unfortunately, very little research has occurred.

At the last minute, I presented a paper on dynamically inferring object roles: finding approximations of type states for objects and determining how objects transition between them. I think it would be *very* interesting to contrast properties inferred from single threaded and multi-threaded execution. There is a trend to verify type-state nowadays, but not much on where those properties come from. If even Daniel Jackson is leaning towards specification extraction, maybe there is something to it :)

Mike said the g word on his blog with respect to Flapjax: garbage collection. There are several issues, all very close to each other in impact, but all conceptually different, contributing to the general sentiment of "yikes":
  • JS1.5 has no weak references, so switched out graph chunks persist
  • Using switch to achieve dynamic data flow graphs sucks
  • Flapjax does not have a component model
  • Conditionals persist both branches
  • Conditionals that don't are confusing
Additionally, there is a lot of object churn: whenever a computation is represented as a data flow node, and another computation is dependent upon it, a message object is sent from one to another. That's a bunch of stack frames and a heap object for every little computation - Kim's PEPM work demonstrated how expensive this gets. Essentially, constant, but significant in large apps, and annoying for animations.

I have several feelings here. Mainstream VMs are not built to support event oriented systems, and annotations for extent make a lot of sense (or should at least be more aggressively inferred, as AJ found). Additionally, while I was sensitive to the memory problem while making Flapjax demos, coding in Flex seemed a lot more manageable because I used FRP to hook fields of components together, rather than create them entirely. Large changes in control were still handled imperatively - but most of it didn't need to be.

I have 3 weeks to get some sort of research result, and then a week to write it up. Normally that would seem like a lot, but I just have no head for "dynamic probable recursive and shape structure characterization".

No comments: