Re: [Sem] alternative semantics

I have some comments inline:

Le 12/05/2023 à 18:36, Peter F. Patel-Schneider a écrit :
> A couple of weeks ago I spent some time coming up with alternative 
> semantics for quoted triples, borrowing freely from the RDF 1.1 
> semantics, the community group semantics, and semantics proposals from 
> Enrico, Antoine, and Pierre-Antoine.  I've done some fixes in the last 
> couple of weeks and added a few examples of entailment and 
> non-entailments and it is now time to inflict the various semantics on 
> the group.
> 
> 
> The first alternative semantics (pfps1) stays close in exposition to the 
> RDF 1.1 semantics.  It has some similarities to Enrico's opaque 
> semantics but has transparency for blank nodes (but different from the 
> CG semantics).  The basic idea in this semantics is to map quoted 
> triples to 3-tuples of resources where each element of the tuple carries 
> the meaning of the corresponding component of the triple.  Instead of 
> using explicit mappings from IRIs and literals to strings this semantics 
> adds unspecified mappings that allow syntactic meaning and semantic 
> meaning to diverge and thereby provide opacity.
> 
> The set of RDF triples is the smallest set of 3-tuples S P O where
> S is a IRI, a blank node, or an RDF triple;
> P is an IRI; and
> O is an IRI, a blank node, a literal, or an RDF triple.
> An RDF graph G is a set of RDF triples.
> 
> A simple interpretation I = < IR, IP, IEXT, IS, IL, ISQ, ILQ, IT > 
> 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 mapping IEXT from IP into the powerset of IR x IR, i.e., the set of 
> sets of pairs < x, y > with x and y in IR,
>     such that IEXT(IS(owl:sameAs)) is the identity mapping over IR.
> 4. A mapping IS from IRIs into (IR union IP).
> 5. A partial mapping IL from literals into IR.
> 6. A mapping ISQ from IRIs into IR.  This is the opaque (or syntactic) 
> mapping for IRIs.
> 7. A mapping ILQ from literals into IR.   This is the opaque (or 
> syntactic) mapping for literals.
> 8. A mapping IT from (IR union IP) x IP x (IR union IP) into IR.   This 
> provides meaning for quoted triples.
> 
> 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?


> 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).
Again, if s or o are blank nodes, this is not well defined.

> 
> In a (simple) interpretation I extend I to a truth mapping for ground 
> triples and ground graphs.
> For E a ground triple s p o. define I(E) = true if IS(p) is in IP and 
> the pair <IA(s),IA(o)> is in IEXT(IS(p)) otherwise I(E) = false.
> For E a ground RDF graph define I(E) = false if I(E') = false for some 
> triple E' in E, otherwise I(E) = true.
> 
> 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.
> For E a triple s p o. define [I+A](E) = true if IS(p) is in IP and the 
> pair <[I*A](s),[I*A](o)> is in IEXT(IS(p)) otherwise [I+A](E) = false.
> 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."

> For E an RDF graph define I(E) = true if [I+A](E) = true for some 
> mapping A from the set of blank nodes in E to IR,
> otherwise I(E) = false.
> 
> 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 .


> The second alternative semantics (pfps2) supports a partition of 
> properties that determine whether their subject and object are 
> interpreted syntactically or semantically.
> 
> The set of RDF triples is as above.
> 
> A simple interpretation I = < IR, IP, IEXT, IS, IL, ISQ, ILQ, IT > is as 
> above, with a disjoint partition of IP into IPS and IPQ and two extra 
> conditions (so that RDF graphs can force properties into IPS or IPQ):
> 9. IPS = { x : < x, IS(rdf:SemanticProperty) > in IEXT(IS(rdf:type)) }
> 10. IPQ = { x : < x, IS(rdf:SyntacticProperty) > in IEXT(IS(rdf:type)) }
> 
> Define IQ and ISQ and above
> 
> Given a (simple) interpretation I define ISS(E) as
> if E is an IRI then ISS(E) = IS(E),
> if E is a literal then ISS(E) = IL(E),
> if E is a triple s p o. then ISS(E) = IT(ISS(s), ISS(p), ISS(o)).
> 
> In a (simple) interpretation I extend I to a truth mapping for ground 
> triples and ground graphs.
> For E a ground triple s p o. define I(E) as
>    I(E) = true if I(p) in IPS and <ISS(s),ISS(o)> is in IEXT(IS(p))
>    I(E) = true if I(p) in IPQ and <ISQ(s),ISQ(o)> is in IEXT(IS(p))
>    I(E) = false otherwise.

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

> For E an RDF graph define I(E) = false if I(E') = false for some triple 
> E' in E, otherwise I(E) =true.
> 
> Handle blank nodes as above.
> 
> 
> 
> 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.

> 4. A mapping IS from IRIs into (IR union IP).
> 5. A partial mapping IL from literals into IR.
> 6. A mapping ISQ from IRIs into IR.  This is the opaque (or syntactic) 
> mapping for IRIs.
> 7. A mapping ILQ from literals into IR.   This is the opaque (or 
> syntactic) mapping for literals.
> 
> Given a (simple) interpretation I define IQ(E) 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(s p o) = <IQ(s), IQ(p), IQ(o)> if this 
> is in IR, undefined otherwise.

This implies that:

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

entails:

<<:s2 :q :r>> :p :o .

> Given a (simple) interpretation I define IA(E) 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(s p o) = IQ(E)
> 
> In a (simple) interpretation I extend I to a truth mapping for ground 
> triples and ground graphs.
> For E a ground triple s p o. define I(E) = true if IS(p) is in IP and 
> the 3-tuple <IA(s), IA(p), IA(o)> is in IEXT otherwise I(E) = false.

This should be <IA(p), IA(s), IA(o)>, or the definition of IEXT above 
should be changed.

> For E an RDF graph define I(E) = false if I(E') = false for some triple 
> E' in E, otherwise I(E) = true.
> 
> Adding blank nodes is the same as in the first alternative.
> 
> 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)
> 
> 
> 
> Examples of entailment and non-entailment (at least as far as I can tell):
> 
> :lois :believes << :clark :wears :glasses >> .
> entails in all the above semantics
> :lois :believes << _:x :wears :glasses >> .
> 
> :lois :believes << _:y :wears :glasses >> .
> entails in all the above semantics
> :lois :believes << _:x :wears :glasses >> .
> 
> :lois :believes << :clark :heightinfeet "6"^^xsd:int >> .
> :believes rdf:type rdf:SemanticProperty .
> entails in +L semantics or in pfps2 only
> :lois :believes << :superman :heightinfeet "6"^^xsd:integer >> .

s/:superman/:clark/

> 
> :clark owl:sameAs :superman
> :lois :believes << :clark :heightinfeet "6"^^xsd:int >> .
> entails in +I semantics only
> :lois :believes << :superman :heightinfeet "6"^^xsd:int >> .
> 
> _:x owl:sameAs :clark .
> :lois :believes << _:x :wears :glasses >> .
> entails in all +I semantics only
> :lois :believes << :clark :wears :glasses >> .
> 
> _:x owl:sameAs _:y .
> :lois :believes << _:x :wears :glasses >> .
> :lois :believes << _:y :heightinfeet "6"^^xsd:int >> .
> entails in all the above semantics
> :lois :believes << _:z :wears :glasses >> .
> :lois :believes << _:z :heightinfeet "6"^^xsd:int >> .
> 
> 
> 
> 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.

-- 
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 Monday, 15 May 2023 13:10:41 UTC