Guus Schreiber, first draft , 25 May 2004
Cardinality restrictions are commonly used to constrain the number
of values of a particular property, irrespective of the value type. For
example, we can state, that a minimal Italian dinner contains exactly
three courses:
Class(MinimailItalianDinner,
subClassOf(Restriction(hasCourse, cardinality(3))))
NOTE: Some
Italian restaurants in the US consider you a dummy when you skip either
primo or secondo, but it is quite common in contemporary Italy.
However, suppose we wanted to add the following constraints for minimal Italian dinners:
Thus, we need a way of saying that the number of values of a particular type (e.g., a starter) is restricted (e.g., to 1). We call these "qualified cardinality restrictions", where the term "qualified" means that we do not express restrictions on the overall number of valuesof a property, but only on the number of values of a certain type (i.e., class, datatype).
Typically, qualified cardinality restrictions are used to specify the componen types in some part-of structure such as the human body, an administrative body, an artifact or a cemical compound.
The OWL construct someValuesFrom is actually a qualified restriction
in disguise. It is equivalent to a qualified cardinality restriction
with a minimal cardinality of 1: "this property should have at least one value of this type".
The construct can be used to describe the constraint that an Italian dinner should contain at least one antipasto:
Class(ItalianDinner,
subClassOf(Restriction(hasCourse, someCaluesFrom(AntiPasto)))
The "British citizen" use case can also be expressed with this OWL construct:
Class(PersonWithBritishParent
intersectionOf(Person,
Restriction(hasParent someValuesFrom(BritishCitizen))))
The first approach only works for QCRs with a cardinality of "1 or
more". It does not handle, for example, the constraints on the
"MinimalItalianDinner", which are all of the "precisely 1" type. For
these situations one will need to use a workaround.
A common woraround is to introduece a subproperty for which the
restriction cane be formuletaed as an isolated cardinality and valuerestrictions.
The "normal hand" use case can be expressed with this workaround. e.g.:
Property(hasFinger)
Property(hasThumb
subPropertyOf(hasFinger))
Class(NormalHand
subClassOf(Restriction(hasFinger cardinality(5)))
subClassOf(Restriction(hasThumbe cardinality(1))))
The constraints formulated for minimal Italian dinners can also be expressed with this workaround:
Property(hasStarter
range(Antipasto)
subPropertyOf(hasCourse))
Property(hasMainCourse
range(unionOf(PrimoPiatto SecondoPiatto))
subPropertyOf(hasCourse))
Property(hasDessert
range(Dolce
subPropertyOf(hasCourse))
Class(MinimailItalianDinner
subClassOf(Restriction(hasStarter cardinality(1)))
subClassOf(Restriction(hasMainCourse cardinality(1)))
subClassOf(Restriction(hasDessert cardinality(1))))
The woraraound is probably OK for simple cases. The workaraound becomes problematic in cases where complicated part-of relations dominate the ontology. Examples could be ellaboarte anatomical structures, the structure of chemical compounds or the structure of large artifacts such ships or airplanes.Introducing subporprty relations for all the variants is cumbersome.
The Web Ontology Working Group has postponed the issue of full
representation of QCRs [2], but hasat the same time already suggested an OWL
representation for them [3]. It is not unlikely that a future
reincarnation of the OWL group will inculde this extension into the
language. OWL users who require QCRSs for describing complex part-whole
relations may want to use this extensions, even though these are not
yet endorsed.
The syntax for QCRS looks like this [3]. Qualified restrictions
resemble regular restrictions, but, whereas the latter only contain two
triples (an owl:onProperty one and some constraint such as
owl:allValuesFrom or owl:cardinality), qualified restrictions contain
three triples, namely:
Class(MinimalItalianDinner
subclassOf(Restriction(
hasCourse cardinality(3)))
subclassOf(QualifiedRestriction(
hasCourse valuesFrom(Antipaso) cardinality(1))))
The "NormalHand" example can be represented in a similar way:
Class(NormalHand
subClassOf(Restriction(
hasFinger) cardinality(5)))
subClassOf(QualifiedRestriction(
hasFinger valuesFrom(Thumb) cardinality(1))))
NOTE: The resulting ontology will be an
OWL Full ontology. According to the OWL Reference, RDF/OWL parsers
should produce a warning message when n onendorsed OWL vocabulary is
used, but should otherwise proceed normally.
This noet is based on discussion on the QCR requirement in the Web
Ontology Working Group and on the OWL public comments list after
comments from Rector [1].