Re: [Sem] alternative semantics

Dear Peter (and Antoine),

I just started reading your semantics so my questions might be very similar to Antoine’s questions (sorry if that is the case). However, I’d like to fully understand :)
Did I get it correctly that at least for pfps1 (but I think also for the others, but there I need to think about), we do have

:lois :believes << :clark :wears :glasses >> .

entails

:lois :believes << _:x :wears :glasses >> .

BUT

:clark a :reporter.
:lois :believes << :clark :wears :glasses >> .

does not entail:

_:x a :reporter.
:lois :believes << _:x :wears :glasses >> .

We still get
_:y a :reporter.
:lois :believes << _:x :wears :glasses >> .

I am fine with that, but wonder whether this goes against common expectations (whatever that means).

Interesting as well:
:clark owl:sameAs _:y .
:clark owl:sameAs _:x.
:lois :believes << _:x :wears :glasses >> .
:lois :believes << _:y :heightinfeet "6"^^xsd:int >> .

Still entails in all the above semantics

:lois :believes << _:z :wears :glasses >> .
:lois :believes << _:z :heightinfeet "6"^^xsd:int >> .

BUT NOT(at least not in pfps1)
:lois :believes << :clark :wears :glasses >> .

(That is very similar to the example of Antoine where he used triple terms).

These were just my first thoughts. Please let me know whether I misunderstood something.

Kind regards,
Dörthe

Am 22.05.2023 um 17:42 schrieb Antoine Zimmermann <antoine.zimmermann@emse.fr<mailto:antoine.zimmermann@emse.fr>>:


Some comments inline:


Le 15/05/2023 à 16:18, Peter F. Patel-Schneider a écrit :
My summary:  There are a few glitches in the development but nothing significant.  Fully opaque blank nodes in quoted triples make quite a difference.
On 5/15/23 09:10, Antoine Zimmermann wrote:
I have some comments inline:

[...]

Given a (simple) interpretation I define IQ(E) (quoted interpretation) as
if E is an IRI then IQ(E) = ISQ(E),
if E is a literal then IQ(E) = ILQ(E),
if E is a triple s p o . then IQ(E) = IT(IQ(s), IQ(p), IQ(o)).

At this point, if s (or o) are blank nodes, then IQ(s) (or IQ(o)) is not defined. Do you mean "ground triple" on the last line?
Indeed.  Good catch.

Given a (simple) interpretation I define IA(E) (asserted interpretation) as
if E is an IRI then IA(E) = IS(E),
if E is a literal then IA(E) = IL(E),
if E is a triple s p o. then IA(E) = IT(IQ(s), IQ(p), IQ(o)).

Do you confirm that it is not IA(E) = IT(IA(s), IA(p), IA(o))? In this case, you could write more concisely: IA(E) = IQ(E). This has certain consequences on transparency (see below).
It is the case that IQ is to be used here.
[...]
Adding blank nodes:
Given an interpretation I let A be a mapping from a set of blank nodes to IR.
Define [I*A](E) to be A(E) on blank nodes,
        <[I*A](S), [I*A](P), [I*A](O)> on triples of the form S P O. ,

what does this last line mean? I would imagine that there is a function:
[IQ*A](E) = A(E) on blank nodes
[IQ*A](E) = IQ(E) on IRIs and literals
[IQ*A](E) = IT([IQ*A](s), [IQ*A](p), [IQ*A](o)) on triples E = s p o.

then:
[IA*A](E) = A(E) on blank nodes
[IA*A](E) = IA(E) on IRIs and literals
[IA*A](E) = [IQ*A](E) otherwise.

        and IA(E) otherwise.
The development here is an attempt to be similar to the development in the RDF 1.1 Semantics.  It is not the case that there are IQ*A mappings and IA*A mappings, just an I*A mapping that depends on I and A (and an I+A mapping).  A slightly different development might be easier to follow.

If we assume that:

> Define [I*A](E) to be A(E) on blank nodes,
>      <[I*A](S), [I*A](P), [I*A](O)> on triples of the form S P O.,
>        and IA(E) otherwise.

