Web Ontology Language

Also known as: OWL · OWL 2

On this page 7

The Web Ontology Language (OWL) is a W3C standard for writing ontologies: formal, machine-readable descriptions of the classes, properties and individuals in a domain, together with the logical axioms that relate them. Within Symbolic AI & reasoning, OWL is the most widely deployed knowledge representation language on the web, because its meaning is grounded in description logic and a semantic reasoner can therefore derive facts that were never stated explicitly.

The current version, OWL 2, became a W3C Recommendation in 2009 and was revised in 2012. It builds on RDF and RDF Schema, so every OWL ontology can be stored as RDF triples and published, linked and queried alongside other Semantic Web data. Typical users include biomedical informaticians, enterprise knowledge graph teams and standards bodies that need shared, unambiguous vocabularies.

How OWL describes a domain

OWL describes a domain with three kinds of entities and a set of axioms over them. Classes are sets of things (for example Protein or Hospital), properties are binary relations, and individuals are named members of classes. Axioms state how these entities relate, such as subclass relations, disjointness, property domains and ranges, and cardinality restrictions.

The key feature is that OWL supports class expressions built from logical constructors. A class can be defined as the intersection of other classes, as everything with at least one value of a property from a given class, or as everything whose values come only from a given class. These constructors correspond directly to operators in the description logic SROIQ, which gives every OWL 2 DL ontology a precise model-theoretic semantics.

The table below lists the main building blocks and the description logic notation that underlies them.

OWL constructDescription logic formMeaning
SubClassOfC ⊑ DEvery member of C is a member of D
EquivalentClassesC ≡ DC and D have exactly the same members
DisjointClassesC ⊓ D ⊑ ⊥No individual belongs to both classes
ObjectSomeValuesFrom∃R.CHas at least one R-link to a member of C
ObjectAllValuesFrom∀R.CAll R-links point to members of C
ObjectMinCardinality≥ n R.CHas at least n R-links to members of C
TransitiveObjectPropertyTrans(R)R chains: a R b and b R c imply a R c
Core OWL 2 constructs and their logical meaning

OWL 2 profiles and expressivity

OWL 2 is defined as a family of languages because expressivity and computational cost trade off against each other. Full OWL 2 DL reasoning is decidable but has a worst-case complexity of N2EXPTIME, which is acceptable for carefully designed ontologies and painful for very large ones. The standard therefore defines three tractable profiles that drop selected constructors to guarantee polynomial reasoning.

The comparison below shows which profile suits which workload.

VariantReasoning complexityMain restrictionTypical use
OWL 2 DLDecidable, N2EXPTIMESyntactic restrictions for decidabilityRich domain models, validation
OWL 2 ELPolynomial timeNo universal restrictions or negationLarge biomedical terminologies
OWL 2 QLLogSpace for query answeringLimited existential useQuerying relational data via mappings
OWL 2 RLPolynomial timeRule-friendly subsetRule engines and triple stores
OWL 2 FullUndecidableNone beyond RDF semanticsTheoretical completeness, rarely reasoned
OWL 2 variants compared

Choosing a profile is an engineering decision, not a formality. OWL 2 EL handles terminologies with hundreds of thousands of classes in seconds, OWL 2 QL lets a system answer ontology queries by rewriting them into SQL, and OWL 2 RL maps naturally onto forward chaining rules similar to Datalog.

Reasoning under the open-world assumption

OWL reasoning follows the open-world assumption: a fact that is not stated is unknown, not false. This differs sharply from databases and logic programs, which use the closed-world assumption. If an ontology says every order has at least one customer but an order lacks a customer link, an OWL reasoner does not report an error; it simply infers that an unnamed customer exists.

OWL also makes no unique name assumption, so two different identifiers may denote the same individual unless they are declared different. Together these choices make OWL suitable for integrating incomplete data from many sources, and they surprise developers who expect schema validation.

Standard reasoning services that a semantic reasoner such as HermiT, Pellet or ELK provides are summarized below.

TaskQuestion answeredPractical value
Consistency checkingDoes any model of the ontology exist?Detects contradictory axioms
Class satisfiabilityCan this class have any members?Finds modeling errors early
ClassificationWhat is the full inferred class hierarchy?Builds navigable taxonomies
RealizationWhich classes does each individual belong to?Enriches instance data
Entailment checkingDoes a given axiom follow logically?Supports query answering
Typical reasoning tasks over an OWL ontology

OWL sits between lightweight vocabularies and full first-order logic. RDF Schema can express class and property hierarchies but cannot state disjointness or cardinality, so it supports only shallow inference. First-order logic is more expressive than OWL, yet reasoning in it is undecidable in general, which is why OWL deliberately restricts itself to a decidable fragment.

Compared with frames and classic object-oriented models, OWL classes are sets defined by logical conditions rather than templates with default slot values. Compared with SHACL, the W3C shape language, OWL infers new knowledge, while SHACL validates data against constraints under closed-world semantics. Many production systems use both: OWL for meaning, SHACL for data quality.

Common pitfalls in OWL modeling

Most problems in OWL projects stem from misreading the semantics rather than from tooling. The following mistakes recur in reviews of real ontologies.

MistakeConsequenceRemedy
Using domain and range as constraintsReasoner infers types instead of flagging errorsValidate with SHACL shapes
Forgetting disjointness axiomsContradictions remain undetectedDeclare disjoint sibling classes
Confusing some and only restrictionsUnintended or missing inferencesTest with example individuals
Modeling everything as classesBloated, slow ontologyUse individuals and annotations
Ignoring the chosen profileReasoner timeouts in productionCheck axioms against the profile
Frequent modeling mistakes and their remedies

A further risk is scale: an expressive ontology joined with millions of instances can overwhelm a tableau reasoner. Teams usually keep the terminological part (TBox) expressive and the assertional part (ABox) in a triple store that applies a tractable profile.

The short version

OWL is a precise language for describing what things are and how they relate. You might say that every surgeon is a doctor. You might say that a patient cannot also be a hospital. A computer can then read these statements and work out new facts on its own.

Think of it as a very strict dictionary. Each entry is written in logic, not prose. Because the rules are exact, different organizations can share the same dictionary and mean exactly the same thing.

Where it makes a difference

A research hospital combines laboratory results, diagnoses and drug data from four separate clinical systems. Each system uses different codes, so simple database joins miss many links. The informatics team adopts a large biomedical ontology written in OWL 2 EL and maps every local code to an ontology class.

When a clinician searches for patients with any viral infection of the lungs, the reasoner classifies codes such as influenza pneumonia and viral bronchitis under the broader class automatically. Classification of the ontology, with more than 300,000 classes, finishes in well under a minute. The result is a cohort query that finds substantially more eligible patients than the earlier keyword search, without anyone listing the subtypes by hand.