Re: From syntactic to interpreted triple

Hi James,

On måndag 8 februari 2021 kl. 18:19:02 CET James Anderson wrote:
> good evening;
> 
> > On 2021-02-08, at 16:42:04, Olaf Hartig <olaf.hartig@liu.se> wrote:
> > 
> > Hi James,
> > 
> > Has my solution to your exercise been satisfactory to you?
> 
> thank you for the extended explanation of how to proceed.
> it does demonstrate how to engineer the requested response to that initial
> repository state.
> this passage, in particular, stands out:
>
> > More precisely, I am assuming
> > that the meaning of the class denoted by [the URI :claim] is as follows.
> > Every embedded triple that is stated to be of rdf:type :claim is meant to
> > be treated in terms of referential transparency.
> 
> the subsequent query, which establishes that meaning for specific relations,
> reads less as a general mechanism for transparency, that it does as an
> implementation for how to circumvent opacity for those specific relations.

I would not say 'circumvent opacity', but 'add transparency'. However, this 
may be a matter of perspective.
 
> this is less than satisfactory as a mechanism to be applied to effect
> transparency, in general.

I don't understand why you don't see the presented approach as general. I 
mean, nothing in the approach is specific to the cars/automobiles-are-bad 
example. In particular, none of the URIs that are specific to this example 
(i.e., :cars, :automobiles, :are, and :bad) are mentioned in the CONSTRUCT 
query Q_rule1. You can try with any other example: For instance, assume the 
initial state of the dataset in the endpoint is the following.

  <<:fall :hasWeather :rainy>> rdf:type :claim .

...and you let the endpoint know that the URIs :fall and :autumn denote the 
same thing:

REQUEST 1:

   PREFIX owl: <http://www.w3.org/2002/07/owl#>
   INSERT DATA { :fall owl:sameAs :autumn }

Now you can do exactly the same steps as described in my email and, in the 
end, the endpoint will return true in response to the following query:

   PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
   ASK WHERE { <<:autumn :hasWeather :rainy>> rdf:type :claim }

So, what about the approach is not general?

Or are you asking in general for a semantics of RDF* that enforces referential 
transparency for all embedded triples? If that's the case, this was not the 
discussion that Thomas and I had when you entered. In contrast, I tried to 
convince Thomas that, given the currently proposed semantics (which uses 
referential opacity for embedded triples), it is still possible on top of this 
semantics to achieve referential transparency for selected cases.
I demonstrated a general approach for users to indicate what these selected 
cases are and for an algorithm to act upon such indications by producing the 
inferences as desired for these selected cases.

Best,
Olaf


