Re: New proposal for the semantics


On 10/11/2021 15:55, William Van Woensel wrote:
>  > Hi Pierre-Antoine, > > > > Thanks very much for fleshing out your 
proposal. To me it seems > reminiscent of the static vs. dynamic scoping 
discussion > 
<https://lists.w3.org/Archives/Public/public-n3-dev/2021Jun/0033.html> > 
we had before, at least, regarding the consequences of generating > 
rules with blank nodes (but I could be wrong, of course).

You are absolutely right. It can be seen as a kind of dynamic scoping. 
More about it below.

> In your proposal:  > > _:x a :Penguin. :bob :thinks {_:x a :Bird}. {:bob :thinks > 
_:y}=>{{:bob :is :wise}=>_:y}. > > |= > > {:bob :is :wise} => {_:x a 
:Bird}. > > Where “_:x” would be considered as a universal variable when 
the rule > is fired (I think?)

Well, variables occurring *only* in the consequence are treated a little 
differently.

One way to look at it is to consider that they are treated as 
existentials, scoped to the consequence graph. As such they generate a 
new blank node.

Another way to look at it is to consider that they are treated as 
universals, scoped to the top level, but that the derivation generates a 
witness (blank node).

>  > Similarly, a consequence of dynamic scope was as follows: "In the > 
dynamic scope, this quantifier scope would be governed by where > 
variable "ends up" during unification at runtime": > > > > _:y :b :c. > 
 > {?v1 :b ?v2} => {{?v1 :u :v} => {?v2 :b :c}}. > > |= > > {_:y :u :v} 
=> {:c :b :c}. > > (where _:y would be treated as an existential scoped 
on the rule > premise, as this is where it ended up, and is hence 
equivalent to a > universal) > > Of course, I understand it is not 
wholly the same – in my case, the > variable scope of “_:y” would 
already be changed to the rule premise, > whereas in your proposal, it 
is “assigned” once the latter rule fires > (this difference becomes very 
relevant in your “pathological > example”). Still, the overall result is 
similar in that “_:y” (and > “_:x” in your example) will be treated as a 
universal when the rule > gets fired, I believe.

I agree.

> Now, I’m not trying to be flippant, but I believe this was disliked  > by Doerthe and yourself :-) and, I’m wondering what has changed.

fair question :-)

Let's say that a lot of discussions, and a lot of struggling with 
implicit quantifications, made me gradually change my mind. Also, I 
still do not consider this as dynamic scoping per se. Granted, to 
explain the working of the proposed semantics, I use words such as "when 
the rule is fired", which makes it sound very "execution"- or 
"dynamic"-oriented. But the way the semantics is defined is very static.

But yes, following different paths, we landed roughly in the same place :)

> Personally, I had already shot myself in the foot under that  > particular interpretation: I was generating rules that had /widely > 
different meanings/ depending on whether blank nodes or URIs were > 
being used to structure the data. I believe this will be the result > of 
this new interpretation as well (?)

Yes -- the pathological example in my email is something that I am not 
very happy with...

But my impression is that we

> This did have one useful  > application – I could “compose” rule premises using quoted graphs, > 
where the latter could include resource paths, and thus blank nodes, > 
which would then be interpreted as proper rule variables. (Sorry if > 
this summary is too concise – I can expand on this example if you > like.)

I think I see what you mean, and yes, that's the kind of thing that I 
wanted to make possible with this new proposal.

> You also mention that blank nodes outside of rules are not  > intrinsically quantified – but their scope does seem to be > 
document-wide (as per Doerthe’s example 2)? I haven’t had the time to > 
read your semantics document, so it may become clearer afterwards > :-)

We must distinguish here the syntactic scope and the semantic scope.

In my proposal, blank node labels and quick vars are syntactically 
scoped to the whole document, yes. Meaning: the same bnode label / 
quickvar represents the same thing across the whole document, but may 
represent different things in different documents.

The "semantic scope" is the scope of the quantification. But variables 
have no intrinsic quantification here.

   best

>  > > > > > Thanks, > > > > William

Received on Wednesday, 10 November 2021 18:12:06 UTC