R985 - modelint/shlaer-mellor-metamodel GitHub Wiki

R985 / M:Mc-1

Reference Initialization finds values across one or many Attribute Reference

Attribute Reference leads to value used for zero, one or many Reference Initialization


A Reference Initialization determines the value of a referential attribute. A referential attribute is any attribute whose value is constrained as determined by one or more Attribute References. We us the term 'merged referential attribute' to describe an attribute that simultaneously references multiple other attributes on one or more Relationships. Only one value may be assigned to a referential attribute so we will need to ensure that each Attribute Reference leads us to the same value, otherwise an error occurs. Consider the following case:

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

In the example above, the C class has four Reference Initializations: A, B, D, and Group. The Group referential attribute simultaneously references the a14 and d10 instances which all must share the same Group name, Main, let's say. There are two Attribute References from 'Group' formalizing R3. Each provides a value for the a14 and b15 instances ensuring that the Group value matches. The R4 simple association Attribute Reference will then obtain d10 and ensure that its Group attribute value matches those from R3. There can be only one value used to initialize newC.Group even though it references three distinct instances.

It is clear, then, that multiple Attribute References may be consulted in a given Reference Initialization, but the values must all match.

A given Attribute Reference can be consulted in any number of Creation Actions. If that Attribute Reference formalizes a Relationship that is not dynamic during run-time, the Attribute Reference will not be used for any attribute initialization.