> > Olaf
> > 
> > On lördag 23 januari 2021 kl. 18:20:25 CET Olaf Hartig wrote:
> >> Hi James,
> >> 
> >> Nice exercise ;-)
> >> Let me try to solve it first for the question that I have asked you.
> >> Hence,
> >> in this case I am assuming that the dataset of the endpoint contains the
> >> following RDF triple as its initial state.
> >> 
> >>  :cars :are :bad .
> >> 
> >> I am assuming that I am allowed to let the endpoint know that we consider
> >> the URIs :cars and :automobiles to denote to the same thing, which I do
> >> by
> >> inserting a corresponding owl:sameAs triple as follows.
> >> 
> >> REQUEST 1:
> >>  PREFIX owl:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w
> >>  3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7Colaf.hartig%40liu.se%7C431
> >>  1f388ef7648584b2b08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0
> >>  %7C637484016468994929%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> >>  oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=dpkrE3QTf1woIq
> >>  8g5LFAwVe%2FuiQp2rx%2FC4CyC2TGPwQ%3D&amp;reserved=0> INSERT DATA { :cars
> >>  owl:sameAs :automobiles }
> >> 
> >> Next, I am assuming that the endpoint does not have any reasoning
> >> capabilities. So, I let it know the meaning of owl:sameAs triples and
> >> have
> >> it calculate (some of) the corresponding inferences by doing the
> >> following
> >> request.
> >> 
> >> REQUEST 2:
> >>  PREFIX owl:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w
> >>  3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7Colaf.hartig%40liu.se%7C431
> >>  1f388ef7648584b2b08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0
> >>  %7C637484016469004886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> >>  oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ZmnyNjRkOARyy%
> >>  2FHuD0WhLIA0D20txcBLCwg3LbSkr%2FM%3D&amp;reserved=0> CONSTRUCT {
> >>  
> >>    ?s2 ?p ?o .
> >>  
> >>  }
> >>  WHERE {
> >>  
> >>    ?s1 ?p ?o .
> >>    ?s1 owl:sameAs ?s2 .
> >>  
> >>  }
> >> 
> >> I am aware that this query covers only a part of the triples that can be
> >> inferred based on owl:sameAs. However, this part is sufficient for the
> >> exercise.
> >> 
> >> Let G be the set of RDF triples that I retrieve as a response to this
> >> request. Note that, if the triple (:cars,:are,:bad) has been in the
> >> dataset
> >> of the endpoint, then G contains the triple (:automobiles,:are,:bad). I
> >> use
> >> G to form another INSERT DATA request as follows.
> >> 
> >> REQUEST 3:
> >>  INSERT DATA {
> >>  
> >>     # here are all the triples from G
> >>  
> >>  }
> >> 
> >> Now, I am ready to send my ASK query.
> >> 
> >> REQUEST 4:
> >>  ASK WHERE { :automobiles :are :bad }
> >> 
> >> The response to this request will be the boolean value true for any case
> >> in
> >> which the dataset of the endpoint contained the triple (:cars,:are,:bad)
> >> as
> >> its initial state.
> >> 
> >> So, this works. Let's move on to your actual exercise. Hence, in this
> >> case,
> >> the only data that I am assuming to be available in the initial state of
> >> the>> 
> >> dataset of the endpoint is the one nested triple:
> >>  <<:cars :are :bad>> rdf:type :claim .
> >> 
> >> First of all, as I already mentioned in my initial response to Thomas, if
> >> we use a referential-opacity semantics for RDF*, then there must be
> >> something in this data of yours that indicates that you want to use
> >> referential transparency for this particular case. In the following, I
> >> am assuming that the URI :claim is what gives the indication. More
> >> precisely, I am assuming that the meaning of the class denoted by this
> >> URI is as follows. Every embedded triple that is stated to be of
> >> rdf:type :claim is meant to be treated in terms of referential
> >> transparency. Hence, if I continue to use owl:sameAs to express that two
> >> URIs are meant to denote the same thing, then an inference rule for
> >> :claim can be defined in SPARQL* as follows.>> 
> >>  PREFIX rdf:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w
> >>  3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7Colaf.hartig%4
> >>  0liu.se%7C4311f388ef7648584b2b08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a
> >>  58edd%7C0%7C0%7C637484016469004886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL
> >>  jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=h
> >>  esYt6HfQqg4BnYaUA0ag7SK33thwUkddhmu7BfSTxY%3D&amp;reserved=0> PREFIX
> >>  owl:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w
> >>  3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7Colaf.hartig%40liu.se%7C431
> >>  1f388ef7648584b2b08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0
> >>  %7C637484016469004886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> >>  oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ZmnyNjRkOARyy%
> >>  2FHuD0WhLIA0D20txcBLCwg3LbSkr%2FM%3D&amp;reserved=0> CONSTRUCT {
> >>  
> >>    <<?s2 ?p ?o2>> ?mp ?mo .
> >>  
> >>  }
> >>  WHERE {
> >>  
> >>    <<?s1 ?p ?o1>> rdf:type :claim .
> >>    <<?s1 ?p ?o1>> ?mp ?mo .
> >>    {
> >>    
> >>      ?s1 owl:sameAs ?s2 .
> >>      BIND( ?o1 AS ?o2 )
> >>    
> >>    }
> >>    UNION
> >>    {
> >>    
> >>      ?o1 owl:sameAs ?o2 .
> >>      BIND( ?s1 AS ?s2 )
> >>    
> >>    }
> >>    UNION
> >>    {
> >>    
> >>      ?s1 owl:sameAs ?s2 .
> >>      ?o1 owl:sameAs ?o2 .
> >>    
> >>    }
> >>  
> >>  }
> >> 
> >> Let's call this query Q_rule1. (I am aware of the fact that this query
> >> covers only the cases of nested triples in which the embedded triple is
> >> in
> >> the subject position. While this is sufficient for the exercise, it
> >> should
> >> not be difficult to see how the query for embedded triples in the object
> >> would be defined.)
> >> 
> >> Given these preliminaries, I am ready to start the process that you asked
> >> me to demonstrate. Again, I first let the endpoint know that we consider
> >> the URIs
> >> 
> >> :cars and :automobiles to denote to the same thing:
> >> REQUEST 1:
> >>  PREFIX owl:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w
> >>  3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7Colaf.hartig%40liu.se%7C431
> >>  1f388ef7648584b2b08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0
> >>  %7C637484016469004886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> >>  oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ZmnyNjRkOARyy%
> >>  2FHuD0WhLIA0D20txcBLCwg3LbSkr%2FM%3D&amp;reserved=0> INSERT DATA { :cars
> >>  owl:sameAs :automobiles }
> >> 
> >> Next, again assuming that there are no reasoning capabilities in the
> >> endpoint, I can use the query Q_rule1 to have the endpoint calculate the
> >> necessary inferences:
> >> 
> >> REQUEST 2:
> >>  Q_rule1
> >> 
> >> Similar to before, I use the set G of RDF* triples retrieved as a
> >> response
> >> to this request in order to make another INSERT DATA request that inserts
> >> all these RDF* triples into the dataset of the endpoint.
> >> 
> >> REQUEST 3:
> >>  INSERT DATA {
> >>  
> >>     # here are all the triples from G
> >>  
> >>  }
> >> 
> >> Now, I am ready to send your ASK query.
> >> 
> >> REQUEST 4:
> >>  PREFIX rdf:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w
> >>  3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7Colaf.hartig%4
> >>  0liu.se%7C4311f388ef7648584b2b08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a
> >>  58edd%7C0%7C0%7C637484016469004886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL
> >>  jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=h
> >>  esYt6HfQqg4BnYaUA0ag7SK33thwUkddhmu7BfSTxY%3D&amp;reserved=0> ASK WHERE
> >>  { <<:automobiles :are :bad>> rdf:type :claim }
> >> 
> >> The response to this request will be the boolean value true.
> >> 
> >> We can also do one more exercise: By the definition of :claim that I give
> >> above, for every embedded triple that is of rdf:type :claim, all nested
> >> triples with this embedded triples are considered for referential
> >> transparency. While this behavior may be desired for some use cases, in
> >> other use cases one may, instead, want the application of referential
> >> transparency to be restricted only to nested triples that have a specific
> >> predicate. The property ex:statedBy that I mentioned as an example in my
> >> previous email could be such a predicate. Hence, we may define a
> >> corresponding inference rule as per the following SPARQL* query, which I
> >> will call Q_rule2.
> >> 
> >>  PREFIX owl:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w
> >>  3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7Colaf.hartig%40liu.se%7C431
> >>  1f388ef7648584b2b08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0
> >>  %7C637484016469004886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> >>  oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ZmnyNjRkOARyy%
> >>  2FHuD0WhLIA0D20txcBLCwg3LbSkr%2FM%3D&amp;reserved=0> PREFIX ex:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexamp
> >>  le.org%2F&amp;data=04%7C01%7Colaf.hartig%40liu.se%7C4311f388ef7648584b2b
> >>  08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0%7C63748401646900
> >>  4886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI
> >>  6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pQff5MJSwoIBEJTd9Z5W3%2Fr6TiT41
> >>  AdFfxpm7n%2FbJSo%3D&amp;reserved=0> CONSTRUCT {
> >>  
> >>    <<?s2 ?p ?o2>> ex:statedBy ?mo .
> >>  
> >>  }
> >>  WHERE {
> >>  
> >>    <<?s1 ?p ?o1>> ex:statedBy ?mo .
> >>    {
> >>    
> >>      ?s1 owl:sameAs ?s2 .
> >>      BIND( ?o1 AS ?o2 )
> >>    
> >>    }
> >>    UNION
> >>    {
> >>    
> >>      ?o1 owl:sameAs ?o2 .
> >>      BIND( ?s1 AS ?s2 )
> >>    
> >>    }
> >>    UNION
> >>    {
> >>    
> >>      ?s1 owl:sameAs ?s2 .
> >>      ?o1 owl:sameAs ?o2 .
> >>    
> >>    }
> >>  
> >>  }
> >> 
> >> Based on this definition, it is possible to perform a similar sequence of
> >> requests as before in order to obtain the answer true for the ASK query
> >> 
> >>  PREFIX ex:
> >>  <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexamp
> >>  le.org%2F&amp;data=04%7C01%7Colaf.hartig%40liu.se%7C4311f388ef7648584b2b
> >>  08d8cc55dd7c%7C913f18ec7f264c5fa816784fe9a58edd%7C0%7C0%7C63748401646900
> >>  4886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI
> >>  6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pQff5MJSwoIBEJTd9Z5W3%2Fr6TiT41
> >>  AdFfxpm7n%2FbJSo%3D&amp;reserved=0> ASK WHERE { <<:automobiles :are
> >>  :bad>> ex:statedBy :Alice }
> >> 
> >> for all cases in which the initial state of the dataset of the endpoint
> >> contains the nested triple
> >> 
> >>  <<:cars :are :bad>> ex:statedBy :Alice .
> >> 
> >> Best,
> >> Olaf
> >> 
> >> On fredag 22 januari 2021 kl. 20:11:59 CET James Anderson wrote:
> >>> good evening;
> >>> 
> >>>> On 2021-01-22, at 18:49:13, Olaf Hartig <olaf.hartig@liu.se> wrote:
> >>>> 
> >>>> On fredag 22 januari 2021 kl. 16:32:57 CET James Anderson wrote:
> >>>>> [...]
> >>>>> to remain with a simple question, if there is dataset which contains
> >>>>> the
> >>>>> assertion
> >>>>> 
> >>>>>  <<  :cars :are :bad . >> a :claim .
> >>>>> 
> >>>>> and one were to wish to cause a query of the _sort_
> >>>>> 
> >>>>> ask where {  <<  :automobiles :are :bad . >> a :claim . }
> >>>>> 
> >>>>> to return true, how would one achieve that?
> >>>> 
> >>>> Also for this question, before I attempt to answer it, I would like to
> >>>> know
> >>>> how you assume to capture the knowledge that the URIs :automobiles and
> >>>> 
> >>>> :cars are meant to refer to the same thing?
> >>>> 
> >>>> ...
> >>>> Can I assume that the reasoner/query engine has baked in the knowledge
> >>>> that
> >>>> 
> >>>> :automobiles and :cars are meant to refer to the same thing? Or can I
> >>>> :assume
> >>>> 
> >>>> that there is also a second triple that captures this knowledge
> >>>> explicitly
> >>>> (e.g., via owl:sameAs) and the reasoner/query engine understands the
> >>>> meaning of this second triple and can use this meaning to make the
> >>>> inference needed to return true for the query?
> >>>> 
> >>>> Notice that this question is independent of RDF*.
> >>> 
> >>> assume only that you have the facilities of the graph store protocol and
> >>> the sparql protocol to operate on a dataset. the respective endpoints
> >>> share a dataset, which includes the initial rdf* statement as its
> >>> initial
> >>> state. you can place any combination of requests to these endpoints.
> >>> what would those requests be?

Received on Monday, 8 February 2021 20:39:34 UTC