Dear Scott,
Thanks for your kind answer. But, maybe my question was not clear.
So, I tried to clarify my question again with more detail.
Please read following A, B, C, and D what I did.
A. add a spin:rule and some instances (from spinsquare.owl example)
- delete already existing two instances of Rectangle class
- add an objectProperty isBiggerthan
- add spin:rule in the Rectangle class like below.
CONSTRUCT {
?this :isBiggerThan ?other .
}
WHERE {
?this :area ?area1 .
?other :area ?area2 .
FILTER (?area1 > ?area2) .
}
- then add three instances of Rectangle class and their properties
(assertions)
. r1 (height 1, width 1)
. r2 (height 2, width 2)
. r3 (height 3, width 3)
- then turn on incremental inferencing and run Inferences
- get six inferred triples
. r1 area 1
. r2 area 4
. r3 area 9
. r2 isBiggerThan r1
. r3 isBiggerThan r1
. r3 isBiggerThan r2
B. Modify assertions
- change r1's height and width
. r1 (height: 4, width 4)
- run Inferences again and get eight inferred triples
. r1 area 16 (updated, true)
. r2 area 4 (old, true)
. r3 area 9 (old, true)
. r1 isBiggerThan r2 (new, true)
. r1 isBiggerThan r3 (new, true)
. r2 isBiggerThan r1 (old, not true any more)
. r3 isBiggerThan r1 (old, not true any more)
. r3 isBiggerThan r2 (old, still true)
C. Reset Inferences and run Inferences again.
- get six inferred triples (all true)
. r1 area 16
. r2 area 4
. r3 area 9
. r1 isBiggerThan r2
. r1 isBiggerThan r3
. r3 isBiggerThan r2
D. Modify assertions again
- change r1's height and width back to previous values
. r1 (height: 1, width 1)
- Automatically inferred triples relating to r1 are deleted
. two triples deleted, four triples remain (all true)
- run Inferences (without Reset Inferences)
. two triples added, now six triples are all true
------------------
When I change r1's property, if r1 is the subject of inferred triples,
these inferred triples are deleted automatically (like D above).
But, if r1 is the object of inferred triples, these inferred triples
remain and they are not true anymore in this case (like B above).
To keep consistency (to keep all inferred triples true), I had to
reset and run inferences again (like C above).
My question was whether there is a way to avoid a case like B above
without resetting inferences.
I tried a delete query to delete inferred triples that r1 is the
object like below.
But all inferred triples that have isBiggerThan as predicate were
deleted.
DELETE {
?subject :isBiggerThan ?r1 .
}
WHERE {
?r1 rdfs:label "r1" .
?subject :isBiggerThan ?r1 .
}
You mentioned SPARQLMotion before. With this, can I avoid a case like
B above without resetting inferences?
Actually, I'm trying to model moving cars and their locational
relations (e.g. isInFrontOf) if they are on the same road using
inferences.
Their locations are changing and I need to update their relative
location by updating inferred triples.
If assertions and properties are changing often, can I still use
ontology and its inference power?
I hope I described my problem this time better.
Thanks in advance.
Best regards,
Seong
On Feb 21, 10:42 pm, Scott Henninger <
shennin...@topquadrant.com>
wrote: