Annotated example of

Proposed OWL Knowledge Base Language

Peter F. Patel-Schneider
Ian Horrocks
Frank van Harmelen

19 March 2002


We illustrate the proposed "light" (frame-based) idiom of OWL. These examples are loosely based on the DAML+OIL walkthrough at

Table of contents

We illustrate the following language features:


Male is a class with Animal as its superclass



Multiple superclasses are allowed;
Note the use of named classes only (ie no class-expressions);
Note the use of DefinedClass: not only does a Man have these properties, but anything with these properties (ie being both Person and Male) is also Man

              supers(Person, Male))

              supers(Person, Female))

Property hierarchy (subproperties)

hasMother is a subproperty of hasParent

SubPropertyOf(hasMother, hasParent)

Modality & multiplicity

The class Animals has two properties:
hasParent (with range Animal) and hasMother (with range Female).
hasMother must have at least and at most one value (ie exactly one value).
hasParent must have at least one value.
The multiplicity constraint is not specified for hasParent, so it defaults to
the value: "multiplicity=multivalued", ie we may have multiple values.

                slot(hasParent, range=Animal, required)
                slot(hasMother, range=Female, required, singlevalued))

Multiple statements on the same class

A further property of Animal is defined.
Notice that class definitions can be spread over multiple statements.
This is unlike frame-systems, but crucial in a Web context


                slot(age, range=xsd:NonNegativeInteger, required))

Limited cardinalities

Persons are required to have a parent that is also a person.
The cardinality constraint of exactly 2 is inexpressible in the light subset of OWL.
Instead we use the weaker standard value multiplicity=multivalue.
A spouse is optional, but there can be at most one (multiplicity=singlevalued)
and it must be of type person (range=Person).
A height may also be specified. Modality and multiplicity of this default to optional and multivalued respectively, so anything is allowed (0, 1 or many values). However, if a person does have a height, it must be of type Height (range=Height).

                slot(hasParent, range=Person, required),
                slot(hasSpouse, range=Person, optional, singlevalued),
                slot(hasHeight, range=Height))

Global constraints

shoesize is given a global range, using a datatype. (contrast this with the local range definition in a slot)

Range(shoesize, xsd:decimal)

shoesize is globally stated to be functional. (constrast this with the local definition multiplicity=singlevalued in a slot)



A further property of hasParent is defined.
Like class definitions, property definitions can be spread over multiple statements.

SubPropertyOf(hasParent, hasAncestor)

Disjointness & identity

disjointness is not a typical frame idiom, but often used, and crucial in a Web context


These three classes are pairwise disjoint

  Disjoint(Car, Person, Plant)

Class identity (= have the same extension)

SameClassAs(HumanBeing, Person)

Defined classes

a MarriedPerson is any Person who has exactly one spouse.
Note the use of DefinedClass, ie anything with these properties is also a MarriedPeron
Notice the absence of range, ie anything (Thing) can be a spouse

               slot(hasSpouse, required, singlevalued))

Adults are any person whose age is over 17 (assuming over17 has been defined as an xsd:simpleType as in the DAML+OIL walkthrough).

             slot(age, range=foo:over17, required))


Defining an individual with an ID, being of a certain type, and having certain values for various properties

            (age, xsd:integer, 13),
           (shoesize, xsd:decimal, 9.5))


defining a class by enumerating its instances

EnumeratedClass(Height, short, medium, tall)

Required slot values

Here we use of a required slot-value to define a class:
TallThing are anything whose hasHeight slot has only the value tall.
Note the use of singlevalued, which justified the phrase "has only the value"
Note the absence of superclasses, ie this is a subclass of Thing.


A more sophisticated version of the Person class above would not only demand that a Person has multiple Persons as their parents, but also require that at least one of them is a Man, and one of them is a Woman:

               slot(hasParent, range=Person, required=Man, 
                    required=Woman, multivalued))