Skip to main content

Module reasoning

Module reasoning 

Source
Expand description

Stable RDFS/OWL reasoning and schema-coherence API.

Structs§

Inconsistency
One detected incoherent point (a logical contradiction in the graph).
Reasoning
The result of reasoning over a base graph.

Constants§

REASON_RULESET
Version tag of this reasoner’s rule set. Stamped into a baked coherence card so a coherent: true can never be misread as a guarantee from a different set of rules. Bump this whenever materialize/detect_inconsistencies changes (a rule added/removed/altered), so rete reason --verify-card rejects a stale stamp.

Functions§

eval_query_reasoned
Like eval_query, but with OWL 2 QL entailment on: the lowered plan is rewritten by the internal QL lowering pass so the answer includes ontology-entailed solutions (Stage 1a: rdfs:subClassOf), computed over the raw data with no materialization. Opt-in — a plain eval_query is byte-identical to before.
eval_sparql_reasoned
Like eval_sparql, but with OWL 2 QL entailment on (see eval_query_reasoned).
read_schema_coherence_ranged
Dictionary-free Tier-0 coherence read. Fetch only the header and the pyramid-meta range (2 small range reads) and run schema_coherence over the schema pyramid — never touching the dictionary (which a literal-heavy file makes large) or the triple index. Ok(None) if the file ships no pyramid.
reason
Forward-chain the supported RDFS/OWL rules to a fixpoint, then scan for inconsistencies over the closed graph. inferred excludes triples already present in base_triples.
schema_coherence
Compute T-Box coherence points from the schema-pyramid fields alone — no dictionary, no index, no instance data. Shared by SummaryView::tbox_coherence and the dictionary-free read_schema_coherence_ranged. Emits subclass-cycle and unsatisfiable-class (a class whose ancestor closure — over all parents, folded through owl:equivalentClass — contains both ends of a disjoint pair).
schema_summary
An ontology-aware coarse graph: instead of structural communities, group entities by their rdf:type class and aggregate relations between classes. Returns (subject_class, predicate, object_class, count) over the default graph. Entities with no type are (untyped); literals are (literal). rdf:type triples themselves define the classes and are not counted as relations. This is the dataset’s effective schema with instance volumes.

Type Aliases§

TermTriple
A resolved triple as terms.