[sdw] Notation-3 and rule direction (#1442)

giacomociti has just created a new issue for https://github.com/w3c/sdw:

== Notation-3 and rule direction ==
Motivated by a [blog post](https://brox.de/en/blog/time-ontology/), I played with [Notation-3](https://w3c.github.io/N3/reports/20230703/) 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](https://gist.github.com/giacomociti/a456e8dc413a678b3e094bd2ab9af7a5)), 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:


```turtle
# 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:

```turtle
{
    ?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.

Please view or discuss this issue at https://github.com/w3c/sdw/issues/1442 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 25 July 2024 17:15:30 UTC