Re: [TED] SPARQL, data sources and blackboxes [was (Re: [UCR] ISSUE-12 and ACTION6198)]

Christian de Sainte Marie wrote:
> 
> Which brings back the question of the identification of and access to 
> data sources (remember action-120?)... And blackboxes as well, by the 
> way (that is, issue-16; was dubbed phase 2, but if we need a generic 
> mechanism in RIF Core, we might want to do that in phsae 1).

It relates to the discussion about the CLP formalism and what are the 
constraints, too (thanx to Dave for providing such a rich example! See 
what happens when we take a concrete example? :-)

DaveR wrote:
>
> For example, one version might look something like:
> 
>   sparql(srcURL, query, ?X, ... ?Z)
> 
> where the ?X..?Z variables would be bound to the corresponding query variables, e.g.
> 
>   sparql("http://jena.hpl.hp.com/somedata",
>          "PREFIX vcard:      <http://www.w3.org/2001/vcard-rdf/3.0#>
>           SELECT ?y WHERE { ?y vcard:Family 'Smith' }",
>          ?y) 


Wouldn't that typically be a blackbox, requiring the application that 
executes the containing rule to send the query to the srcURL, or, 
rather, to a query processor linked to the srcURL?

The RIF version could thus look like:

   sparqlblackbox(processorURL, ?i1, ..., ?in, srcURL, query, ?X, ... ?Z)

where the ?ix would be required input data and ?X...?Z the query 
variables. Or constrained variables, as the query would typically fit as 
a constraint in the CLP formalism, if I understand (that part) right...

QUESTION: What would be a use case where the query would have to be 
processed locally (and thus, could not be handled as a blackbox call to 
be processed somewhere else); and where it would need be processed as a 
SPARQL query, of course?

Because the example query above could as well be translated for JRules 
into something like (which is also typically what would go into a 
constraint, if everything that is an initialExpression for a 
PRR::RuleVariable in OMG PRR is to be interpreted as a constraint):

   when { ?y: Person( ?y.vcardFamily() = 'Smith') }

And, for RIF, in a data source neutral predicate:

   VcardFamily(?y, 'Smith')

QUESTION: I am not sure why a slotted form (of the relational variety) 
would be needed, here (except for typing?)...

QUESTION: once it is in the latter (predicate) form, is there still 
something that makes the condition (that ?y's Vcard name is Smith) a 
constraint?

Christian

Received on Tuesday, 9 January 2007 12:51:09 UTC