Issue 15650: utp::InteractionOperator::determAlt not applicable in CombinedFragment (uml-testing-profile-rtf) Source: Fraunhofer FOKUS (Mr. Marc-Florian Wendland, marc-florian.wendland(at)fokus.fraunhofer.de) Nature: Clarification Severity: Significant Summary: Rational: Section 6.3.2 Test Behavior, Subsection InteractionOperator says the following: --- The deterministic alternative is a shorthand for an Alternative where the operands are evaluated in sequence such that it is deterministic which operand is chosen given the value of the guards, regardless of the fact that the guard for more than one operand may be true --- Issue: utp::InteractionOperator::determAlt is embedded in an UTP enumeration and therefore not applicable to UML models. UML::CombinedFragment refers to UML::InteractionOperator instead, so that it seems as utp::InteractionOperator is an extension to UM::InteractionOperator. Extending metaclasses is restricted by the UML Profile design requirements (UML::Superstructure, Section 18.1.2, Item 1): --- 8. […] UML Profiles should form a metamodel extension mechanism that imposes certain restrictions on how the UML metamodel can be modified. The reference metamodel is considered as a “read only” model, that is extended without changes by profiles. It is therefore forbidden to insert new metaclasses in the UML metaclass hierarchy (i.e., new super-classes for standard UML metaclasses) or to modify the standard UML metaclass definitions (e.g., by adding meta-associations). Such restrictions do not apply in a MOF context where in principle any metamodel can be reworked in any direction. --- UTP::InteractionOperator::determAlt must be completely redesigned in order to be applicable to UML models. Resolution: Change the determAlt enumeration into a «DetermAlt» stereotype, enhancing CombinedFragment instead. The idea is to declare the whole combined fragment as a deterministic alternative. This would address another shortcoming of the current description of determAlt. In contrast to the normal operand selection semantics of UML for alternative combined fragments, the determAlt combined fragment is intended to work slightly different: The decision whether an operand should be entered is resolved by the first occurrence specification of a test component lifeline first. If the actual occurrence specification matches the expected one during execution, than the guard condition is going to be evaluated. The guard condition expresses restrictions on data instances, potentially accompanying a receive message. If the guard is left empty, this is a shortcut for “true”. Only if both conditions are met, the operand will be entered. Revised Text: Replace Figure 6.5 with (notice: Figure was already re-numbered to 7.5 by the resolution of issue 15770) Update Figure 6.5 caption from Deterministic Alt Operator (in Combined Fragments) To Deterministic Alternative Combined Fragment Update Text Change title of section determAlt from determAlt (an interaction operator) to DetermAlt Update Text Change text of subsection Description of section DetermAlt from The deterministic alternative is a shorthand for an Alternative where the operands are evaluated in sequence such that it is deterministic which operand is chosen given the value of the guards, regardless of the fact that the guard for more than one operand may be true To The deterministic alternative is a combined fragment with interaction operator alt applied and stereotyped by «DetermAlt». The interaction operands of a deterministic alternative are evaluated in exactly the same order as they appear in the model (respectively diagram) and regardless of the fact that the guard for more than one operand may be true. Add subsection Add new subsection Extension after subsection Description in section DetermAlt with content • CombinedFragment (from UML::Interactions::Fragments) Add subsection Add new subsection Generalizations after subsection Extensions in section DetermAlt with content None. Add subsection Add new subsection Attributes after subsection Generalization in section DetermAlt with content None. Update Text Add new paragraphs to the beginning subsection Semantics of section DetermAlt: Only one lifeline, representing a test component, is allowed to participate in a deterministic alternative, i.e. no other test component lifeline is covered by the surrounding combined fragment. If a deterministic alternative is reached during the execution of an interaction, the involved test component waits until it receives an input. After an input was received, the evaluation of the deterministic alternative is carried out. The evaluation mechanism of the guards of a deterministic alternative restricts the ordinary evaluation mechanism of combined fragments in UML in a way that guards only allowed to references values either local to the test component lifeline or global to the entire enclosing interaction. Furthermore, the evaluation of the entering condition for an interaction operand will be carried out in two-step-process during runtime: • Guard evaluation: The first step will evaluate the guard condition. If it fails, the entire operand will be excluded for further investigation and not entered. If the guard condition evaluates to true, an additional evaluation step succeeds. • Occurrence specification evaluation: After a successful guard evaluation, the very first occurrence specification on the test component lifeline within the interaction operand, which is supposed to be entered, will be checked. This may include a check whether a particular timer has expired, or whether a particular message is received from another lifeline, which must also participate in the deterministic alternative. If it represents a check for a time out event, and the referenced timer has not expired yet, the interaction operand will not be entered. If it represents a message originating from another lifeline, the interaction operand will only be entered if the expected message matches the actual message during runtime. An expected message matches with an actual messages, if all the messages arguments are equal to the expected message arguments. Wildcards may be used allowing message arguments to be optionally provided. If the occurrence specification evaluation is also fulfilled, the interaction operand will be entered. Otherwise, the interaction operand will be skipped and the evaluation of the next interaction operand (if present) starts immediately. It is neither specified when the test case will be concluded by the execution environment nor what test case verdict will be delivered if none of the interaction operands are allowed to be entered. Add subsection Add new subsection Constraints after subsection Semantics of section DetermAlt with content [1] The interaction operator of the deterministic alternative must be of InteractionOperatorKind::alt. self.base_CombinedFragment.interactionOperator = uml::InteractionOperator::alt [2] There must be at most one lifeline, representing a classifier stereotyped by «TestComponent», being covered by a deterministic alternative. [3] Guards of a deterministic alternative must contain only references to values local to the lifeline, representing a classifier stereotyped by «TestComponent», or values global to the whole Interaction. Update Text Change the text of subsection Notation of section DetermAlt from The «DetermAlt» uses the notation for combined fragments in interactions: a ‘determAlt’ in the small compartment in the upper left corner of the CombinedFragment frame. To One possible notation is to reuse the ordinary visualization of combined fragment, but with determAlt depicted in the upper left cornered rectangle of the combined fragment. Another possibility is to put the stereotype («DetermAlt») on top or beside the combined fragment. Another valid visualization is to show a comment-like symbol with text «DetermAlt» and attach it with the combined fragment frame. Disposition: Resolved Actions taken: September 27, 2010: received issue October 21, 2011: closed issue Discussion: see pge 45 for figure End of Annotations:===== m: webmaster@omg.org Date: 27 Sep 2010 18:00:54 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Marc-Florian Wendland Employer: Fraunhofer FOKUS mailFrom: marc-florian.wendland@fokus.fraunhofer.de Terms_Agreement: I agree Specification: UML Testing Porifle Section: 6.3.2 FormalNumber: formal/05-07-07 Version: 1.0 Doc_Year: 2005 Doc_Month: July Doc_Day: 07 Page: 20 Title: utp::InteractionOperator::determAlt not applicable in CombinedFragment Nature: Clarification Severity: Significant CODE: 3TMw8 B1: Report Issue Description: Rational: Section 6.3.2 Test Behavior, Subsection InteractionOperator says the following: --- The deterministic alternative is a shorthand for an Alternative where the operands are evaluated in sequence such that it is deterministic which operand is chosen given the value of the guards, regardless of the fact that the guard for more than one operand may be true --- Issue: utp::InteractionOperator::determAlt is embedded in an UTP enumeration and therefore not applicable to UML models. UML::CombinedFragment refers to UML::InteractionOperator instead, so that it seems as utp::InteractionOperator is an extension to UM::InteractionOperator. Extending metaclasses is restricted by the UML Profile design requirements (UML::Superstructure, Section 18.1.2, Item 1): --- 8. [.] UML Profiles should form a metamodel extension mechanism that imposes certain restrictions on how the UML metamodel can be modified. The reference metamodel is considered as a .read only. model, that is extended without changes by profiles. It is therefore forbidden to insert new metaclasses in the UML metaclass hierarchy (i.e., new super-classes for standard UML metaclasses) or to modify the standard UML metaclass definitions (e.g., by adding meta-associations). Such restrictions do not apply in a MOF context where in principle any metamodel can be reworked in any direction. --- UTP::InteractionOperator::determAlt must be completely redesigned in order to be applicable to UML models.