Re: Relevant documents on SPIN

On 10/26/14, 8:17 AM, Peter F. Patel-Schneider wrote:
>
>
> On 10/24/2014 07:17 PM, Holger Knublauch wrote:
>> Let me try to provide some more details in a compact form. Much of the
>> semantics of SPIN are written down implicitly
>
> A pointer to even an implicit definition of SPIN would be useful as 
> long as the implicit definition covers all the bases.

The web is full of documents about SPIN and you can also look at the 
source code of the SPIN API. The best starting point is http://spinrdf.org

>
>> so I'll try to formulate a
>> pseuso-code algorithm for SPIN constraint execution:
>
> I'm not very keen on specification by algorithm, but let's defer that 
> discussion to later.
>
>> The input is a domain graph containing instances. It is assumed that 
>> this
>> graph either contains or owl:imports the class definitions 
>> (rdfs:subClassOf
>> etc). The property spin:imports is an alternative to owl:imports that 
>> doesn't
>> carry the traditional OWL imports meaning and can be used to inject 
>> triples
>> into the algorithm that shall not be "visible" to normal users of the
>> ontology. So in a typical scenario, users would have three graphs: an
>> instances graph, a classes graph (possibly an OWL model)
>
> What are the expressive limits, if any, on the OWL ontology?
None, if people activate OWL inferencing on the query graph then SPARQL 
will see those extra triples.

>
>> and a graph that
>> contains the spin:constraints attached to the classes.
>>
>> use owl:imports and spin:imports closure of domain graph
> How strong is the closure?  Can a spin:imports'd document owl:import 
> another document?

Yes, for example if one library extends another library.

>>      forEach triple (?class spin:constraint ?constraint)  # or 
>> sub-properties
>>          forEach ?type := rdfs:subClassOf* ?class
> How does this interact with allowing an OWL ontology?

SPIN only looks at rdfs:subClassOf, which is used by both RDFS and OWL. 
There are no dependencies on OWL at all, except that owl:imports should 
be observed.

>
>>              use domain graph only
> What about enumerations that come from the ontology?

I don't understand that question.

>
>>                  forEach ?instance of ?type
> Does this mean "can be inferred to be an instance of" or something else?
It only checks the presence of the rdf:type triple. Whether this is 
inferred or not is irrelevant.

>
>>                      execute ?constraint, pre-binding ?this with 
>> ?instance
>>                          -> Collect resulting constraint violations
>
> There appears to be quite a bit more going on than this, particularly 
> with respect to ordering.  Where is this extra specified?

Constraints are unordered and could be executed in parallel.
>
>> This algorithm is simplified and not optimized, but the main idea is 
>> that the
>> CONSTRUCTs produce instances of spin:ConstraintViolation which are 
>> reported to
>> the user as a constraint violation. There is no feedback loop here, 
>> i.e. the
>> algorithm neither looks at previous instances of 
>> spin:ConstraintViolation, nor
>> does it iterate.
>
> So spin:constraints with construct act differently from spin:rule with 
> construct?  Where is this specified?
It is specified in the SPIN specifications and many other documents online.

>
>
>> There is a short-cut syntax using ASK that can also produce
>> constraint violations, but with less flexibility in the output.
>>
>> We can ignore spin:rule in this discussion - with spin:rule, the 
>> constructed
>> triples are fed back into the query graph for the next iteration, 
>> e.g. until a
>> fix point is reached.
>>
>> The computation is bounded by the expressivity of SPARQL 1.1 + 
>> user-defined
>> SPIN functions as outlined elsewhere.
>>
>> I am not aware of a list of SPIN implementations, although I do remember
>> seeing a C# port of the open-source SPIN API somewhere, as well as 
>> parts of an
>> independent Sesame implementation. There may be others.
>
> So you only know of the TopQuadrant implementation of SPIN, right?

I already answered that.

Holger

Received on Saturday, 25 October 2014 22:51:06 UTC