FlureeLabs

OWL & RDFS Support Reference

This page lists every OWL and RDFS construct that Fluree's reasoning engine supports. For conceptual background see Reasoning and inference; for query syntax see Query-time reasoning.

Status: Reasoning is an experimental feature. See Standards and feature flags for how to enable it.

Quick orientation

Fluree implements reasoning via two techniques:

  • Query rewriting (RDFS and OWL 2 QL modes) — patterns are expanded at compile time; no facts are materialized.
  • Forward-chaining materialization (OWL 2 RL mode) — derived facts are computed before query execution using the OWL 2 RL rule set.

The tables below indicate which technique handles each construct.


RDFS constructs

These constructs are handled by query rewriting in RDFS mode (and also by materialization in OWL 2 RL mode).

rdfs:subClassOf

Declares that every instance of one class is also an instance of another.

ex:Student  rdfs:subClassOf  ex:Person .

Effect: A query for ?x rdf:type ex:Person also returns instances typed as ex:Student (and any subclass of Student, transitively).

JSON-LD transaction:

{"@id": "ex:Student", "rdfs:subClassOf": {"@id": "ex:Person"}}

rdfs:subPropertyOf

Declares that one property is a specialization of another.

ex:hasMother  rdfs:subPropertyOf  ex:hasParent .

Effect: A query for ?x ex:hasParent ?y also returns triples asserted with ex:hasMother.

JSON-LD transaction:

{"@id": "ex:hasMother", "rdfs:subPropertyOf": {"@id": "ex:hasParent"}}

rdfs:domain

Declares that the subject of a property is an instance of a class.

ex:teaches  rdfs:domain  ex:Professor .

Effect (OWL 2 QL / OWL 2 RL): If ex:alice ex:teaches ex:cs101, then ex:alice rdf:type ex:Professor is inferred.

JSON-LD transaction:

{"@id": "ex:teaches", "rdfs:domain": {"@id": "ex:Professor"}}

rdfs:range

Declares that the object of a property is an instance of a class.

ex:teaches  rdfs:range  ex:Course .

Effect (OWL 2 QL / OWL 2 RL): If ex:alice ex:teaches ex:cs101, then ex:cs101 rdf:type ex:Course is inferred.

JSON-LD transaction:

{"@id": "ex:teaches", "rdfs:range": {"@id": "ex:Course"}}

Note: Range inference applies to IRI-valued objects only. Literal values (strings, numbers, etc.) are not assigned a type via rdfs:range.


OWL property constructs

These are handled by materialization in OWL 2 RL mode (some also by query rewriting in OWL 2 QL mode, as noted).

owl:inverseOf

Declares that two properties are inverses of each other.

ex:hasMother  owl:inverseOf  ex:motherOf .

Effect: If ex:alice ex:hasMother ex:carol, then ex:carol ex:motherOf ex:alice is inferred (and vice versa).

Handled by: OWL 2 QL (query rewriting) and OWL 2 RL (materialization).

OWL 2 RL rule: prp-inv

JSON-LD transaction:

{"@id": "ex:hasMother", "owl:inverseOf": {"@id": "ex:motherOf"}}

owl:SymmetricProperty

Declares that a property holds in both directions.

ex:livesWith  a  owl:SymmetricProperty .

Effect: If ex:alice ex:livesWith ex:bob, then ex:bob ex:livesWith ex:alice is inferred.

OWL 2 RL rule: prp-symp

JSON-LD transaction:

{"@id": "ex:livesWith", "@type": "owl:SymmetricProperty"}

owl:TransitiveProperty

Declares that a property chains through intermediate nodes.

ex:hasAncestor  a  owl:TransitiveProperty .

Effect: If ex:a ex:hasAncestor ex:b and ex:b ex:hasAncestor ex:c, then ex:a ex:hasAncestor ex:c is inferred.

OWL 2 RL rule: prp-trp

JSON-LD transaction:

{"@id": "ex:hasAncestor", "@type": "owl:TransitiveProperty"}

owl:FunctionalProperty

Declares that a property can have at most one value per subject.

ex:hasBirthDate  a  owl:FunctionalProperty .

Effect: If ex:alice ex:hasBirthDate ex:d1 and ex:alice ex:hasBirthDate ex:d2, then ex:d1 owl:sameAs ex:d2 is inferred.

OWL 2 RL rule: prp-fp

JSON-LD transaction:

{"@id": "ex:hasBirthDate", "@type": "owl:FunctionalProperty"}

owl:InverseFunctionalProperty

Declares that a property's object uniquely identifies the subject.

ex:hasSSN  a  owl:InverseFunctionalProperty .

Effect: If ex:alice ex:hasSSN "123" and ex:bob ex:hasSSN "123", then ex:alice owl:sameAs ex:bob is inferred.

