Featherweight Musings

Wednesday, November 17, 2010

OOPSLA day 2 (belated) (JOT repost)

NOTE: I've come back to my notes about the last two days of OOPSLA; it's two weeks since the conference ended, and my memory is already kind of hazy, so the quality of these last two posts might be less than ideal... and another week and a half has passed before I finished even the first of the last two posts, still, better late than never, eh?


Creativity: Sensitivity and Surprise - Benjamin Pearce

Benjamin gave the oddest invited talk I've ever seen. He talked about various aspects of creativity over a large set of photographs, including some of his own. The photos were beautiful and made a great show. Not entirely sure what it has to do with programming, languages, systems, or applications, except at the most abstract level. Still an interesting talk, and it seemed to go down very well with the audience too.


Specifying and Implementing Refactorings - Max Schaffer

Automatic refactoring is popular, and correct in the common cases, but specifications are imperfect. The current `best practice' (e.g., in Eclipse) is to use a bunch of preconditions, but this is not ideal for automatic tools because it is difficult to identify all necessary preconditions; so refactoring sometimes fails, even if all the preconditions are satisfied.

The authors previously suggested specifications based on dependencies and breaking refactorings down into smaller pieces. In this work, they show that this idea actually works for proper refactorings. The dependencies are static and semantic, e.g., constraints on synchronisation and name binding. The authors specified and implemented 17 refactorings.


What can the GC compute efficiently? - Christoph Reichenbach


Christoph presented a system which checks assertions when the garbage collector is run. These assertions are about objects and relations between objects in the heap. This is a pretty efficient way to check heap assertions because the heap must be traversed anyway to do GC. There is a single-touch property - i.e., each assertion can only touch each object once - so checking the assertions is very fast. Their assertion language can describe reachability, dominance, and disjointness, and assertions can be combined with the usual logical operators. Interestingly, garbage collection must be re-ordered to check for reachability and dominance.


Type Classes as Objects and Implicits - Bruno Oliveira

This work `encodes' Haskell type classes in Scala using generics and implicits (the latter being a Scala feature that enables the programmer to omit some parameters). My understanding of the work was that type classes can be done using only generics, but implicits are required to make the `encoding' usable by a programmer. There is a whole lot of other complex-Scala-type-system stuff - I have notes about type members and dependent method types, but I can't remember why...

The interesting thing is that you end up with a really, really powerful language feature: as well as type classes, you can encode session types, which I find incredible (although according to the paper, you can do this with Haskell type classes).


Supporting Dynamic, Third-Party Code Customizations in JavaScript using Aspects

The authors are motivated by the popularity of JavaScript, both on the web and to customise browsers. Such scripts typically rely heavily on code injection, that is inserting new code into existing scripts. This is a pretty ugly process all round - it's as non-modular as you can imagine and implemented in totally unchecked and unsafe ways (mostly monkey patching). The authors propose doing it with aspect-style weaving instead, but claim it's not really aspects, apparently. Weaving is done by the JIT. Their empirical results show that their approach is sufficiently expressive for most use.

Saturday, November 06, 2010

Papers

I've just updated the research page on my website, I've added all my recent papers plus some accompanying proofs, and the slides for all the talks I have given this year. In particular, I've added my paper and slides for the Tribal Ownership work which I recently presented at OOPSLA.

I still have a couple of blog posts to write up about the last two days at OOPSLA, these should be coming shortly (I was on holiday for a week after OOPSLA and have been kind of busy since I got back).