printViolationsToLogFile impure function
Requirements.Internal.printViolationsToLogFile
ยท source
Print information about one requirement to log file
Extends Modelica.Icons.Function
Appends the verdict line of one requirement to the log file. It is called at the end of the run (at
terminal(), or at evaluationTime of the inner PrintViolations) by every requirement
block, Interfaces.PartialRequirement. The line is
Violated,<checkedComponentName>,<requirementName>,<firstFailureTime>,<attempts>,<text> Untested,<checkedComponentName>,<requirementName>,<attempts>,<text> Satisfied,<checkedComponentName>,<requirementName>,<attempts>,<text>
depending on atLeastOneFailure and untested; line breaks in the requirement text are
replaced by blanks, so that each requirement takes exactly one line. Before writing, the log file is searched
from line 2 for a line that contains ,<checkedComponentName>,<requirementName>, and does
not start with Statistics,: if there is one, nothing is written, because a tool may evaluate the
calling when-equation more than once at the same event instant (Modelon Impact does). The output ok
is always 1; it orders the write before the summary of
printViolationsToOutput through the
SortingPort.
Inputs
| Name | Type | Description |
|---|---|---|
logFile input | String | Name of log file |
checkedComponentName input | String | Full path name of checked component |
requirementName input | String | Full path name of requirement model |
requirementText input | String | Text of requirement |
atLeastOneFailure input | Boolean | = true, if requirement is violated (at least one failure) |
untested input | Boolean | = true, if requirement is untested, otherwise requirement is tested and satisfied |
firstFailureTime input | SI.Time | Time instant of first failure (if atLeastOneFailure=true) |
attempts input | Integer | Number of phases in which the property was applicable (not Undefined) |
Outputs
| Name | Type | Description |
|---|---|---|
ok output | Real | Dummy variable needed for sorting |