Selector - modelint/shlaer-mellor-metamodel GitHub Wiki
Date and Darwen define an operator that selects one value from the set of values defined by a type. We model that here as a selector. In an action language like Scrall, we can use a Selector to specify a constant value. Here are some examples in Scrall:
pizza area = pizza radius * Integer[2] * Rational[pi]
The [] notation in Scrall denotes a Selector. In the first example, the value 2 is selected from the set of integers and in the second, a default approximation of pi is selected from the set of Rational numbers.
Just as with any Type Action, it is the responsibility of the supporting typing system to define and support whatever operators are going to be required during execution. Here in the metamodel we are only responsible for recognizing them.
Identifiers
- ID + Activity + Domain
Attributes
Name
Any string of non-whitespace characters can represent a value. During execution, it will be cast to the appropriate implementation type.
Value: Value Representation -> String