R990 - modelint/shlaer-mellor-metamodel GitHub Wiki

R990 / 1:Mc

Multiple Create Action instantiates exactly one Lineage

Lineage is instantiated by zero, one or many Multiple Create Action


The distinguishing property of a Multiple Create Action is that it instantiates each Class in a Lineage.

images/create-delete-subsystem/R990-10.png

In the example above, the modeler writes an action to create an instance of class C. Since that class participates in a Generalization, two in fact, the modeler must specify initial attribute value s for each Facet in a Lineage. In this case the modeler must instantiate the two Superclass instances A and E. Here Scrall is just used as an example action language, feel free to imagine your own as long as it supports the essential semantics.

This particular example is a Multiple Local Create Action where no Lifecycle is modeled. A reference to the new instance of C is yielded across the .= assignment. (In Scrall, the modeler places indicates which reference to return by specifying that Class first between the {} Lineage brackets. Each item between the brackets is an Instance Initialization. The first item consists of an Explicit Initialization of attributes X and Y of C along with a Reference Initialization on R3 to the instance named f12 of the F Class. The attributes of Class A can be determined using Default Initialization and Class E explicitly initializes its Z attribute.

Since the Lineage and Facet information in the metamodel can be used to determine all relevant Classes and Generalizations, there is no need for the modeler to specify R1 and R2 and, in fact, A() can be omitted since it only uses Default Initialization. The necessity of the A Class is already known in the metamodel.

The order in which the instances are created is entirely up to the MX domain since, from the modeler's perspective, they are created simultaneously.

A given Lineage may be instantiated by any number of Multiple Create Actions. And if the Lineage instances are not dynamic, created at runtime that is, then there will be no associated create actions.

Formalization

Multiple Create Action.(Lnum, Domain) -> Lineage.(Lnum, Domain)

Constraint

The same Domain attribute value simultaneously formalizes R989 since, both the Lineage and the Multiple Create Action are in the same Domain.