Skip to content

Modeling Inference

New to Folio? Start here

Inference

Inference draws conclusions: statements that follow from what you wrote without being written. Folio applies each rule under Standard inference and Folio inference across every file in the workspace, and each family there shows one kind of conclusion with an example. Not inferred lists the conclusions Folio does not draw. A query and Problems use every conclusion; Seeing inferred values covers forms and graph views.

Standard inference

RDFS and OWL define these rules.

Subclasses (rdfs9)

An instance of a class is concluded to be an instance of its superclasses by rdfs:subClassOf.

Graph View of the subclasses file. Solar installation, a Class with its comment, links by subClassOf to Power plant, a Class with its comment. dry-lake-solar carries a Solar installation badge and no properties.
Solar installation is a subclass of Power plant, and dry-lake-solar is written as a solar installation.

Folio concludes:

Turtle
@prefix fleet: <https://example.org/my-semantic-package/fleet#> .
@prefix plants: <https://example.org/my-semantic-package/plants#> .

fleet:dry-lake-solar a plants:PowerPlant .

Subproperties (rdfs7)

A statement made with a property is concluded to hold for its superproperties by rdfs:subPropertyOf.

Graph View of the subproperties file. Exclusive territory, a Property with its comment, links by subPropertyOf to Licensed territory, a Property with its comment. long-harvest-streaming links by exclusiveTerritory to canada, a card from the films namespace with no properties.
Exclusive territory is a subproperty of Licensed territory, and long-harvest-streaming holds canada as an exclusive territory.

Folio concludes:

Turtle
@prefix films: <https://example.org/my-semantic-package/films#> .

films:long-harvest-streaming films:licensedTerritory films:canada .

Datatypes (rdfs1/rdfs13)

Every XSD datatype Folio recognizes is concluded to be a subclass of rdfs:Literal.

Graph View of the datatypes file. capacity (MW) is a Property with its comment. riverbend-station lists capacity (MW) as 1100.
riverbend-station records its capacity, 1100, as a decimal.

Folio concludes:

Turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

xsd:decimal rdfs:subClassOf rdfs:Literal .

Domain and range (rdfs2/rdfs3)

The subject of a property is concluded to be an instance of the property's rdfs:domain, and its value an instance of the property's rdfs:range.

Graph View of the domain-and-range file. desert-ridge's card lists helios-energy under operator. operator, a Property with its comment, lists Power plant as its domain and Company as its range.
The file links the plant, desert-ridge, to its operator, helios-energy.

Folio concludes:

Turtle
@prefix fleet: <https://example.org/my-semantic-package/fleet#> .
@prefix plants: <https://example.org/my-semantic-package/plants#> .

fleet:desert-ridge a plants:PowerPlant .
fleet:helios-energy a plants:Company .

Equivalent classes (scm-eqc1)

An instance of either class in an owl:equivalentClass statement is concluded to be an instance of the other.

Graph View of the equivalent-classes file. Film, a Class with its comment, links by equivalentClass to Movie, the schema.org class, marked derived because no file defines it. the-long-harvest carries a Movie badge and no properties.
Film is equivalent to schema.org's Movie, and the-long-harvest is written as a Movie.

Folio concludes:

Turtle
@prefix films: <https://example.org/my-semantic-package/films#> .

films:the-long-harvest a films:Film .

Equivalent properties (scm-eqp1)

A statement made with either property in an owl:equivalentProperty statement is concluded to hold for the other.

Graph View of the equivalent-properties file. Directed by, a Property with its comment, links by equivalentProperty to director, the schema.org property, marked derived because no file defines it. the-long-harvest links by director to anna-voss, a card from the films namespace.
Directed by is equivalent to schema.org's director, and the-long-harvest names anna-voss with schema.org's property.

Folio concludes:

Turtle
@prefix films: <https://example.org/my-semantic-package/films#> .

films:the-long-harvest films:directedBy films:anna-voss .

Inverse properties (prp-inv)

A statement made with one property in an owl:inverseOf statement is concluded, with subject and value swapped, for the other.

