R876 - modelint/shlaer-mellor-metamodel GitHub Wiki

R876 / 1:Mc

Select Action chooses a subset of instance references from exactly one Non Scalar Flow

Non Scalar Flow supplies a set of instance referenced to zero, one or many Select Action


A Select Action works just like a Restrict Action except that it outputs an Instance Flow as opposed to a Table Flow. It is also smart about Instance Selection since it knows whether or not its Class Restriction Condition is applying an Identifier comparison. If a complete Identifier is being matched, a Single Instance Flow is produced as output.

That said, it is possible to feed a Table Flow into a Select Action for the purpose of converting that Table Flow to a set of instance references in an output Instance Flow. This only works if the set of (Table Attribute, Scalar) pairs in the input exactly matches those of a Class's (Attribute, Scalar) pairs in the same Domain. When this is the case, the Select Action outputs a set of instance references effectively converting a Table Flow to an Instance Flow.

Here are some Scrall examples of such a conversion:

ac instances ..= ac table(*)

The ..= symbol is an instance assignment operator in Scrall. This results in the invocation of a Select Action on the ac table Table Flow. The * symbol tells us to select all tuples with no criteria. We assume that the Table Attributes match those of the Aircraft Class exactly. The Select Action implicitly projects down one of the Aircraft identifiers to yield the instance references that flow into the ac instances Instance Flow.