OWL 2 RL rule: prp-ifp

JSON-LD transaction:

{"@id": "ex:hasSSN", "@type": "owl:InverseFunctionalProperty"}

owl:equivalentProperty

Declares that two properties have identical extensions.

ex:author  owl:equivalentProperty  ex:writtenBy .

Effect: Treated as mutual rdfs:subPropertyOf — queries and rules see both properties' triples when either is used.

owl:propertyChainAxiom

Declares that a chain of properties implies another property.

ex:hasUncle  owl:propertyChainAxiom  ( ex:hasParent  ex:hasBrother ) .

Effect: If ex:alice ex:hasParent ex:bob and ex:bob ex:hasBrother ex:charlie, then ex:alice ex:hasUncle ex:charlie is inferred.

OWL 2 RL rule: prp-spo2

Chains can be of arbitrary length (2 or more properties) and can include inverse elements:

ex:hasNephew  owl:propertyChainAxiom  (
    [ owl:inverseOf ex:hasBrother ]
    ex:hasChild
) .

JSON-LD transaction:

{
  "@id": "ex:hasUncle",
  "owl:propertyChainAxiom": {
    "@list": [{"@id": "ex:hasParent"}, {"@id": "ex:hasBrother"}]
  }
}

OWL class constructs

owl:equivalentClass

Declares that two classes have identical extensions.

ex:Pupil  owl:equivalentClass  ex:Student .

Effect: Instances of either class are inferred to be instances of both.

OWL 2 RL rule: cax-eqc

owl:hasKey

Declares a set of properties that uniquely identify instances of a class.

ex:Person  owl:hasKey  ( ex:hasSSN ) .

Effect: If two ex:Person instances share the same ex:hasSSN value, they are inferred to be owl:sameAs.

OWL 2 RL rule: prp-key


OWL restrictions (class expressions)

OWL restrictions define classes based on property constraints. They are used with OWL 2 RL materialization.

owl:hasValue

Defines a class of all subjects that have a specific value for a property.

ex:RedThings  a  owl:Restriction ;
    owl:onProperty  ex:color ;
    owl:hasValue     ex:Red .

Effect (forward — cls-hv1): If ?x rdf:type ex:RedThings, then ?x ex:color ex:Red is inferred.

Effect (backward — cls-hv2): If ?x ex:color ex:Red, then ?x rdf:type ex:RedThings is inferred.

Limitation: Currently supports IRI-valued hasValue only. Literal values (strings, numbers) are not yet supported.

owl:someValuesFrom

Defines a class of subjects that have at least one value of a given type for a property.

ex:Parent  a  owl:Restriction ;
    owl:onProperty      ex:hasChild ;
    owl:someValuesFrom  ex:Person .

Effect (cls-svf1): If ?x ex:hasChild ?y and ?y rdf:type ex:Person, then ?x rdf:type ex:Parent is inferred.

owl:allValuesFrom

Defines a class where all values of a property belong to a given type.

ex:VeganRestaurant  a  owl:Restriction ;
    owl:onProperty     ex:servesFood ;
    owl:allValuesFrom  ex:VeganDish .

Effect (cls-avf): If ?x rdf:type ex:VeganRestaurant and ?x ex:servesFood ?y, then ?y rdf:type ex:VeganDish is inferred.

owl:maxCardinality (= 1)

When a restriction specifies maxCardinality of 1, it acts like a context-specific functional property.

ex:SingleChild  a  owl:Restriction ;
    owl:onProperty      ex:hasChild ;
    owl:maxCardinality  1 .

Effect (cls-maxc2): If ?x rdf:type ex:SingleChild, ?x ex:hasChild ?y1, and ?x ex:hasChild ?y2, then ?y1 owl:sameAs ?y2 is inferred.

owl:maxQualifiedCardinality (= 1)

Like maxCardinality but restricted to objects of a specific class.

ex:MonogamousPerson  a  owl:Restriction ;
    owl:onProperty                  ex:marriedTo ;
    owl:maxQualifiedCardinality     1 ;
    owl:onClass                     ex:Person .

Effect (cls-maxqc3/4): If ?x is typed as this restriction class, has two ex:marriedTo values, and both are ex:Person, they are inferred to be owl:sameAs.


OWL class operations

owl:intersectionOf

Defines a class as the intersection of member classes.

ex:WorkingStudent  owl:intersectionOf  ( ex:Student  ex:Employee ) .

Effect (forward — cls-int1): If ?x rdf:type ex:Student and ?x rdf:type ex:Employee, then ?x rdf:type ex:WorkingStudent is inferred.

