SortingPort connector
Requirements.Internal.SortingPort
ยท source
Connector used to force a particular ordering of equations and to pass information about satisfied requirements
Connector that links every requirement block to the inner
Verify.PrintViolations. It is not drawn in a
diagram: each requirement (Interfaces.PartialRequirement)
and each StatisticsLogger contains a small
Dummy model whose sortingPort is connected to printViolations.sortingPort through the
outer printViolations.
The two flow variables are summed by the connection: one is set by each requirement to the
result ok of writing its log line (1 once written) and status to its status
(0 = violated, 1 = untested, 2 = satisfied). PrintViolations therefore sees, with a negative sign, the number
of requirements and the sum of their statuses, from which it computes its output satisfaction in
percent, and the summary it prints at the end depends on every requirement's ok, so that a tool
sorts the summary after all log lines are written. A StatisticsLogger adds 0 to both sums. The potentials
dummy1 (the result of initializing the log file) and dummy2 (0) are set by
PrintViolations only; they make the connector balanced.
Components and variables
| Name | Type | Description |
|---|---|---|
dummy1 | Real | Potential set by PrintViolations to the result of the log-file initialization (orders it first) |
dummy2 | Real | Potential set to 0 by PrintViolations (balances the two flow variables) |
status flow | Real | Return 0 (Violated), 1 (Untested), ... 2 (Satisfied) |
one flow | Real | Return 1 (to calculate number of requirement blocks |