Make a Shlaer-Mellor Executable UML Model Repository
This is the first step in the model execution tool chain.
The make-xuml-repo command generates an empty metamodel database that can be populated with the modeled
components of your system.
We say 'metamodel' because the generated database schema defines the Shlaer-Mellor Executable UML modeling language. It defines all structures necessary to describe platform independent domains, class models, state models, as well as the complete computational activities driven by each state transition and method call.
Output
The output consists of these three files:
mmdb.ral-- The databasemmdb.txt-- Human readable text that displays all of the database tables (relvars / relational variables)mmclass_nt.py-- A set of python named tuples, one per metamodel class, used for model population. Each metamodel class corresponds to a similarly named relvar (table).
Input
The input to make-xuml-repo is a set of *.xcm (Executable Class Model) files. The files are parsed using
the xcm-parser. You can view these files here in the metamodel folder. The sibling layout folder has a set of diagrams generated by flatland you can view.
This file set defines a subset of the full modeling language though the bulk of the language is, in fact, supported.
But work continues and, as the .xcm files upgrade, it will be necessary to refresh your metamodel database
by re-running make-xuml-repo.
Go to the Shlaer-Mellor Metamodel Wiki for the complete (and not yet fully implemented) model set and model documentation. What is actually implemented, though, is maintained here in the make-xuml-repo repository.
Database
Rather than a traditional SQL database, we use Andrew Mangogna's open source TclRAL (Tcl Relational Algebra Library).
It is an implementation of relational algebra as defined by C.J. Date and Hugh Darwen. So we can use nested relational algebra without any of that SQL mess. It is implemented in C and Tcl, but we provide a python front end called PyRAL to keep everything pythonic.
Installation
Create or activate a Python 3.11–3.13 environment, then install from PyPI:
% pip install make-xuml-repo
Note: Python 3.14 is not yet supported. Its bundled Tcl/Tk 9.0 is incompatible with the TclRAL engine that PyRAL relies on, so use Python 3.13 or earlier.
It's a good idea to upgrade pip first if you haven't in a while:
% pip install --upgrade pip
Once installed, you can invoke the repository generator with the makexumlrepo command.
Usage
Run the command in the directory where you want the output files created:
% makexumlrepo
This generates three files in the current directory:
mmdb.ral— The database. Although it is a text file, it can be opened by TclRAL (via PyRAL) to establish an empty relvar (table) per metamodel class, ready to be populated with instances of your modeled domains.mmdb.txt— A human readable listing of every relvar in the database.mmclass_nt.py— A set of Python named tuples, one per metamodel class, with a field for each of that class's attributes. PyRAL uses these to insert one or more tuples into the corresponding relvar.
You can load these with the metamodel populator (coming soon) or your own tooling. In my own workflow I generate the files and copy them into my metamodel populator package.
Command line options
| Option | Long form | Description |
|---|---|---|
-h |
--help |
Show a summary of all options and exit. |
-V |
--version |
Print the installed version and exit. |
-M |
--models |
Copy the packaged metamodel and layout directories into the current directory, then exit. Existing directories are left untouched (a warning is issued). No database is built. |
-v |
--verbose |
Show warnings on the console. By default warnings are suppressed on the console (but still recorded in the log file when -L is used). |
-L |
--log |
Keep the diagnostic make_xuml_repo.log file. Without this flag the log is removed on exit. |
-D |
--debug |
Run in debug mode. |
Inspecting or customizing the metamodel
If you want to look at the .xcm metamodel files or the layout sheets that ship with the package, copy
them into your working directory with:
% makexumlrepo -M
This creates a metamodel directory (the .xcm files and mm_types.yaml) and a layout directory in
the current directory. No database is generated when -M is supplied.
Metadata
Release files for make-xuml-repo 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| make_xuml_repo-1.0.2.tar.gz | 1.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| make_xuml_repo-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.9 MB
Release files / make_xuml_repo-1.0.2.tar.gz
| Download URL | make_xuml_repo-1.0.2.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c1d2200012b26ceca7fcaabbb13f723b477c67e617794423f3d6029db68d4dc
|
|
BLAKE2b-256 checksum How to use checksums |
f038f27036ba6b0707abf47e0fa6acf2f356f9e20bc860499a4cea3a13d545e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / make_xuml_repo-1.0.2-py3-none-any.whl
| Download URL | make_xuml_repo-1.0.2-py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d561e37dace45171ebd47a4e73fcb50360036d1807651d4c67f980b4ec8c00f7
|
|
BLAKE2b-256 checksum How to use checksums |
df13e00bab75b11849cf8f9cad9b8cd643d783db451565c7606a73b244abb511
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|