Skip to main content

Shlaer-Mellor Executable UML Model Execution Environment

Project description

Model execution engine

Loading a System

We supply mx with a system to run, an initial context, and a scenario to execute

mx -s elevator -c three_bank1 -x lobby_to_three

The required arguments are:

-s / --system
-c / --context
-x / --scenario

Optional arguments are:

-D / --debug
-V / --version

-s or --system

Here you specify the name of a directory containing the following components:

system_name/
    system.ral   - Metamodel produced by xuml-populate (can be named anything you like, with any extension)
    db_types/    - Directory of yaml files mapping user types to TclRAL system types (must have this name)
        domain_name1_types.yaml  - Each yaml file name must begin with domain name or alias
        domain_name2_types.yaml
        domain_name3_types.yaml

Example:

elevator/                 - Any name ok
    elevator.ral          - Any name ok, ev.txt, mm3.ral, etc.
    db_types/             - Must be this name
        evman_types.yaml  - could have named it evman.yaml, elevator_management.yaml, 
                          - evman_user_to_tcl_types.yaml, etc
                          - but prefix must be either evman (alias) or elevator_management
                          - case insensitive, so EVMAN also okay

The system.ral file is actually just a text file serialization of a TclRAL database. Specifically, it is a populated SM Metamodel that you can generate with the xuml-populate tool. The metamodel is populated with one or more modeled domains. In our example, this is the elevator management domain. We could also add in the transport and sio domains defined in the elevator case study if we like, but for now we just have the elevator management (EVMAN) domain.

-c or --context

This is yet another directory that contains a single initial context per domain. It is structured like this:

context_name/    - Any name that describes your aggregate initial context
     domain1.sip - One initial population per domain in the system
     domain2.sip
     domain3.sip

An initial context is a population of initial instances and states. That way we can begin a scenario with a known set of instances in known states for those instances with modeled lifecycles (state machines).

Each domain's context is defined with a single *.sip (scenario instance population) file.

In our example we have only one domain population:

three_bank/
     evman_three_bank1.sip

We named it 'three_bank' since we are using three separate elevator banks, 'lower floors', 'express', and 'freight'.

If we were running the trans and sio domains, we could have supplied one *.sip file for each in this directory as well.

Note that each *.sip file name must begin with a domain name or alias.

See the sip-parser repository wiki for details on the grammar.

MX invokes the sip-parser when it loads the file and will throw any errors it finds in the process.

-x or --scenario

Finally, we provide a sequence of interactions in the form of a scenario file to run against the populated system.

This is specified in a *.scn file. (grammar/parser yet to be designed)

You use the sequence of interactions to drive validation or exploration.

For example, you might specify that a cabin going up is requested from the lobby floor in the lower floors bank. It arrives, floor 3 is requested, the doors close, the cabin transits and then arrives at that floor with the doors opening.

This scenario will result in the appropriate events signaled in the loaded system and collect any responses and status updates of interest along the way.

You can define multiple initial contexts for a system and run the same or different scenarios against each.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mi_mx-0.2.7.tar.gz (67.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mi_mx-0.2.7-py3-none-any.whl (106.1 kB view details)

Uploaded Python 3

File details

Details for the file mi_mx-0.2.7.tar.gz.

File metadata

  • Download URL: mi_mx-0.2.7.tar.gz
  • Upload date:
  • Size: 67.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for mi_mx-0.2.7.tar.gz
Algorithm Hash digest
SHA256 7a1ec0c65c3efb2126b48107b7ddcb89bc32b4ae188d8c1798ef10782e6411cd
MD5 949da7dbee61edc7151f04efc82873d0
BLAKE2b-256 c00d9803bdbe65c549365b486f49a6353c5f98754a1126fafd1191d32ca33ee3

See more details on using hashes here.

File details

Details for the file mi_mx-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: mi_mx-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 106.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for mi_mx-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4a1ad7fef50bee5924a46c308ce92ac3af58b6c6e8adfd653bd509a7167976e2
MD5 51d94b80a062ff82e5cfd6035df484d5
BLAKE2b-256 ce7faca39db81f4188310fd56ae04e5d5b40d925b6bf6b1205b18a9dcf47b3c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page