Hosted by:
UMMF - UML Meta-Model Framework
What is UMMF?
UMMF is an open-source implementation of a UML Meta-meta-model, for the purposes of reifying meta-model implementations.
It is written in Perl and provides a specification of UML 1.5
meta-model in a human and machine-readable meta-meta-model description
language.
The meta-meta-model can be used to generate implementations of the UML
meta-model in XMI, Perl and Java and other languages. Thus, one
specification of the meta-model can generate meta-model
implementations in many programming languages. Once a programming
language has been targeted with an exporter, code can be generated for
UML meta-models and models.
Why UMMF?
The goal of UMMF is processing of UML models and meta-models in a
variety of implementation languages for the purpose of transforming
UML models.
UMMF is self-hosting; for example: the Perl UML::MetaModel package is
generated by bootstrapping from the meta-meta-model. The
meta-meta-model is specified with the same specification as the
meta-model.
Models can be imported from popular UML editors via XMI 1.0 and
1.2. Meta-models and models can currently exported to XMI 1.2.
Code generated from UML models by UMMF is reflective; models can reflect on their own
meta-models. For example, the code exporters generate a
__classifier()
method for each Class that will return the meta-model
Classifier object for the model object.
Many inexpensive UML editors have inflexible or non-existant code
generation tools. Generating code using XSLT on XMI is an adventure
into the pain of a W3C-sponsored hell.
UMMF can provide a base UML meta-model implementation for other UML tools.
What does UMMF do?
UMMF contains model transformations; for example:
- Generate Interfaces for all Classes.
- Transform Classes with multiple inheritance to single inheritance using Interfaces.
- Remove AssociationEnd name collisions across Generalizations.
- Processing Models as Design Pattern templates.
What can UMMF do?
As of 2003/05/09, UMMF can:
- Generate Classifier code for UML 1.5 meta-model in Perl and Java, using code templates.
- Generate Classifier code for UML 1.5 meta-model from code generated from meta-meta-model.
- Import XMI 1.0 and 1.2.
- Export XMI 1.2.
- Perform various model transformations (as listed above).
What doesn't UMMF do?
As of 2003/05/09, UMMF does not:
- Generate code for the
Class
mixin part of the AssociationClass
class.
What should UMMF do?
- Have more documentation.
- Have more test cases.
- Process OCL.
- Have more exporters: IDL, C++, Objective-C, etc.
- Generate code for UML State Machines and other models.
- Handle previous UML meta-model versions.
- The things you wish UML editors did for you, like generate Perl or Befunge code the way you like it. Please contribute!
- Bootstrap from the meta-meta-model with minimal assumptions.
Where can I get UMMF?
Until the SourceForge site, http://sourceforge.net/projects/ummf/, is complete, please visit http://kurtstephens.com/pub
Also check out http://kurtstephens.com/resume.html; I need a job!
What does UMMF need?
- Perl 5.6.1 (or later?)
- CPAN Template 2.09 (or later)
- CPAN XML::Writer 0.4 (or later)
- CPAN XML::Parser 2.31 (or later)
- CPAN XML::DOM 1.42 (or later)
Frequently Asked Questions
What is the relationship of this to MOF?
UMMF does not implement MOF, yet. IMHO, MOF is simply a subset of UML "Foundation
" meta-model Package
with all the class names prefixed with "Meta
"
and plenty of CORBA IDL to keep OMG happy. Maybe it exists
because a lot of work was invested in hand-coded UML meta-model
implementations. :)
If we need CORBA IDLs, then UMMF could have an IDL exporter that could generate IDL for *all*
the M* layers. Actually, a UMMF IDL exporter should generate the
exact same IDLs from a MOF specification as the ones published by OMG,
which look, to me, to be generated from *something*, just like the XMI DTDs.
To select a subset of the UML meta-model to represent MOF, the
meta-model specification in UMMF could be annotated with C preprocessor #ifdef
and #define
to select the appropriate subset as specified in the table on p. xiii of the MOF 1.4 specification.
UMMF uses its UML meta-model description as its own
meta-meta-model; the two are interchangable in UMMF since they mostly
have the same task in UMMF: represent UML models and transform them;
the UML meta-model is just a model in UMMF.
At some point it might make sense to have drop the hard-coded
UML meta-model specification I wrote and generate its meta-model
directly from analysis of the MOF IDLs published by OMG. Then
when OMG publishes new IDL mappings for subsequent versions of the MOF,
we all get code for free. But that may not work, since the MOF
does not implement the full UML meta-model, by definition. Maybe
I'm just getting myself confused here. :) Maybe when UML
2.0 makes it's sweeping changes to the UML meta-model, that will make
sense.
UMMF is a work in progress, but I think it has the potental to
be the thing that generates standard UML meta-model implementions
across many languages and environments. Think of it as the "XML
DOM" generator for the UML meta-model.
Why isn't UMMF written in Java? or C++? or Cobol?
- Because Java does not have
eval()
.
- Perl is better at string processing.
- In Perl, you change an object's class at runtime in Java, which makes bootstrapping the M2 layer really easy.
- Perl has real closures.
- Perl supports multiple inheritance.
- Perl is dynamically typed, which allows code to be reused across
the M* layers, without resorting to a festering tree of interfaces;
(either an object responds to
foo()
or it just doesn't :)
- But mostly because I'm a better Perl coder than a Java coder.
Revision: 2003/05/09