gUFO usage examples

Seven small, realistic ontologies, each a tutorial on one part of gUFO's foundations

What this is

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.

The examples

1. Endurant types

People & Organizations

Kind, SubKind, Phase, Role, Category, RoleMixin, PhaseMixin -- and a common pitfall the SHACL shapes catch that OWL alone does not.

2. Objects and their parts

Car fleet

FunctionalComplex, Collection, Quantity, and their three distinct part-whole properties.

3. Qualities and quality values

Retail products

The basic, enumerated and multidimensional patterns for giving a reified quality a value.

4. Relators and extrinsic aspects

Employment & marriage

Reifying a relationship, decomposing it into reciprocal rights and duties, and deriving a shortcut property from it.

5. Events

Football tournament

Participation, historical dependence, event parthood, creation, termination, and aspect manifestation.

6. Situations

Patient health record

All five gufo:Situation subclasses, used to track change in quality values, phases, parts, constitution and relationships over time.

7. Higher-order types

Wildlife classification

The powertype pattern (gufo:partitions), and a pitfall the SHACL shapes catch that OWL alone does not.

Suggested order

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.

How this is tested

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:

CheckToolCatches
OWL 2 DL reasoning (consistency + classification)Pellet, via owlready2Logical contradictions -- e.g. an individual forced into two disjoint classes.
SHACL validationpySHACL against gufoshapesTaxonomic 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

See also