Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## [1.7.7] — 2026-10-16

### Reasoning

- **rdf-reasoner-konclude 0.8.0.** The reasoner digests the store content on every call, rebuilds only when it changed, recycles its own Worker when the WASM heap grows, and recovers from stalled kernels. It also fixes lossy realization, a cardinality crash and an `owl:AsymmetricProperty` self-loop gap.
- **One reasoner across runs.** The per-run terminate/recreate workaround is gone; an unchanged graph costs no rebuild. The entailment-explanation cache is keyed on the reasoning input, so edits invalidate it.
- **Stop button** terminates in-flight reasoning (play button becomes a stop button in the top bar and reasoning indicator).
- Benchmarks rerun on 0.8.0 (headless Chromium, median of 3): reasoning-demo 1.1 s, Pizza 1.4 s, PMDCO 2.6 s, GALEN 3.4 s, LUBM-1 65.6 s. On one page with PMDCO loaded, a run after a one-individual edit takes about 0.3 s once the first run has started the reasoner (2.3 s), and an unchanged graph about 0.5 s.

### Bug fixes

- **Unload / graph removal** now drop `urn:vg:inferred`: inferences no longer outlive the axioms they came from.
- **Canvas**: unloading an ontology no longer re-adds its subjects as canvas elements (the P boxes with "No annotation properties").
- **SPARQL**: bare `UPDATE` patterns are scoped to `urn:vg:data`, and a delete always refreshes the canvas.
- **Relay**: no `isProcessing` deadlock or lost batch calls on timeout; hard maximum call deadline with duplicate-call visibility; no duplicate-call toast for chat history entries; `notifiedDupSigs` seeded correctly from page history; JSON extraction restarts after a malformed `{` instead of aborting.

### Breaking changes

None.

## [1.7.6] — 2026-09-24

### New features
Expand Down
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ The annotated diagram below identifies the numbered UI elements described in thi

**11** **SHACL toggle** (☑) — enable or disable SHACL validation as part of the reasoning pipeline. When checked, running reasoning also validates data against loaded SHACL shapes.

**12** **Run reasoning** (▶) — triggers DL reasoning (Konclude) and optionally SHACL validation. Inferred triples appear as amber dashed edges. Idempotent.
**12** **Run reasoning** (▶) — triggers DL reasoning (Konclude) and optionally SHACL validation. Inferred triples appear as amber dashed edges. Idempotent. While reasoning runs the button turns into a stop button (■) that terminates the run; the graph is unaffected and the next run starts a fresh reasoner.

### Left sidebar (collapsed icon rail)

Expand Down Expand Up @@ -272,13 +272,13 @@ Hover over any node to reveal the authoring halo with these controls:
Reasoning
---------

