Seven small, realistic ontologies, each a tutorial on one part of gUFO's foundations
Each example below is a self-contained OWL ontology (ontology.ttl) that reuses
gUFO the way a real domain ontology would -- by specializing and instantiating its
classes and properties -- paired with a tutorial page that walks through the design decisions step by step.
Together, the seven cover the ground mapped out in the
gUFO usage guide: the taxonomy of endurant types, objects and
their parts, qualities, relators, events, situations, and higher-order types. Every ontology is checked with
an OWL 2 DL reasoner and with the gUFO SHACL shapes --
see how this is tested below.
People & Organizations
Kind, SubKind, Phase, Role, Category, RoleMixin, PhaseMixin -- and a common pitfall the SHACL shapes catch that OWL alone does not.
Car fleet
FunctionalComplex, Collection, Quantity, and their three distinct part-whole properties.
Retail products
The basic, enumerated and multidimensional patterns for giving a reified quality a value.
Employment & marriage
Reifying a relationship, decomposing it into reciprocal rights and duties, and deriving a shortcut property from it.
Football tournament
Participation, historical dependence, event parthood, creation, termination, and aspect manifestation.
Patient health record
All five gufo:Situation subclasses, used to track change in quality values, phases, parts, constitution and relationships over time.
Wildlife classification
The powertype pattern (gufo:partitions), and a pitfall the SHACL shapes catch that OWL alone does not.
The examples are numbered in a reasonable reading order -- endurant types and objects first, since later examples assume familiarity with roles and kinds; situations near the end, since they build on qualities, parthood and events introduced earlier -- but each is self-contained and can be read on its own. Every example uses its own namespace and fictional names, so nothing but the reading order links them.
Every ontology.ttl (and, for examples 1 and 7, the accompanying
invalid-example.ttl, which intentionally misuses gUFO for pedagogical contrast) is checked two
ways:
| Check | Tool | Catches |
|---|---|---|
| OWL 2 DL reasoning (consistency + classification) | Pellet, via owlready2 | Logical contradictions -- e.g. an individual forced into two disjoint classes. |
| SHACL validation | pySHACL against gufoshapes | Taxonomic mistakes in gUFO's typing pattern (rigid types specializing anti-rigid ones, sortals without an identity provider, powertype pattern violations) that OWL 2 punning hides from a DL reasoner. |
Examples 1 and 7 make that second row concrete: each ships an invalid-example.ttl that stays
perfectly OWL-consistent while still tripping a SHACL shape, which is precisely the gap gufoshapes exists to
close.
See tests/README.md for how to run the suite (from a clone of the repository -- the test harness itself is not part of this published copy):
cd examples/tests
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/pytest -v