Namespace.contents



Date view Thread view Subject view Author view

Gonzalo Génova (ggenova@inf.uc3m.es)
Fri, 1 Feb 2002 15:59:01 +0100


Hello, The current definition of the operation Namespace.contents is: The operation "contents" results in a Set containing all ModelElements contained by the Namespace. contents : Set(ModelElement) contents = self.ownedElement -> union(self.namespace, contents) (UML Specification, version 1.4 page 2-64, version 1.3 page 2-55) The last line of this definition seems wrong, since the "union" operation must have a single parameter. It can be a simple typographic error, where the right text would be: contents = self.ownedElement -> union(self.namespace.contents) However, the interpretation of this expression is not what the text says, but: "The operation "contents" results in a Set containing all ModelElements contained by the Namespace plus all ModelElements contained by the containing Namespace". The former definition of this operation did not present any contradiction between text and OCL expression: The operation "contents" results in a Set containing all ModelElements contained by the Namespace. contents : Set(ModelElement) contents = self.ownedElement (UML Semantics, version 1.1 page 32) My questions are: 1) Is the expression in v1.4 and v1.3 truly wrong, or am I mistaken? 2) Why has the definition of the operation been changed since v1.1? 3) Which one is the right one? Thanks, Gonzalo


Date view Thread view Subject view Author view