[plt-scheme] Brainstorming about how to transform UML XMI into some code

From: John Clements (clements at brinckerhoff.org)
Date: Sun Jun 10 12:54:24 EDT 2007

On Jun 10, 2007, at 9:41 AM, Grant Rettke wrote:

> Hi folks,
> Most good UML editors support the ability to export to XMI:
> http://en.wikipedia.org/wiki/XML_Metadata_Interchange
> Regardless of our take on the role of UML and its editors, I've got  
> a question.
> We have been looking at a technology called OAW:
> http://www.openarchitectureware.org/
> It provides a pretty straightforward way to transform XMI into
> whatever you feel like generating. Using Eclipse it lets you write
> transformations in a little statically typed functional language. For
> example:
> <<DEFINE Root for data::DataModel>>
>    <<EXPAND Entity FOREACH entity>>

This is awesome.  What do you use for the XMI metadata... triple  
> That functions starts processing the model at the highest level and
> for each Entity it has inside of it, call the function Entity (for
> type Entity).
> How would one approach something like this in Scheme?

Syntactic yuckiness aside, there's no shortage of work on the  
parallels between XML and XML transformations and s-expressions and s- 
exp transformations.  I would start by looking at Oleg Kiselyov's  
sxml representation of XML in s-expressions, and his work with others  
(including Shriram Krishnamurthi) on sxslt, a manipulation language  
for xml.  If this work does not directly apply, I suspect that minor  
alterations would yield something that is

- substantially nicer than existing systems, and
- totally unusable by people allergic to parentheses

> Would it be obvious to me if I read EOPL or SICP how one may approach
> this problem?

Perhaps, yes.

The fundamental insight is that creating Yet Another "little ...  
functional language" is a colossal waste of time; embed the language  
you want in an existing one that is reasonably extensible.  There  
might be something interesting in the "statically typed" part... or  
maybe not.

Corrections always welcome,

John Clements

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070610/ad705b72/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2223 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20070610/ad705b72/attachment.p7s>

Posted on the users mailing list.