
UMMF - UML Meta-Model Framework. UML to code generation via XMI. Implements UML 1.5 meta-model. Provides object-oriented Perl interface for processing UML meta-models and models. Imports XMI. Includes XMI, Perl and Java code generation back-ends.

bin/ummf -e Perl someumlmodel.xmi

Also See http://ummf.sourceforge.net and the "examples" directory in the distribution for more information.

UMMF is an open-source implementation of a UML Meta-meta-model, for the purposes of reifying UML meta-model implementations and to provide a platform for building flexible UML transformation tools.
It is written in Perl and provides an almost complete specification of the UML 1.5 meta-model in a human and machine-readable meta-meta-model description language.
The meta-meta-model description is 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.

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 UMMF: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 allows you to control how your Model will be translated into code; add your special archtectural or environmental support without relying on third-party proprietary tools!
UMMF can provide a base UML meta-model implementation for other UML tools.

As of 2003/09/31, UMMF is still alpha software; everything and anything may change. But please keep in mind, it's not in my best interest to change it too much, because I rely on it. UMMF is being actively developed and used for generating code for production systems. I (Kurt Stephens) and dedicate significant resources to develop UMMF; I am building large systems in Perl using UML.
If you think that UMMF could be useful for your project or if I can help you get started, please let me know.

UMMF transforms UML models to simplify code generation; for example:
Additional transformations will be developed to support other architectural concerns.

As of 2004/03/30 (v0.20), UMMF can:
"# UMMF-Lang: Perl" or "// UMMF-Lang: Java" comments to delimit different method implementations.Use of Serializable for meta-model storage has been implemented and tested.
Try running "bin/ummf -e XMI UML-1.5" !!!

As of 2003/09/31:


The SourceForge site, http://sourceforge.net/projects/ummf/ or a pre-built version from CPAN. You may want to check the CVS repository for the latests changes; point your browser at http://cvs.sourceforge.net/viewcvs.py/ummf/ummf/1.0/.

As of 2004/03/30, UMMF requires:
Bootstrapping dependencies:


perl sbin/ummf_install.pl
This will build the UML meta-model classes in gen/perl.
This will build the bin, gen/perl and doc/html directories.

Low-volume list for new releases and other announcements.
List for UMMF user issues, problems and support (may become high-volume)
Low-volume list for UMMF developers only.
CVS notifications (may become high-volume)

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. :) Actually, there significant differences between MOF and UML, but for purposes of handing UML models, specifying the UML meta-model as UML, as it is documented in the OMG specifications, instead of as a MOF model, works quite well.
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 MOF is not UML. 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.
eval().
None exported.

List of ":"-separated paths to search for UMMF resources. If you are using the compiled CPAN distribution, you must include the "data" directory from the distribution in this variable, or you can copy the "data" directory to the directory named "UMMF" where "UMMF.pm" was installed by make install.
List of ":"-separated paths to search for UMMF Exporter templates.

Kurt Stephens, kstephens@users.sourceforge.net 2003/09/10


0.25

$Revision: 1.14 $

UMMF->resource_path($type);
Returns a list of directories to search for files of type $type.
my $dir = UMMF->tmp_dir;
Returns directory to be used for temporary files.
my $filename = UMMF->make_tempfile;
Returns a temporary file.