More UML fun
I have been trying to make a tiny Prolog implementation that is compatible with UML (so I can use rule and relation based transformations in a code-generator). I can't seem to find anything in UML's expression abstract syntax that allows you to define the environment in which they are evaluated. Basically expression has a string symbol name, and a (possibly empty) sequence of expressions it is applied to, but the mechanism mapping name to semantics is unspecified- for anything recursive or threaded you can't just use the owner as the environment. But UML defines methods on expression that return its value. So you need to set the environment, but that can't be done by the standard interface. Therefore I think that this is another area (I'm pretty much resigned to action semantics being useless as a behavioural specification language) that trying to implement a reflective language conforming to UML is not going to work. It's a pity no reference implementation was provided- the only implementations seem to provide a host of interfaces but no actual implementation that allows any kind of bootstrapping of UML out of a few axioms. Though looking at eclipse's UML2 implementation kind of gives me ideas for dynamic proxy interface generation based on pattern matching between classes- as it's an implementation of the same standard, it has much the stuff, but uses different idioms to express them.
Been reading this, this and this recently.
I don't want to re-implement lisp for the JVM- partly because common lisp can do much I don't need, but not things I do need (like Prolog-style pattern matching and type inference for modern VM code-generation), but has no standard libraries for the things I do need (distributed concurrent simulation building, so threading, concurrency, interaction with garbage collection, networking and XML support are all important), partly because it's too damn big, and partly because an implementation exists in ArmedBearLisp, a common lisp implementation that is bundled with my favourite editor. And I'm not really targeting the JVM- I'm using Java at the moment, but hopefully will get a small enough set of axioms that they can be built on top of any managed code, with a particular eye on Sun's future High Productivity Technical Computing intermediate language, which I will assume will not be less capable than Java, and possibly even further from Common Lisp in its execution model.