Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] Stackoverflow questions about RDF4J SPIN

Yep I think that is fair enough. The spec just implies the information is reported to the user via some mechanism. I believe the intention is for that not to be via insertion else it is no different from a rule and it would behave differently from an ASK constraint which is just meant to be a simpler form of CONSTRUCT. In TBC this is via the UI, in rdf4j via a logger. However the user is free to act on the violation by inserting the triples themselves and there is nothing to say that an extension can't do this on behalf of the user. For consistency it would make sense for ASK constraint violations to also insert triples. I think there is a protected method in rdf4j that can be overriden to change the reporting mechanism.



Sent from my Samsung Galaxy smartphone.

-------- Original message --------
From: Jeen Broekstra <jeen.broekstra@xxxxxxxxx>
Date: 01/12/2016 03:21 (GMT+00:00)
To: Mark Hale <mj_hale@xxxxxxxxx>
Cc: rdf4j developer discussions <rdf4j-dev@xxxxxxxxxxx>
Subject: Re: Stackoverflow questions about RDF4J SPIN

But if it is “a fancy way of passing more information about the violation”, wouldn’t it be reasonable to have that information accessible to the user somehow? In other words: would it be a reasonable extension of the SPIN reasoner to (optionally) have this data inserted or reported in a way that a user can access it?

Jeen 


On 1 Dec. 2016, at 09:52, Mark Hale <mj_hale@xxxxxxxxx> wrote:


" In other words, if an ASK constraint evaluates to true for one instance, then the instance violates the condition. Optionally, CONSTRUCT queries can create instances of a spin:ConstraintViolation class that provide details on a specific violation."

I took that to mean that CONSTRUCT is just a fancy way of passing more information about the violation, i.e. the spin engine just uses the results to generate a violation, it doesn't insert any triples anywhere. Which makes sense right? the spin engine is just running a query and processing the results. CONSTRUCT returns an RDF graph, what the caller does with that is up to the caller - in and of itself it does not oblige the caller to insert them anywhere. This can be contrasted with DELETE/INSERT spin rules - it is very clear that these explicitly modify triples and don't depend on any behaviour of the caller.

If the poster wants triples to be inserted then they should use a spin:rule instead or as well as.




On Wednesday, 30 November 2016, 22:07, Jeen Broekstra <jeen.broekstra@xxxxxxxxx> wrote:


Hi Mark, others,

I don’t know if you follow StackOverflow at all but there have been a few questions there about our SPIN reasoner. Are you able to take a look and if possible write an answer? 

Most recent question:



Cheers,

Jeen 




Back to the top