-
Notifications
You must be signed in to change notification settings - Fork 3
Restriction Condition
The relational RESTRICT operation evaluates a predicate on each tuple in a relation. That predicate will yield a true or false result for each tuple. The output relation consists of those tuples that evaluated with the true result.
A restriction condition defines a predicate that can be applied to either a set of tuples or a set of instances depending on R1152.
The Restriction Condition consists of a set of criteria of various types (equivalence, comparison, ranking, ...?) all assembled into a predicate expression.
- ID + Activity + Domain
Either a Select or Restrict Action ID
Type: Action ID, see Action
Consider the following example:
Type: Predicate, based on String
By default, the ALL
value is assumed. Thus all instances or tuples matching the Restriction Condition are selected. If no criteria
are provided, all instances are selected.
In some cases it may be desirable to yield a single tuple or instance even if multiple tuples or instances satisfy the Restriction Condition. A combination of Ranking and Comparison Criterion that choose the highest priority Tasks
, for example, might want to only choose one. If 1
cardinality is specified, at most one tuple or instances will result. Note that zero is always a possibility.
It is also possible to insist on 0
instances or tuples as a result. In effect, the empty set is obtained which has a variety of uses in certain computations. Consider the following:
ready for takeoff ..= Aircraft(0)
In the above statement a Multiple Instance Flow labeled as ready for takeoff
flowing the empty set of Aircraft. This may appear to do nothing, but, in fact, we have established the Type of the Instance Flow as Aircraft
. Later on, we could say:
ready for takeoff += aircraft in position
Here we have added the instances on the right hand side to the left hand side.
Notice also that the ready for takeoff
label is now a name that refers to two distinct Instance Flows, the flow from the Selection Action and the flow from the Instance Set Action (ADD).
Type: Cardinality, a positive integer greater or equal to zero or ALL
Copyright © 2021-2023 Leon Starr