then for an IRI  u, we have [I*A](u) = IA(u), and so:

[I*A](u u u .) = <IA(u), IA(u), IA(u)>

This is problematic, as it does not match the way the semantics works for ground triples and ground graphs.

[...]
For E an RDF graph define [I+A](E) = false if [I+A](E') = false for some triple E' in E, otherwise I(E) = true.

"otherwise I(E) = true." -> "otherwise [I*A](E) = true."
Indeed.  Thanks again.
[...]
To make literals transparent (+L) just add the condition
ILQ(E) = IL(E)
To make IRIs transparent (+I) just add the condition
ISQ(E) = IS(E)

If IA(s,p,o) = IQ(s,p,o) then it is possible to simulate transparent IRIs. Consider the example:

<<:superman :can :fly>> :saydBy :LoisLane .
:superman owl:sameAs :ClarkKent .

This does *not* entail:
<<:ClarkKent :can :fly>> :says :LoisLane .

*but* suppose you replace all IRIs aaa that you want to make transparent into <<aaa :W :W>>, then:

<< <<:superman :W :W>> :can :fly >> :says :LoisLane .
<<:superman :W :W>> owl:sameAs <<:ClarkKent :W :W>> .

This *does* entail:

<< <<:ClarkKent :W :W>> :can :fly >> :says :LoisLane .
Yes, you can do this replacement but all that it shows is that when you replace an IRI by a quoted triple you get different entailments because quoted triples are handled differently than IRIs.  By why should you get the same entailments?  Replacing an IRI by a blank node gets you different entailments as well.

I'm just pointing out that quoted triples that are asserted to be owl:sameAs each other can then be used interchangeably anywhere, while this is not the case for IRIs and literals. That is:

Given 2 distinct terms t1 and t2, the question whether:

t1 owl:sameAs t2 .
<< t1 p1 o1 >> p2 o2 .

entails or not:

<< t2 p1 o1 >> p2 o2 .

depends on the syntactic nature of t1 and t2. If They are both quoted triples, then the entailment holds, otherwise not. Even more surprising, maybe: if t1 and t3 are quoted triples and t2 is an IRI,

t1 owl:sameAs t2 .
t2 owl:sameAs t3 .
<< t1 p1 o1 >> p2 o2 .

entail:

<< t3 p1 o1 >> p2 o2 .

and does not entail:

<< t2 p1 o1 >> p2 o2 .


The second alternative semantics (pfps2) supports a partition of properties that determine whether their subject and object are interpreted syntactically or semantically.

[...]

It seems to me that there can be RDF 1.1 entailments that are not pfps2-entailments.
Such as?

Probably not in simple entailments, but there may be problems as soon as you add the RDF(S) vocabulary. Perhaps the problems can go away by adding further machinery to the RDF/RDFS entailment regimes, but this is cumbersome. In fact, the interaction of RDFS and this semantics may be very difficult to foresee.


The third alternative semantics (pfps3) is a variation on the first alternative semantics where 3-tuples are members of the domain.  This makes the connection between quoted triples and facts more explicit.  To further this connection, IEXT is modified from a map to a set of 3-tuples.   This semantics is not the same as the first but the difference should not be visible in RDF or RDFS.

The set of RDF triples is as above.

A simple interpretation I = < IR, IP, IEXT, IS, IL, ISQ, ILQ > consists of
1. A non-empty set IR of resources, called the domain or universe of I.
2. A set IP, called the set of properties of I.
3. A set IEXT, a subset of IP x IR x IR,
    such that the restriction of the first element to IS(owl:sameAs) is the identity mapping over IR.

I don't see how this is different from the IEXT of the previous semantics.
The point of this semantics is to make quoted triple look more like asserted triples.  It does two things in support of this:  1/ map quoted triple directly into 3-tuples in the domain of discourse, and 2/ change IEXT from a mapping from properties to pairs of resources into a set of 3-tuples.   The second change is simply a restating.  The first change does modify the semantics in a significant manner but, I think, not in a way that can be noticed in RDF or RDFS.
[...]
This implies that:

<<:s1 :p1 :o1>> owl:sameAs <<:s2 :p2 :o2>> .
<<:s1 :q :r>> :p :o .

entails:

<<:s2 :q :r>> :p :o .
Correct, but this is going outside RDF and RDFS.

In what sense? We are obviously not considering staying in RDF 1.1 semantics for this discussion. We are discussing the entailments of pfps3 (a candidate for RDF 1.2 semantics) which contains all the above, including owl:sameAs at its core.

[...skip...]
A fully opaque semantics (pfps4) would add to pfps1
9. A mapping IBQ from blank nodes into IR.
if E is a blank node then IQ(E) = IBQ(E)
and make the change
Define [I+A] to be A on blank nodes in asserted triples, < [I+A]S, [I+A]P, [I+A]O > on triples, and I otherwise.
but I don't think that there is then a semantic extension to transparent blank nodes.

In this semantics

:lois :believes << :clark :wears :glasses >> .
does not entail
:lois :believes << _:x :wears :glasses >> .

:lois :believes << _:y :wears :glasses >> .
does not entail
:lois :believes << _:x :wears :glasses >> .


This semantics requires a heuristic to decide whether 2 syntactic tokens for blank nodes denote the same blank node or not. Within a single RDF document, this is easy, but what if you have a file with:

<<[] a <Type>>> <p> <o> .

Is the bnode the same as the one in another file with:

<<[] a <Type>>> <p> <o> .

if not, it leads to the very unintuitive fact that 2 identical RDF documents do not entail each other.
I'm not so sure that this is unintuitive, based on how blank node identifiers work in different documents.  The blank node in
<< _:x :y :z >> :a :b .
is in principle different from the blank node in
<< _:x :y :z >> :a :b .
so the two RDF graphs would not entail each other.
To get the entailment to follow if blank nodes are opaque you need to have some notion of a context where a blank node identifier always refers to the same blank node.

This is precisely what I mean by:

>> This semantics requires a heuristic to decide whether 2 syntactic
>> tokens for blank nodes denote the same blank node or not.

I am personally ok with the unintuitive non-entailment. In fact, I already proposed a very simple semantics in my email of the 31st of January 2023 (https://lists.w3.org/Archives/Public/public-rdf-star-wg/2023Jan/0100.html):

"""
An interpretation is a tuple (IR, IP, IS, IL, IT, IEXT) such that:
 - (IR, IP, IS, IL, IEXT) is an RDF 1.1 interpretation.
 - IT is a function from the set of embedded triples to IR.

The "semantic conditions for ground graphs" (in Sec.5
https://www.w3.org/TR/rdf11-mt/#simple-interpretations) have to be
changed a little bit:

Definition: An RDF-star triple that have a subject that is not a blank
node, and an object that is not a blank node either, is called a *weakly
ground triple*. A weak ground RDF-star graph is a set of weakly ground
triples.

 - if E is a literal then I(E) = IL(E)
 - if E is an IRI then I(E) = IS(E)
 - if E is an RDF-star triple then I(E) = IT(E)
We introduce a separate function Itruth that maps RDF-star triples and
RDF-star graph to true or false:
 - if E is a weakly ground triple s p o, then Itruth(E) = true if
I(p) is in IP and the pair <I(s),I(o)> is iin IEXT(I(p))
otherwise Itruth(E) = false
 - if E is a weakly ground RDF-star graph then Itruth(E) = false if
Itruth(E') = false for some triple E' in E, otherwise Itruth(E) = true.
"""


--AZ


Fully opaque blank nodes appear to be required for the use case of recording changes to RDF graphs if quoted triples are used to record the added and deleted triples.
peter

--
Antoine Zimmermann
École des Mines de Saint-Étienne
158 cours Fauriel
CS 62362
42023 Saint-Étienne Cedex 2
France
Tél:+33(0)4 77 49 97 02
http://www.emse.fr/~zimmermann/

Received on Wednesday, 24 May 2023 14:45:52 UTC