Previous UML Classes Table of Contents UML Packages Next


13.3.14 FunctionBehavior

BasicBehaviors


*Generalizations

   

    OpaqueBehavior (from BasicBehaviors ) on page 464

*Description

   A function behavior is an opaque behavior that does not access or modify any objects or other external data.

*Attributes

   No additional attributes

*Associations

   No additional associations

*Constraints

   [1] A function behavior has at least one output parameter.

Issue 8308 -add OCL constraint

   (self.ownedParameters->notEmpty) and self.ownedParameters->exists (p| (p.direction = ParameterDirectionKind ::out) or(p.direction = ParameterDirectionKind ::inout) or(p.direction = ParameterDirectionKind ::return))

   [2] The types of parameters are all data types, which may not nest anything but other datatypes.

*Semantics

   Primitive functions transform a set of input values to a set of output values by invoking a function. They represent functions from a set of input values to a set of output values. The execution of a primitive function depends only on the input values and has no other effect than to compute output values. A primitive function does not read or write structural feature or link values, nor otherwise interact with object memory or other objects. Its behavior is completely self-contained. Specific primitive functions are not defined in the UML, but would be defined in domain-specific extensions. Typical primitive functions would include arithmetic, Boolean, and string functions.

   During the execution of the function, no communication or interaction with the rest of the system is possible. The amount of time to compute the results is undefined. FunctionBehavior may raise exceptions for certain input values, in which case the computation is abandoned.

*Notation

   None

*Examples

   Mathematical functions are examples of function behaviors.

   FunctionBehavior is introduced to model external functions that only take inputs and produce outputs and have no effect on the specified system.