Ontosphere runs OWL reasoning entirely in the browser via a pluggable backend. The default is **Konclude** (full OWL 2 DL). Inferred triples appear as amber dashed edges; inferred types and annotations appear in amber italic. A reasoning report lists all inferred triples. Reasoning is idempotent — running it again produces no additional triples. Use **Clear inferred** to remove all inferred triples without affecting asserted data. See the [feat-reasoning demo video](https://thhanke.github.io/ontosphere/demo-videos/feat-reasoning.mp4) for a walkthrough of all 15 supported OWL 2 DL construct patterns.
Ontosphere runs OWL reasoning entirely in the browser via a pluggable backend. The default is **Konclude** (full OWL 2 DL). Inferred triples appear as amber dashed edges; inferred types and annotations appear in amber italic. A reasoning report lists all inferred triples. Reasoning is idempotent — running it again produces no additional triples. Use **Clear inferred** to remove all inferred triples without affecting asserted data. Inferred triples are also dropped automatically when an ontology is unloaded or a graph is removed, since they were derived from axioms that are gone. See the [feat-reasoning demo video](https://thhanke.github.io/ontosphere/demo-videos/feat-reasoning.mp4) for a walkthrough of all 15 supported OWL 2 DL construct patterns.

**OWL DL consistency checking** runs automatically alongside inference (Konclude only). If the ontology is logically contradictory, reasoning is skipped and the report's **Errors** tab shows per-entity clash details (affected individual, violated axiom, description). An "OWL DL inconsistency detected" banner appears in the report. Common inconsistencies: an individual in two `owl:disjointWith` classes, an `owl:allValuesFrom` restriction violated by an asserted type, or an `owl:AsymmetricProperty` / `owl:IrreflexiveProperty` cycle. The N3 backend does not perform consistency checking (`isConsistent` is always `null`).

### Konclude (default — OWL 2 DL)

[Konclude](https://www.derivo.de/products/konclude/) is a complete tableau reasoner for the description logic **SROIQ(D)** (OWL 2 DL), compiled to WebAssembly. It runs classification over the loaded ontology and writes `rdfs:subClassOf` and `owl:equivalentClass` inferences.
[Konclude](https://www.derivo.de/products/konclude/) is a complete tableau reasoner for the description logic **SROIQ(D)** (OWL 2 DL), compiled to WebAssembly. It runs classification and ABox realization over the loaded ontology and writes `rdfs:subClassOf`, `owl:equivalentClass`, `rdf:type` and object-property (role) inferences. One reasoner instance serves all runs: it hashes the store content on every call and rebuilds only when the content changed, so re-running on an unchanged graph is cheap.

**Supported OWL constructs (complete):** `rdfs:subClassOf`, `owl:equivalentClass`, `owl:someValuesFrom`, `owl:allValuesFrom`, `owl:hasValue`, `owl:inverseOf`, `owl:SymmetricProperty`, `owl:TransitiveProperty`, `owl:subPropertyOf`, `rdfs:domain`/`rdfs:range`, `owl:intersectionOf`, `owl:unionOf`, `owl:oneOf`, `owl:propertyChainAxiom`, number restrictions, nominals, and more.

Expand Down Expand Up @@ -637,7 +637,7 @@ Developer

**Deployment requirement:** Konclude's WASM binary uses `SharedArrayBuffer` (pthreads). The server must send `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: credentialless` headers. Localhost deployments have `SharedArrayBuffer` available without headers. Ontosphere's `server.js` sets these headers automatically.

**Performance:** Konclude: 250 ms – 2.5 s for typical benchmark ontologies (LUBM, GALEN, Pizza). N3: under 2 seconds for typical ontologies (hundreds to a few thousand triples).
**Performance:** Konclude, end to end in headless Chromium (load + consistency check + materialization, median of 3): reasoning-demo 1.1 s, Pizza 1.4 s, PMDCO 2.6 s, GALEN 3.4 s, LUBM-1 with data about 66 s. Small ontologies are dominated by reasoner start-up (about 1 s). See [Konclude WASM reasoning performance](#konclude-wasm-reasoning-performance) for reasoner-only numbers. N3: under 2 seconds for typical ontologies (hundreds to a few thousand triples).

### Other startup mechanisms

Expand Down Expand Up @@ -958,16 +958,19 @@ node scripts/bench-ontoauthor-mat.mjs 2>&1 | tee logs/bench-ontoauthor-mat.log
Benchmark data from [rdf-reasoner-konclude](https://github.com/ThHanke/rdf-reasoner-konclude)
comparing native Konclude (Docker) vs the Emscripten WASM port used in Ontosphere.

| Ontology | Expressivity | Triples | Native | WASM | Ratio | Inferred |
|----------|:------------:|--------:|-------:|-----:|------:|---------:|
| LUBM schema | SHI | 307 | 32 ms | 272 ms | ~8.5× | 44 |
| GALEN | SHIF | 30 817 | 228 ms | 656 ms | ~2.9× | 3 287 |
| Roberts family | SROIQ | 3 866 | 2 213 ms | 30 124 ms | ~13.6× | 269 829 |
| LUBM + data | SHI | 100 850 | 164 ms | 1 424 ms | ~8.7× | 138 522 |

Native = Konclude v0.7.0, Docker, 8 threads. WASM = Emscripten pthreads, Node.js, median of 3 runs.
Ratio = WASM classify / native classify. For typical interactive ontologies (< 10 000 triples),
Konclude WASM completes classification in 250 ms – 2.5 s.
| Ontology | Expressivity | Triples | Native Konclude | WASM (ingest→result) | WASM / native |
|----------|:------------:|--------:|----------------:|---------------------:|--------------:|
| LUBM schema | SHI | 307 | 67 ms | 297 ms | ~4.4× |
| GALEN | SHIF | 30 817 | 322 ms | 1 594 ms | ~5.0× |
| Roberts family ¹ | SROIQ | 3 866 | 40 038 ms | 27 471 ms | ~0.7× |
| LUBM + data | SHI | 100 850 | 1 237 ms | 3 550 ms | ~2.9× |

Package rdf-reasoner-konclude 0.8.0, native = Konclude v0.7.0-1138 in Docker (8 threads), WASM = Emscripten
pthreads under Node.js, medians of 3–5 runs, single shared host (see the package's
[benchmark](https://github.com/ThHanke/rdf-reasoner-konclude/blob/main/docs/benchmark.md) for spreads).
Ratio = WASM / native Konclude. ¹ Full role-closure realization; the native figure is Konclude with
`RealizePrecomputation.RoleInstances=true`, the like-for-like configuration (WASM always computes the
role closure). The WASM figures exclude the one-off module start (about 0.9 s).

### Module-extraction benchmark

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Konclude 0.8.0 upgrade — reuse one reasoner; inferred graph and canvas must follow unloads
date: 2026-10-16
category: docs/solutions/logic-errors/
module: rdfManager.runtime, ReactodiaCanvas
problem_type: logic_error
component: tooling
symptoms:
- After unloading an ontology (pmdco) the canvas suddenly showed thousands of its entities as boxes ("No annotation properties")
root_cause: logic_error
resolution_type: code_fix
severity: medium
tags: [konclude, rdf-reasoner-konclude, inferred-graph, unload, canvas, cache, 0.8.0]
---

# Konclude 0.8.0 upgrade — reuse one reasoner; inferred graph and canvas must follow unloads

## Problem
Upgrading `rdf-reasoner-konclude` 0.7.2 -> 0.8.0 made two app-side workarounds obsolete, and removing the reasoner reset exposed that unloads never cleared `urn:vg:inferred`. Separately, unloading an ontology resurrected its subjects on the canvas.

## Symptoms
- After unload, the canvas filled with the unloaded ontology's entities.

## What Didn't Work
- Clearing the inferred graph in the worker alone did not fix the canvas: the unload emission lists the removed subjects, and the canvas treated every subject not on it as new.

## Solution
- 0.8.0 digests store content per call and rebuilds only on change (recycles its own Worker at 2 GiB heap). Dropped `resetDlReasoner()` per run and on graph removal; one `DlReasoner` now serves all runs. Kept it only for the explicit stop button.
- `_entailmentCache` was cleared only by that reset; it is now keyed on `reasoningInputGeneration`.
- `unloadOntologySubjects` and `syncRemoveGraph` (non-axiom graphs excluded) call `dropInferredGraph()`: inferences outlive their axioms, so they are deleted and their subjects refreshed.
- `ReactodiaCanvas` on `unloadOntologySubjects`: remove subjects from provider, `knownSubjects` and canvas; filter them out of the emission; never create elements.
- Kept: `reasoningBase()` skolemization round trip and `NON_AXIOM_GRAPHS` (the package does not know them).

## Why This Works
The package now owns reasoner-state validity; the app owns the derived data it stores (inferred graph, explanation cache) and must invalidate it when its inputs change.

## Prevention
- Any new path that removes axioms must drop `urn:vg:inferred` (tests: `unloadDropsInference.test.ts`).
- Emissions that list removed subjects must be treated like `removeGraph` by the canvas.
- Worker changes need a hard reload of the dev server.

## Related Issues
- [konclude-v030-abox-realization-gaps-2026-06-10.md](konclude-v030-abox-realization-gaps-2026-06-10.md)
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ontosphere",
"description": "Browser-based interactive RDF/ontology knowledge graph editor — authoring, OWL 2 DL reasoning (Konclude), clustering, multi-algorithm layout, and MCP support. Runs entirely client-side.",
"version": "1.7.6",
"version": "1.7.7",
"license": "Apache-2.0",
"author": "Thomas Hanke <thomas.hnke82@gmail.com> (https://github.com/ThHanke)",
"homepage": "https://thhanke.github.io/ontosphere/",
Expand Down Expand Up @@ -120,7 +120,7 @@
"ngraph.slpa": "0.1.0",
"rdf-canonize": "^5.0.0",
"rdf-parse": "4.0.0",
"rdf-reasoner-konclude": "^0.7.2",
"rdf-reasoner-konclude": "^0.8.0",
"react": "19.2.0",
"react-day-picker": "9.11.1",
"react-dom": "19.2.0",
Expand Down
Loading
Loading