Effect (backward — cls-int2): If ?x rdf:type ex:WorkingStudent, then both ?x rdf:type ex:Student and ?x rdf:type ex:Employee are inferred.

owl:unionOf

Defines a class as the union of member classes.

ex:PersonOrOrg  owl:unionOf  ( ex:Person  ex:Organization ) .

Effect (cls-uni): If ?x rdf:type ex:Person (or ex:Organization), then ?x rdf:type ex:PersonOrOrg is inferred.

owl:oneOf

Defines an enumerated class — a fixed set of individuals.

ex:PrimaryColor  owl:oneOf  ( ex:Red  ex:Blue  ex:Yellow ) .

Effect (cls-oo): ex:Red, ex:Blue, and ex:Yellow are each inferred to be of type ex:PrimaryColor.


owl:sameAs

owl:sameAs declares that two IRIs refer to the same real-world entity.

ex:alice  owl:sameAs  ex:aliceSmith .

Effect: All facts about ex:alice and ex:aliceSmith are merged. Queries for either IRI return the combined set of properties.

How sameAs is produced

owl:sameAs can be asserted explicitly or inferred by these rules:

RuleTrigger
prp-fpFunctional property with multiple objects
prp-ifpInverse functional property with multiple subjects
prp-keyowl:hasKey match across instances
cls-maxc2maxCardinality = 1 violation
cls-maxqc3/4maxQualifiedCardinality = 1 violation

Equivalence properties

owl:sameAs is handled as an equivalence relation:

  • Symmetric: if a sameAs b then b sameAs a
  • Transitive: if a sameAs b and b sameAs c then a sameAs c
  • Reflexive: every resource is same-as itself (implicit)

The engine uses a union-find data structure to efficiently track equivalence classes and select a canonical representative for each.


OWL 2 RL rule index

For reference, the complete set of OWL 2 RL rules implemented by Fluree:

Identity-producing rules (Phase B)

These rules produce owl:sameAs facts and run before other rules to ensure proper canonicalization.

RuleConstructDescription
prp-fpowl:FunctionalPropertySame subject + different objects → sameAs
prp-ifpowl:InverseFunctionalPropertySame object + different subjects → sameAs
prp-keyowl:hasKeySame class + matching key values → sameAs
cls-maxc2owl:maxCardinality = 1Over-cardinality → sameAs
cls-maxqc3owl:maxQualifiedCardinality = 1Qualified over-cardinality → sameAs
cls-maxqc4owl:maxQualifiedCardinality = 1Variant for owl:Thing

Non-identity rules (Phase C)

RuleConstructDescription
prp-sympowl:SymmetricPropertyP(x,y) → P(y,x)
prp-trpowl:TransitivePropertyP(x,y) ∧ P(y,z) → P(x,z)
prp-invowl:inverseOfP(x,y) → Q(y,x)
prp-domrdfs:domainP(x,y) → type(x,C)
prp-rngrdfs:rangeP(x,y) → type(y,C)
prp-spo1rdfs:subPropertyOfP1(x,y) → P2(x,y)
prp-spo2owl:propertyChainAxiomChain match → P(first,last)
cax-scordfs:subClassOftype(x,C1) → type(x,C2)
cax-eqcowl:equivalentClasstype(x,C1) ↔ type(x,C2)
cls-hv1owl:hasValue (backward)type(x,C) → P(x,v)
cls-hv2owl:hasValue (forward)P(x,v) → type(x,C)
cls-svf1owl:someValuesFromP(x,y) ∧ type(y,D) → type(x,C)
cls-avfowl:allValuesFromtype(x,C) ∧ P(x,y) → type(y,D)
cls-int1owl:intersectionOf (forward)All member types → intersection type
cls-int2owl:intersectionOf (backward)Intersection type → all member types
cls-uniowl:unionOfAny member type → union type
cls-ooowl:oneOfListed individual → enumerated type

Known limitations

AreaLimitation
Literal hasValueowl:hasValue with literal values (strings, numbers) is not yet supported; only IRI-valued restrictions work.
Negationowl:complementOf and negation-as-failure are not supported. OWL 2 RL is a positive-only fragment.
Disjointnessowl:disjointWith and owl:AllDisjointClasses do not trigger inconsistency detection.
Cardinality > 1Only maxCardinality = 1 and maxQualifiedCardinality = 1 are implemented (these are the only identity-producing cardinalities in OWL 2 RL).
Datatype reasoningNo inference over datatypes (e.g., xsd:integer subtype of xsd:decimal).

Namespaces

For reference, the standard namespace prefixes:

PrefixURI
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfshttp://www.w3.org/2000/01/rdf-schema#
owlhttp://www.w3.org/2002/07/owl#
xsdhttp://www.w3.org/2001/XMLSchema#