Another successful trip to Calgary
My visit this week to Calgary to work with Brian and Robin is coming to an end and has definitely paid off again. We have another day at least of work ahead of us, but probably not much more real work will get done by then since we still have the FOPARA paper to finish up and get camera ready. But, just in the past couple of days we’ve already made tremendous progress in improving and stabilizing the language. It won’t be too much longer before “core Pola” is finalized.
I should say there was one interesting result that Brian told me about. The peek construct is a unique construct to the language, which allows one to, under some restrictions, break affineness, i.e., allows one to reference a variable multiple times to give the programmer more expressiveness. It’s a delicate business since affineness is what keeps Pola programs polynomial-time, particularly in the context of recursion. As it turns out, if you remove the recursion-symbol restrictions on peeks — allowing recursion within the condition of a peek—but keep the other restrictions on peeks, you exactly capture PSPACE! We demonstrated this by changing just a couple lines of code, allowing recursion, and coding up QSAT to play with.
Exactly the cleanest and most expressive way to impose restrictions on recursion on peeks while staying in P, which is the real goal of Pola, hasn’t been entirely hammered out yet. There are any of numbers of ways to get it to work, but no one’s sure if they’re clean enough. I’m extremely excited that, except for the recursion business, the mechanism of type-checking peeks has finally been solved, extremely cleanly using bunched logics. It had been a real mess before and the new formulation is really a thing of beauty. It’s what I’ve always wanted for peeks, even if I’d never heard of bunched logics before.
Aside from the matter of me finding the time to actually finish implementing these things — though I’m still making good progress! — is the matter of inferring bounds, which from my (very practically based) viewpoint is the whole motivation for the language. The initial write-up I shoehorned into the end of the FOPARA paper is definitely on the right track, but the details need to be cleaned up some.