Introduction
Ontology engineering is more than creating classes, defining relationships, or organizing concepts into a hierarchy. It is a systematic discipline for transforming domain knowledge into structured, logically consistent, validated, and ultimately executable semantic systems.
For many learners, ontology engineering presents two challenges. Academic materials often emphasize formal logic and theoretical foundations without sufficiently connecting them to practical implementation. Conversely, tool-oriented tutorials frequently demonstrate how to create ontology elements without explaining the architectural decisions, semantic constraints, and reasoning principles behind them.
A practical approach should bridge these two dimensions.
This article introduces an end-to-end ontology engineering approach using the familiar Pizza domain as a learning example. Through this approachable domain, we can progressively explore the principles of OWL, semantic modeling, reasoning, validation, and executable knowledge.
The objective is to establish a continuous engineering path: from creating the first OWL class to designing a governed, reasoned, and machine-interpretable semantic system.
1. Understanding the Ontology Engineering Lifecycle
A useful way to organize ontology engineering activities is through a seven-stage Semantic Knowledge Development Lifecycle (SKDL).
Each stage addresses a different engineering concern, while contributing to the overall quality and operational capability of the semantic model.
The seven stages can be understood as follows:
-
Conceptual Modeling: Identify domain concepts, establish class hierarchies, and define the foundational structure of knowledge.
-
Semantic Description: Define relationships, property characteristics, domain and range constraints, and the intended meaning of concepts.
-
Semantic Requirements: Identify the questions the ontology must answer and translate domain requirements into competency questions.
-
Reuse and Governance: Establish modularization, reuse strategies, ontology alignment, and architectural governance.
-
Semantic Validation: Evaluate consistency, verify constraints, and identify structural or semantic modeling problems.
-
Semantic Reasoning: Apply logical inference to derive implicit knowledge, classify individuals, and identify relationships that are not explicitly asserted.
-
Executable Knowledge: Translate validated semantic knowledge into precise conditions, value specifications, and integrity requirements that can support deterministic execution.
These stages should not be treated as isolated activities. They form a cumulative engineering lifecycle in which the outputs of earlier stages become the foundations for subsequent stages.
2. Building the Structural Foundation: Classes and Relationships
The first step in ontology engineering is to establish a meaningful representation of the domain.
Using a Pizza domain as an example, we can identify concepts such as:
-
Pizza
-
PizzaBase
-
PizzaTopping
-
CheeseTopping
-
VegetableTopping
-
MeatTopping
These concepts can be organized into a class hierarchy. For example, CheeseTopping, VegetableTopping, and MeatTopping can be modeled as subclasses of PizzaTopping.
However, a useful ontology requires more than a class hierarchy.
We must also define the relationships between concepts. Object properties such as hasTopping and hasBase describe how instances of different classes are connected.
Property characteristics can further refine their semantics:
-
Functional properties restrict a subject to at most one distinct value.
-
Inverse properties describe relationships from the opposite direction.
-
Transitive properties allow relationships to be inferred through chains of connections.
-
Domain and range axioms describe the intended subject and object classes of a relationship.
An important modeling consideration is the Open World Assumption (OWA). In OWL, the absence of an assertion does not automatically mean that the assertion is false.
For example, if a pizza has no explicitly recorded topping, an OWL reasoner cannot simply conclude that the pizza has no topping.
Understanding this distinction is essential when moving from basic ontology construction toward reliable semantic applications.
3. From Semantic Requirements to Governed Knowledge
Once the basic ontology structure has been established, the next challenge is determining whether the model adequately represents the intended domain.
A useful technique is to define competency questions.
Competency questions are questions that an ontology should be able to answer. They help translate business or domain requirements into concrete semantic modeling objectives.
For example:
-
Which toppings are classified as cheese toppings?
-
Which pizzas use a particular pizza base?
-
Which pizzas contain a specified combination of toppings?
-
Which individuals satisfy a particular semantic classification?
These questions provide a practical basis for evaluating the ontology.
The next concern is reuse and governance.
Ontology engineering should consider:
-
Whether existing ontologies can be reused.
-
Whether the ontology should be divided into independent modules.
-
Whether upper-level ontologies can provide shared conceptual foundations.
-
How naming conventions, modeling standards, and change management should be maintained.
-
How semantic dependencies and architectural decisions should be documented.
Governance is not simply an administrative activity. It establishes the conditions under which an ontology can evolve without losing its consistency, meaning, and interoperability.
4. Semantic Validation: Establishing Trust
A structurally complete ontology is not necessarily a valid ontology.
Semantic validation examines whether the knowledge model behaves consistently with its declared axioms and constraints.
Two complementary approaches are particularly useful.
OWL reasoning and consistency checking
A reasoner can identify logical inconsistencies, classify classes, and derive implicit relationships.
For example, if an individual is asserted to belong to two mutually disjoint classes, the ontology may become inconsistent.
SHACL constraint validation
The Shapes Constraint Language (SHACL) provides a complementary approach for validating graph data against explicitly defined constraints.
It can be used to verify requirements such as:
-
A pizza must have a specified number of toppings.
-
A required property must be present.
-
A property value must belong to an expected category.
-
A data value must satisfy a specified structural or datatype condition.
OWL reasoning and SHACL validation serve different purposes.
OWL describes logical meaning and supports inference under the Open World Assumption. SHACL validates graph data against explicit constraints, commonly using a closed-world validation perspective.
Combining these approaches provides a stronger foundation for semantic quality assurance.
5. Semantic Reasoning: Moving Beyond Explicit Assertions
Semantic reasoning is where an ontology begins to demonstrate its ability to derive knowledge that has not been explicitly asserted.
An important distinction is the difference between primitive and defined classes.
A primitive class is described through necessary conditions. Membership in that class does not necessarily follow from satisfying those conditions alone.
A defined class has both necessary and sufficient conditions. A reasoner can therefore classify an individual into that class when the individual satisfies the complete definition.
For example, consider a class defined as:
A VegetarianPizza is a Pizza that has only vegetarian toppings and satisfies the other required conditions of the definition.
When an individual pizza satisfies the necessary and sufficient conditions, an OWL reasoner can infer that it belongs to VegetarianPizza, even if this membership was never explicitly asserted.
This illustrates the difference between manually assigning classifications and allowing a logical system to derive them.
Reasoning technologies such as HermiT, Pellet, ELK, and Konclude provide different reasoning capabilities and performance characteristics. Their suitability depends on the ontology language features, expressivity, and operational requirements.
The underlying principle is that an ontology should not merely store knowledge. It should also support the derivation of additional knowledge through formal semantics.
6. Executable Knowledge: From Semantic Meaning to Deterministic Conditions
Reasoning can establish what logically follows from a knowledge model. However, operational systems often need something more precise: clearly defined conditions that determine whether an action should occur.
This introduces the concept of executable knowledge.
Three complementary dimensions are particularly important.
6.1 Boundary Control: Universal Restrictions and Closure Axioms
Universal restrictions express constraints on the permitted values of a property.
For example:
Pizza hasTopping only VegetarianTopping
This means that every value of hasTopping for the pizza must belong to VegetarianTopping.
However, a universal restriction alone does not establish that any topping actually exists.
This distinction becomes important because of the Open World Assumption.
Closure axioms can help establish a more explicit boundary around the permitted values. By combining existential and universal restrictions, a model can express both the existence of relevant values and the fact that all such values belong to a specified category.
This is particularly useful when preparing semantic knowledge for systems that require more explicit operational conditions.
6.2 Value Specification: Enumerations and hasValue Restrictions
An ontology sometimes needs to describe a property whose permitted values come from a finite, explicitly identified set.
For example, a temperature category might be represented through an enumerated class:
{Hot, Medium, Mild}
Enumerated classes provide an explicit set of permitted individuals.
The hasValue restriction adds another important capability.
It expresses that a particular property must have a specific individual as its value.
For example, a semantic condition may require that a particular pizza configuration has a specified base or category value.
These constructs help establish precise semantic bindings.
In an executable knowledge architecture, such bindings can become inputs to event conditions, rule evaluation, and trigger mechanisms.
6.3 Data Integrity: Cardinality Restrictions
Cardinality restrictions describe the permitted number of values associated with a property.
The three principal forms are:
-
Minimum cardinality: at least a specified number of values.
-
Maximum cardinality: no more than a specified number of values.
-
Exact cardinality: precisely a specified number of values.
For example, a model might define that a pizza must have exactly one pizza base.
However, OWL cardinality restrictions must be interpreted carefully.
OWL operates under an open-world, non-unique-name semantic framework. Two different individual names are not automatically assumed to represent two distinct individuals.
Therefore, explicit declarations of individual distinctness may be necessary when testing cardinality constraints.
This is one reason why OWL reasoning and SHACL validation should be understood as complementary rather than interchangeable approaches.
Together, boundary control, value specification, and data integrity establish a stronger foundation for executable semantic knowledge.
7. Connecting Ontology Engineering to Executable Intelligence
The previous stages can be brought together through an architectural perspective called Executable Knowledge Architecture (EKA).
EKA can be represented by the tuple:
EKA = (K, R, Θ, Φ, Γ)
Where:
-
K — Knowledge Graph: The structured representation of domain knowledge, concepts, relationships, and instances.
-
R — Reasoning & Rules: The logical and rule-based mechanisms used to derive knowledge and evaluate conditions.
-
Θ — Triggers: The conditions and events that initiate an execution process.
-
Φ — Execution: The mechanisms through which validated knowledge and evaluated conditions lead to operational actions.
-
Γ — Governance: The controls that establish quality, consistency, traceability, and lifecycle management.
These components represent interconnected architectural responsibilities.
The Knowledge Graph provides the semantic foundation. Reasoning and Rules derive and evaluate knowledge. Triggers identify when relevant conditions are satisfied. Execution translates those conditions into operational behavior. Governance maintains the trustworthiness and evolution of the overall system.
The important transition is from representing what is known to determining what can be inferred and what should happen when specified conditions are met.
This is the foundation of executable intelligence.
8. The Complete Engineering Perspective
The seven SKDL stages and the five EKA components provide two complementary perspectives.
SKDL describes the engineering lifecycle: how semantic knowledge is progressively developed, validated, reasoned over, and prepared for execution.
EKA describes the resulting architectural capabilities: how knowledge, reasoning, triggers, execution, and governance work together.
The relationship can be summarized as follows:
| Engineering focus | Primary objective | EKA contribution |
|---|---|---|
| Conceptual Modeling | Establish knowledge structure | K |
| Semantic Description | Define meaning and relationships | K |
| Semantic Requirements | Define expected knowledge outcomes | K, Γ |
| Reuse and Governance | Establish architectural control | Γ, K |
| Semantic Validation | Verify knowledge quality | Γ, K |
| Semantic Reasoning | Derive implicit knowledge | R |
| Executable Knowledge | Establish conditions for action | R, Θ, Φ |
This progression demonstrates why ontology engineering should not stop at creating a logically consistent OWL file.
A mature semantic system must also address the questions of reuse, validation, reasoning, execution, and governance.
Conclusion: From Modeling Knowledge to Executing Intelligence
Ontology engineering provides a disciplined way to transform domain knowledge into machine-interpretable structures.
Starting with classes and relationships, engineers can progressively introduce semantic restrictions, competency questions, governance practices, validation mechanisms, and automated reasoning.
The final step is to establish the conditions under which semantic knowledge can participate in deterministic operational processes.
The distinction is important:
Validation establishes trust. Reasoning derives intelligence. Executable Knowledge enables deterministic action.
Together, these capabilities create a continuous engineering path from an initial OWL class to a governed, reasoned, and executable semantic system.
Ontology engineering is therefore not simply about building ontologies. It is about engineering knowledge so that machines can understand it, reason over it, and use it responsibly to support real-world decisions and actions.
