robjsoftware.info

A blog about software – researching it, developing it, and contemplating its future.

GWT2007 Video, Brain Teasers, and Semantic Metatheory

leave a comment »

It’s almost terrifying how busy things are right now in robjsoftwareland. Moving with two young kids is just not the best idea from any kind of sane logistical perspective. Trust me on this. PLEASE. My life is a continual rolling boil of domestic packing and repacking and remodeling and general chaos, and it will continue for months to come.

But I cannot and will not go dark on this blog. So, a quick update:

1) The video from GWT2007 got posted! If my previous posts about my RPC talk made you curious, you can now see for yourself. I’m amused at the Sartre reference that snuck into the video 🙂 I think it came out quite well overall (with the caveat, as before, that an unexpectedly large portion of the audience were newbies who didn’t get the most out of it). The other talks are also online — now I’ll get to see the ones I missed! I’d also recommend Billy Hoffman’s talk on security (warning: one short NSFW item in there!).

2) I’m currently putting all research papers and language-y thinking on hold for a few months. Instead I’m getting back to basics. All my side reading/hacking time is going into plowing through these two books: Introduction to Algorithms and Artificial Intelligence: A Modern Approach. I’ve generally in the past spent most of my time reading current research, because books get out of date so quickly. Well, not these two! They come pretty darn close to being timeless.

One quick brain teaser from the algorithms book: Everyone knows how to write a recursive algorithm to print an inorder traversal of a binary tree. Almost everyone knows how to convert it to an iterative algorithm using an explicit stack, too. But the book mentions that — if your binary tree contains parent links as well as child links, and if you can test pointers for equality — you can actually write an iterative algorithm to do an inorder traversal without keeping an explicit stack… in other words, an iterative algorithm that uses constant space (rather than space proportional to the depth of the tree). It took me about twenty minutes to figure it out. How about you?

3) One of the more interesting posts recently on good old Lambda the Ultimate was this post by Paul Snively asking whether syntactic or semantic theory is the way of the future. Most approaches to programming language theory historically have been largely syntactic, but there are a number of recent papers that take a purely semantic view.

While I’m still learning this field myself (and haven’t spent nearly enough time on the basics — Pierce’s syntactically-oriented Types and Programming Languages is on my reading list, but so far I’ve only dabbled), it seems to me that semantic approaches have an intentional stance that might make them fundamentally more general. For example, this paper on semantic verification of a simple compiler makes the point that a typed assembly language program can only go wrong if it tries to treat a given memory location as being of an unsafe type, but that there might be possible values in that memory location which can be safely interpreted as other types without inconsistency.

This approach reminds me of the Logic of File Systems paper, in which file systems are modeled in terms of their beliefs about the contents of memory versus disk. It’s a fascinating philosophical view, to think of programs as enacted, operational beliefs and to consistency check them on that basis. A program only goes wrong if its beliefs are inconsistent with the contents of the machine, as opposed to being inconsistent with its own source text (represented as base terms of the program). It’s going to be fascinating to see how far the semantic approach can be pushed.

That’s it for early January — see you in about two weeks!

Advertisement

Written by robjellinghaus

2008/01/05 at 04:47

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: