As an ArgoUML contributor I'm going to blog my activities here, so that they may draw interest by other developers or help other developers when doing tasks similar to what I've done. AND(!) the grand vision that makes an Argonaut what he is, TO THRIVE IN THE BIG DANGEROUS WORLD, TAKING THE Argo TO A GOOD SHORE ;-))

Saturday, March 20, 2010

UML profile for Lisp

Creating a UML profile for Lisp should be very interesting. It would be an excellent exercise for a lightning talk in the ELS 2010. It would be an excellent opportunity to test in depth the ArgoUML profile support. It would be a learning opportunity for me into the depths of the extensibility aspects of UML.

My idea is that it should have some common patterns amongst the several dialects and that those patterns should in principle be modeled in a reusable way in a common profile, maybe a PIM.

Then, each Lisp has a specific namespace system, macro system and library. This must be derived with a PIM to PSM transformation and then developed on its own.

A REPL for each would also be required.

A connector to connect to live Lisps to enable reverse engineering is also interesting. This is something that could take advantage of some sharing of a common base project, but, would naturally diverge for each Lisp dialect.


Andy Chambers said...

I don't know what a UML profile is but my company is looking to use an industry standard that is specified as a UML class diagram. I wrote an XSL stylesheet to take the XML dumped from MagicDraw and convert it into Common Lisp packages and classes.

It just flattens the package structure into a single namespace (i.e. no sub-packages) and at the moment it ignores enumerations and primitives but it does handle intra-package dependencies.

euluis said...

Hi Andy, thanks for your comment. A UML profile for a programming language is something that adds custom elements to UML through its extensibility features like stereotypes, tagged values and simple types, so that it is easier for modellers to create a model which fits the language. For instance, any Lisp has macro, symbol, types, that would be somehow part of a UML profile that would enable the modeller to model with-open-file as a macro.

The solution you refer is a translation from UML into Lisp code. In principle a model created using a Lisp UML profile would be more amiable to translation into the correct Lisp code if the translation is aware of the profile related annotations in the model.

Sean Champ said...

Considering the peculiarities of Common Lisp generic functions and CLOS overall, as well as the syntax of CL:FUNCTION definitions, I think it may be effective to develop a full MOF metamodel (M2) for Common Lisp. I'm sure it could use some features that the UML (M2) metamodel uses, and that UML (M1) models illustrate - including, extensibility via UML (M1?) profiles. Though I've not made a lot of headway with it, as yet, but I've started a project for developing such a thing - Project Lupine, I would like to ultimately develop it as an extension of CL-XML onto MOF, then to develop some GUI tools of some kind, for presentation of metamodel (M2), model (M1), and program (M0) elements graphically, using the conventional graphical syntax developed with MDA components such as UML, SysML, SoaML, and MOF itself - also, thinking about OMG ODM, which extends MOF onto the domains of RDF, OWL, and Common Logic.

I tend to prefer Argo for UML modeling. Though I'd noted some criticisms in the Lupine Wiki, for a number of digramming platforms, but Argo seems to me that it's the easiest to use, on the desktop. For mobile, there's Cubetto - - iOS mobile, at least.

Found this recently, on a sidebar: A MOF 2 for Java - would like to consider developing a CLOS interface about it, using ABCL, but I might prefer to be able to do that programatically, as by processing the MOF (M3) metamodel itself, as to generate CLOS class definitions from the same. I've been thinking of using CL-XML for XML procesing, though - CL-XML supports XML schemas, which play a role in XMI. CL-XML is "native Common Lisp", might be a bit awkward as a choice for XML processing in ABCL (for which, there's Xerces in Java).

Perhaps it poses some novel challenges for systems integration, in an overall sense? LoL! There must be a metamodel for it, somewhere...

Reader Shared items