Description
Motivated by a blog post, I played with Notation-3 rules to derive OWL-Time relations (I see RIF and SWIRL are also mentioned in other issues of this repo).
The rules (available as gist), given time-test-individuals.ttl
, generate all the xxx-true.ttl
and xxx-false.ttl
data in the test suite and helped spot the following missing triples:
# intervalIn-true.ttl
<http://www.w3.org/2021/time/test/individual/ent3-4>
time:intervalIn <http://www.w3.org/2021/time/test/individual/ent0-4> ;
time:intervalIn <http://www.w3.org/2021/time/test/individual/ent1-4> ;
time:intervalIn <http://www.w3.org/2021/time/test/individual/ent2-4> ;
.
# after-true.ttl
<http://www.w3.org/2021/time/test/individual/ent2-4>
time:after <http://www.w3.org/2021/time/test/individual/ent1-1>
.
Also I notice test files for before and after do not include triples with instants as subjects.
But this may be on purpose to keep them small.
The rules look like the following:
{
?T1 time:intervalStarts ?T2 .
}
<=
{
?T1 a time:ProperInterval ; time:hasBeginning ?B1 ; time:hasEnd ?E1 .
?T2 a time:ProperInterval ; time:hasBeginning ?B2 ; time:hasEnd ?E2 .
?B1 :equal ?B2 .
?E1 :before ?E2 .
} .
where auxiliary predicates :equal
and :before
compare date positions of instants.
What looks strange to me is that the corresponding definition in the spec:
If a proper interval T1 is intervalStarts another proper interval T2, then the beginning of T1 is coincident with the beginning of T2, and the end of T1 is before the end of T2.
sounds more like the converse of what is implemented in the rule.
Is this meant to be a logical equivalence? Otherwise, I'm a bit confused.