Graph View of the inverse-properties file. subsidiary of, a Property with its comment, links by inverseOf to parent company of, a Property with its comment. helios-energy links by subsidiaryOf to helios-holdings, marked derived because no file defines it.
subsidiary of is the inverse of parent company of, and helios-energy is written as a subsidiary of helios-holdings.

Folio concludes:

Turtle
@prefix fleet: <https://example.org/my-semantic-package/fleet#> .
@prefix plants: <https://example.org/my-semantic-package/plants#> .

fleet:helios-holdings plants:parentCompanyOf fleet:helios-energy .

Folio inference

Folio draws these conclusions from SHACL shapes and Semvia's dataset vocabulary; no standard defines them as inference.

Inherited properties

A class is concluded to inherit every sh:property block of its superclasses by rdfs:subClassOf, of the shapes it reaches by sh:node, and of the shapes that name it in sh:targetClass.

Graph View of the inherited-properties file. Nuclear plant, a Class Schema with its comment, links by subClassOf to Power plant, a Class Schema with its comment. Both list capacity (MW), a decimal, under Instance properties: Power plant declares it and Nuclear plant inherits it.
Nuclear plant is a subclass of Power plant and lists the capacity (MW) property it inherits.

Folio concludes:

Turtle
@prefix plants: <https://example.org/my-semantic-package/plants#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

plants:NuclearPlant sh:property plants:PowerPlant.capacity .

Dataset membership

A dataset with an svds:memberSpace is concluded to have, by dct:hasPart, every document it holds. A document is held by the nearest dataset whose space its IRI starts with: the longest space wins, and two datasets claiming the same space both hold it. A dataset nested inside another holds its own files, and the outer dataset reaches them only through a join written in a dataset file: dct:hasPart in the outer dataset or dct:isPartOf in the nested one. A concluded dct:hasPart doesn't join them. licenses/index.ttl claims its folder:

licenses/index.ttl
Graph View of licenses/index.ttl. Licenses, a Dataset that conforms to Dataset and Package, links by memberSpace to the licenses folder.
The Licenses dataset claims the licenses folder as its member space.

With licenses/canada.ttl in the same folder, Folio concludes:

Turtle
@prefix dct: <http://purl.org/dc/terms/> .

<> dct:hasPart <./canada> .

Default values

A resource with no value for a property is concluded to have the sh:defaultValue its class's sh:property block declares.

Graph View of the default-values file. Streaming license, a Class Schema with its comment, lists Exclusive, a boolean, under Instance properties. long-harvest-canada carries a Streaming license badge and no properties.
Streaming license declares the Exclusive property, and long-harvest-canada says nothing about exclusivity.

Folio concludes:

Turtle
@prefix films: <https://example.org/my-semantic-package/films#> .

films:long-harvest-canada films:exclusive false .

Not inferred

Folio does not draw these conclusions or flag these contradictions. A file can still state any conclusion below, and a query matches what the file states.

Transitive properties
A chain of two statements made with an owl:TransitiveProperty is not concluded to give a third (prp-trp). With plants:subsidiaryOf transitive, fleet:helios-energy plants:subsidiaryOf fleet:helios-holdings and fleet:helios-holdings plants:subsidiaryOf fleet:helios-group do not conclude fleet:helios-energy plants:subsidiaryOf fleet:helios-group. In a SPARQL query, the property path plants:subsidiaryOf+ follows the chain.
SKOS transitive hierarchy
SKOS defines skos:broaderTransitive as a transitive superproperty of skos:broader, and skos:narrowerTransitive of skos:narrower. The SKOS vocabulary Folio loads does not state those links, so subproperties concludes neither from skos:broader or skos:narrower statements. A file that states a link gets the one step it licenses, never the chain. Without one, ?concept skos:broaderTransitive ex:electronics matches only the statements a file writes; ?concept skos:broader+ ex:electronics follows the chain, as in Taxonomies.
Same individuals
Two IRIs joined by owl:sameAs are not concluded to share their statements (eq-rep-s, eq-rep-p, eq-rep-o). With fleet:helios-energy owl:sameAs crm:account4471, fleet:desert-ridge plants:operator fleet:helios-energy does not conclude fleet:desert-ridge plants:operator crm:account4471. Nor is owl:sameAs concluded from an owl:FunctionalProperty (prp-fp) or an owl:InverseFunctionalProperty (prp-ifp).
Symmetric properties
A statement made with an owl:SymmetricProperty is not concluded in the other direction (prp-symp). With plants:jointVenturePartner symmetric, fleet:helios-energy plants:jointVenturePartner fleet:cascade-power does not conclude fleet:cascade-power plants:jointVenturePartner fleet:helios-energy. In a query, the property path plants:jointVenturePartner|^plants:jointVenturePartner matches both directions.
Property chains
A property declared by an owl:propertyChainAxiom is not concluded from the chain it names (prp-spo2). With films:distributedBy the chain of films:hasLicense then films:licensee, a film's licensee is not concluded as its distributor. In a query, the property path films:hasLicense/films:licensee follows the chain.
Restrictions and cardinality
An owl:Restriction concludes nothing: no type or value from owl:someValuesFrom or owl:hasValue (cls-svf1, cls-hv1, cls-hv2), no value type from owl:allValuesFrom (cls-avf), and no owl:sameAs from owl:maxCardinality or owl:maxQualifiedCardinality (cls-maxc2, cls-maxqc3). A restriction on plants:operator with owl:allValuesFrom plants:Company does not conclude that a plant's operator is a company. An rdfs:range concludes that type. As validation, not inference, a SHACL sh:class checks a value's type, and sh:minCount or sh:maxCount checks how many values a property has.
Class expressions
An entity in every class an owl:intersectionOf combines is not concluded to be in the intersection, and a member of the intersection is not concluded to be in each class (cls-int1, cls-int2). A member of one class an owl:unionOf combines is not concluded to be in the union (cls-uni). An individual an owl:oneOf lists is not concluded to be a member (cls-oo). Nor is an intersection concluded to be a subclass of each class it combines, or each class of a union a subclass of the union (scm-int, scm-uni). With plants:RegulatedOperator the intersection of plants:Company and plants:LicensedOperator, an entity typed as both is not concluded to be a plants:RegulatedOperator, and plants:RegulatedOperator rdfs:subClassOf plants:Company is not concluded.
Disjoint classes
A resource typed in two classes declared disjoint by owl:disjointWith or owl:AllDisjointClasses, or in a class and its owl:complementOf, is not flagged as a contradiction (cax-dw, cax-adc, cls-com). With plants:SolarInstallation owl:disjointWith plants:NuclearPlant, a site typed as both is not flagged. A SHACL sh:not shape checks it as validation, not inference.
The rdfs:Resource type
A resource is not concluded to be an rdfs:Resource (rdfs4a, rdfs4b), and a class is not concluded to be a subclass of rdfs:Resource (rdfs8). fleet:riverbend-station a rdfs:Resource is not concluded.

Seeing inferred values

A SPARQL query and Problems use every conclusion Folio draws, with nothing turned on.

Forms and graph views show only the values your files state until Show inferred values is on. It is under Editor in Folio's settings, off by default, and takes effect when the next form or graph view opens.

The one exception is the properties a class inherits. Class cards list them while the Inherited properties toggle in a graph view's Display flyout is on, as it is by default, independent of Show inferred values.

The Inferred values toggle in the same flyout overrides Show inferred values for that panel only.

An inferred value is marked. On the graph canvas its edge is dotted. In a form or card its row is muted, with a lock whose hover reads "This value isn't written in any document you can edit here, so there's nothing to change."

The domain-and-range file with the panel's Inferred values toggle on. No line states desert-ridge's type; the rdfs:domain of operator licenses its Power plant badge.

From an agent

A connected agent asks Folio about inference over MCP. describe_inference lists every rule Folio knows and whether Folio runs it. explain_inference shows, for one SPARQL query, which rules fired on each pattern and which were skipped.