archives

RLisp - Lisp naturally embedded in Ruby

Hello,
I wrote a small Lisp interpretter for Ruby. It supports macros,
and is fully integrated with Ruby - lambdas are native procedures, lists are native Array objects
and so on. That required a few unusual things for a Lisp, like cdr/cons actually
copying the list, special function (send obj method args) for message passing.

There is hello-world code for webrick-based HTTP server in RLisp in examples/ directory,
so it's basically good enough for playing. And I guess it can be used to build
macro systems for Ruby - many people seem interested but don't know where to start.
Now you can start by playing with RLisp :-)

The code is here.
The documentation is only on my blog so far - 1, 2, 3. I'll try to get some real docs later.

Interface Automata

Interface Automata
by Luca de Alfaro, Thomas A. Henzinger

Conventional type systems specify interfaces in terms of values and domains.
We present a light-weight formalism that captures the temporal aspects of software
component interfaces. Specifically, we use an automata-based language to capture both
input assumptions about the order in which the methods of a component are called,
and output guarantees about the order in which the component calls external methods.
The formalism supports automatic compatibility checks between interface models, and
thus constitutes a type system for component interaction. Unlike traditional uses of
automata, our formalism is based on an optimistic approach to composition, and on
an alternating approach to design refinement. According to the optimistic approach,
two components are compatible if there is some environment that can make them work
together. According to the alternating approach, one interface refines another if it
has weaker input assumptions, and stronger output guarantees. We show that these
notions have game-theoretic foundations that lead to efficient algorithms for checking
compatibility and refinement.

The idea of expressing order of message exchange as type is certainly not new (as anyone exposed to web service choreography hype can tell - oh, just kidding, of course the theory is much older). However, the specific approach looks interesting (not the least because of appealing to game semantics).