Re: Relevant documents on SPIN

Let me try to provide some more details in a compact form. Much of the 
semantics of SPIN are written down implicitly so I'll try to formulate a 
pseuso-code algorithm for SPIN constraint execution:

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) and a graph that contains the spin:constraints 
attached to the classes.

use owl:imports and spin:imports closure of domain graph
     forEach triple (?class spin:constraint ?constraint)  # or 
sub-properties
         forEach ?type := rdfs:subClassOf* ?class
             use domain graph only
                 forEach ?instance of ?type
                     execute ?constraint, pre-binding ?this with ?instance
                         -> Collect resulting constraint violations

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. 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.

Please let me know if I can answer additional questions.

Regards,
Holger


On 10/24/2014 17:42, Peter F. Patel-Schneider wrote:
> Thanks Holger, this document does a decent job of outlining SPIN.
>
> However, there are some unexplained things.  (Maybe these are 
> explained in other documents but I could not
>
> Just what signals a constraint violation?  Is it the presence of a 
> node of type spin:ConstraintViolation (a spin:CV node)?  If so, how 
> can an RDF graph that contains such nodes be processed?  Is it the 
> construction of a spin:CV node?  If so, what difference is there 
> between spin:constraint and spin:role?  Is it the construction of a 
> spin:CV node by a spin:constraint?  If so, how is this signalled?
>
> It appears that the computation required for constraint checking in 
> SPIN is potentially unbounded.  Is that correct?  Where is the 
> description of the SPIN execution engine?
>
> Do you have a list of known SPIN implementations?
>
> peter
>
> PS:  Let's try to keep the name calling down to close to zero.
>

Received on Saturday, 25 October 2014 02:20:20 UTC