Re: Error definition

>Hi,
>
>While reading the last version of SPARQL, I am surprised with the following
>definition. I don't know if the semantics of RDF (and consequently SPARQL) is
>changed.
>
>
>Definition: Triple Pattern
>
>A triple pattern is member of the set:
>     (RDF-T union V) x (I union V) x (RDF-T union V)
>
>>From the above definition, the literals are allowed in the subject position.
>However, they are not allowed in RDF. So, I want to know if it is a mistake or
>not?

It is not a mistake. The text mentions the 
difference and explains the reasons for it.

It is now widely believed that forbidding 
literals from subject position was a strategic 
error in the RDF design, and many RDF 
'extensions' allow it. It simplifies the syntax 
and makes reasoning easier. This change to RDF 
would not change the RDF semantics at all, only 
the syntax. The RDF semantics would apply without 
alteration to a fully 'free' RDF syntax in which 
any kind of expression could occur in any 
position. The syntactic constraints in RDF all 
arise from difficulties with encoding the 
resulting triples in the XML striped syntax, not 
from any semantic requirements.

>- For blanks in SPARQL, I want to know if they act as variables or not, that
>is, if a blank can be mapped to any RDF term (or just to a resource)? I need
>some explannation on that, because blanks = anonymous variables. What is a
>resource? Is it a literal or an IRI or just an IRI?
>

You ask many questions :-) I will try to answer them all, briefly.

The word 'resource' in the RDF spec just means 
'the thing that an identifier identifies'. So you 
can replace "resource" by "thing" and the spec 
would mean exactly the same. The use of this 
rather odd word has become traditional in W3C 
documents, but it has no special meaning. So, to 
answer your question directly, a resource is 
anything at all: it is whatever the RDF is 
supposed to be describing. So, yes, an IRI could 
be a resource, and so could a literal (because 
the name of a thing is itself a thing); but it is 
more usual to think of the resource as the thing 
referred to by the IRI or literal. So for example 
this is a literal:
xsd:number^^"34"
which refers to the number thirty four, which 
would normally be called the resource when 
discussing RDF-style languages.

During query answering, variables are bound to 
*names* of resources, not to the resources 
themselves. So a query answer mapping is a 
binding of IRIs or literals (or blank nodes) - 
all RDF atomic expressions which *refer to* 
resources - to variables.

In SPARQL, blank nodes do indeed act very 
similarly to variables, and for simple examples 
you can think of them as being 'blank variables', 
but strictly speaking one has to distinguish 
them, since they behave differently in 
complicated cases. Their identifiers are scoped 
differently. In a group query pattern for 
example, if triples in two different simple 
patterns have the same variable then it is really 
the same variable; but the bnodeIDs are scoped to 
the local simple pattern. Also, in future 
extensions to SPARQL where it would apply to more 
powerful inference regimes such as OWL (and which 
are intended to be covered by the definitions in 
section 2.5), there is a real difference in 
meaning between a variable (which has to be bound 
to a value) and a blank node (which only 
indicates that something can be inferred to 
exist). However, all that being said, if you are 
reading the spec for the first time, I suggest 
that you first try reading it with the 
simplifying idea that blank nodes are like 
anonymous variables, bearing in mind that you 
will have to give up this temporary mental crutch 
when you get more skilled.

>- Is the case that blanks are not allowed in the predicate position?

Right, they are not. This is another possible 
extension to the RDF model which DAWG thought 
about, but decided NOT to include in SPARQL.

I hope this helps. Feel free to get back with more questions.

Pat Hayes

>Best regards,
>Faisal Alkhateeb
>Ph.d. student, INRIA Rhône-Alpes


-- 
---------------------------------------------------------------------
IHMC		(850)434 8903 or (650)494 3973   home
40 South Alcaniz St.	(850)202 4416   office
Pensacola			(850)202 4440   fax
FL 32502			(850)291 0667    cell
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes

Received on Wednesday, 14 June 2006 15:43:36 UTC