W3C home > Mailing lists > Public > public-owl-comments@w3.org > February 2010

OWL2 UML diagrams make no distinction between composition vs. aggregation.

From: Rouquette, Nicolas F (316A) <nicolas.f.rouquette@jpl.nasa.gov>
Date: Tue, 16 Feb 2010 15:07:57 -0800
To: "public-owl-comments@w3.org" <public-owl-comments@w3.org>
CC: "Kendall, Elisa (315A-Affiliate)" <ekendall@sandsoft.com>, Pete Adaptive <pete.rivett@adaptive.com>, "Jenkins, J Steven (3101)" <j.s.jenkins@jpl.nasa.gov>
Message-ID: <C7A0654D.1056B%Nicolas.F.Rouquette@jpl.nasa.gov>
Section 2.1 summarizes the simple UML notation used throughout the OWL2 spec:
http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Structural_Specification

However, the notation is simple but it is too simple and misses some subtle differences.

Per Sec. 3.5 (http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Ontology_Annotations) "an OWL2 ontology contains a set of annotations". This means that the directed association [Ontology -> ontologyAnnotations:Annotation] at the top of Fig. 1 ( http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Ontologies) is really a composition association with Ontology being the composite container and Annotation being the contained element.

There is a chain of composition from Ontology to Entity starting with [Ontology -> axioms:Axiom] in Fig 3 and continuing with [Declaration -> entity:Entity] in Fig 3 ( http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Entity_Declarations_and_Typing ). This brings us to the concrete subtypes of Entity shown in Fig 2 in clause 5 ( http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Entities.2C_Literals.2C_and_Anonymous_Individuals).

So, eventually every Entity and Axiom is compositionally owned by an Ontology. So far so good. Are all associations in the OWL2 UML diagrams then composition relationships?

The answer is no. For a counter example, look at Fig. 13 in clause 9.1: http://www.w3.org/TR/2009/REC-owl2-syntax-20091027/#Class_Expression_Axioms
So, an Ontology compositionally owns Axiom(s), e.g., a kind of ClassAxiom in Fig. 13, which could be, e.g., a DisjointUnion axiom that relates a class with 2 or more disjoint ClassExpression(s).

Recall that a Class is a kind of Entity and therefore is compositionally owned by an Ontology.  Clearly, the association relationship [DisjointUnion -> class:Class] cannot be a composition, it must have the semantics of a shared aggregation.

The point here is that the current 23 UML class diagrams in the OWL2 spec fail to make an important but somewhat subtle distinction between composition vs. aggregation in capturing the intent of the relationship among OWL2 concepts. This can be fixed but this is more than simply distinguishing composition vs. aggregation associations. I have developed a fix for this but this requires adding a couple of "reference" classes to make sure that all subclasses of a composable class are also composable and, conversely, that all subclasses of composite classes are composite, and, last but not least, that no metaclass is has both composable and composite subclasses.

- Nicolas.
Received on Tuesday, 16 February 2010 23:08:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 16 February 2010 23:08:40 GMT