Powered by Comunica · runs entirely in your browser · no server required
| Subject | Predicate | Object | Graph | ||||
|---|---|---|---|---|---|---|---|
| Error: {{ row.error }} | |||||||
| Category | Test | Status | Type | Details |
|---|---|---|---|---|
| {{ ex.cat || '—' }} | {{ ex.name }} {{ ex.file }} |
✓ PASS ✗ FAIL ✗ ERR ⏳ | {{ ex.count >= 0 ? ex.count + ' triples' : '' }}{{ ex.ms >= 0 ? (ex.count >= 0 ? ' · ' : '') + ex.ms + ' ms' : '' }} | {{ ex.issue }} |
| Category | Test | Status | Type | Details |
|---|---|---|---|---|
| {{ t.cat }} | {{ t.name }} {{ t.file }} |
✓ PASS ✗ FAIL — SKIP ⏳ | {{ t.rawType }} | {{ t.issue }} |
A SHACL Rules query consists of optional PREFIX declarations, an optional DATA block, and one or more RULE clauses.
PREFIX prefix: <uri>
DATA {
# inline background triples (Turtle syntax)
ex:Alice ex:age 30 .
}
RULE { <head triple pattern> }
WHERE {
# SPARQL graph pattern
}
Rules are applied repeatedly until no new triples are inferred. This means transitive rules work automatically:
RULE { ?a ex:ancestor ?c }
WHERE {
?a ex:parent ?b .
?b ex:ancestor ?c .
}
You can write several RULE blocks in one query. They all share the same store and are iterated together.
RULE { ?p ex:isAdult true }
WHERE { ?p ex:age ?a . FILTER(?a >= 18) }
RULE { ?p ex:isMinor true }
WHERE { ?p ex:age ?a . FILTER(?a < 18) }
The WHERE clause is a full SPARQL 1.2 graph pattern — you can use FILTER, OPTIONAL, BIND, VALUES, sub-queries, etc.
Use the editor. Start with PREFIX declarations, optionally add a DATA block with background triples, then write one or more RULE … WHERE … blocks.
Type Turtle triples directly inside the DATA { } block in the editor, or click 📂 Upload .ttl to load a file — its triples will be inserted into the DATA block automatically.
Click ▶ Run. The engine runs the fixpoint reasoning loop entirely in your browser. Inferred triples appear in the results table.
Each row is one inferred quad. Click any row to see provenance — which rule produced it and what data bindings were used.
{{ provenance.triple.subject }} · {{ provenance.triple.predicate }} · {{ provenance.triple.object }}
{{ res.rule.text }}
| ?{{ col }} |
|---|