Repository navigation
Commit 0f7bdc0
feat(owl2dl): data properties and datatypes in the hypertableau (ALCHIQ(D)) (#7089)
* feat(owl2dl): data properties and datatypes in the hypertableau (#7031)
The (D) of ALCHIQ(D): data properties become roles whose edges end in
concrete nodes (never blocked, never a clause's central node), and data
ranges become atoms over the data-range oracle. Domain, range, sub /
equivalent / disjoint data properties, functionality, the data
restrictions (some, all, has-value, qualified cardinality), positive and
negative data property assertions, facet restrictions, DataOneOf, the
data booleans and acyclic DatatypeDefinitions are decided.
At-most over a data range puts the complement range in the clause head;
DisjointDataProperties gives a value inequality. The datatype check runs
over the components of the inequality graph: per-node emptiness,
peeling of nodes with more values than neighbours, exact backtracking
over enumerated (OneOf) nodes and clique counting for the rest. Any
other shape, or any Unknown from the oracle, closes the branch as
undecided, and a run whose closed branches include an undecided one
answers the new Unknown(DatatypeUnknown { source }) instead of
Inconsistent. Ill-typed literals in assertions, has-value and one-of make
the ontology inconsistent.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKVo4KMh5saxramziiEiBc
* test(owl2dl): HermiT differential corpus for data properties and datatypes
A seeded generator of data property axioms, data restrictions over
integer, decimal, string and boolean ranges (facets, one-of, the data
booleans, a datatype definition) and data assertions whose literals
denote one value in several datatypes and lexical forms, with answers
recorded from HermiT. Every verdict must agree; Unknown answers are
counted and capped. The constructs HermiT departs from the Direct
Semantics on are kept out of the generator and documented there:
ill-typed literals, single-value intervals at zero, data booleans under
data cardinalities, float zeros and NegativeDataPropertyAssertion (used
in its by-value class-assertion form instead); the hand-written tests
cover them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKVo4KMh5saxramziiEiBc
* fix(owl2dl): refuse datatype definitions that may have no model, even unused
A DatatypeDefinition constrains every model whether or not the datatype
is used: a cyclic definition (DT ≡ ¬DT), two different definitions of
one datatype, or a redefined built-in can leave no model, so ignoring an
unused one could report Consistent. Each definition is now expanded up
front and those three cases answer Unknown(OutOfFragment).
Also pins, by hand-written tests, each case the HermiT differential
corpus leaves out because HermiT departs from the Direct Semantics.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKVo4KMh5saxramziiEiBc
* docs(inference): owl2dl reasoner decides ALCHIQ(D)
The owl2dl reasoner paragraph now lists the data properties and data
ranges in the decided fragment, literal identity by value, ill-typed
literals as Inconsistent, the new Unknown(DatatypeUnknown) reason, what
still answers Unknown(OutOfFragment), and the HermiT deviations kept out
of the differential corpus.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKVo4KMh5saxramziiEiBc
* feat(js): checkOwlDl decides data properties; DatatypeUnknown reason
The npm types and docs now describe the ALCHIQ(D) fragment: data properties are
decided, and an undecided datatype question answers DatatypeUnknown with its
triples. maxNodes is bounded to the wasm32 usize range in JS, option values are
read from the property descriptors, and the same-realm requirement is documented.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CKVo4KMh5saxramziiEiBc
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a36171b commit 0f7bdc0
15 files changed
Lines changed: 2961 additions & 143 deletions
File tree
- crates
- sparq-dl-wasm
- src
- sparq-reason-dl
- src/owl2dl
- tests
- data
- js
- src
- test
- site/scripts
- skills
- inference
- javascript-wasm/references
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
160 | 180 | | |
161 | | - | |
| 181 | + | |
162 | 182 | | |
163 | 183 | | |
164 | 184 | | |
165 | 185 | | |
166 | 186 | | |
167 | 187 | | |
168 | 188 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 189 | | |
174 | 190 | | |
175 | 191 | | |
176 | | - | |
177 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
178 | 209 | | |
179 | 210 | | |
180 | 211 | | |
| |||
0 commit comments