Instance - modelint/shlaer-mellor-metamodel GitHub Wiki
We use the term instance to refer to a an instance of a Class. Historically, the term has been used loosely to refer to any kind of instantiation, such as instances of events, lifecycles, and so forth. And there's nothing wrong with this colloquial usage. But, here in the metamodel, we always mean a class instance.
For example, the Shaft
class from the Elevator Case Study can be populated with say, six instances, each representing a real world physical elevator shaft in some building.
We often represent an instance as a row of a table with a value supplied for each Attribute of its Class.
Here are our six example instances:
images/execution-subsystem/instance_10.png
Identifiers
- ID + Class + Domain
Each Class has its own local Instance numbering scope.
Attributes
ID
This ID is not to be confused with the Identifier of the Class. Instead, this is a single numeric name such as I1
, I2
, ...
It serves to uniquely distinguish Instances of ANY Class and exists at the metamodel level beyond the reach of any user model. This ID is invisible to any Actions, for example, which use Identifier value instead.
We use this ID attribute to organize dynamic metamodel compoents such as State Machines.
Type: Instance ID, based on Nominal