Hi Jerven,

yes I do agree it would be nice if everyone could use the RDF syntax, and yes almost certainly there will be two types of files in the future. In a sense this is just like some people prefer using rdfs:Class and others use owl:Class. This is not an ideal situation. But I believe this needs to be balanced with the growth of the community which so far indicates that we have not reached the full potential yet. I do know of at least one company that only gave light-weight support to SPIN in their database because they wanted to operate on the SPARQL string and not bother about writing a parser. I have heard similar arguments many times.

I believe it's relatively easy to switch between syntaxes at run time, and (assuming you are using the SPIN API) your application can move back and forth between both, even if the RDF source only has the string. What I have done for the API is that it will use the sp:text only if there is no other triple for the bnode, and I used this both in the print method and the method that generates the Jena Query object from a SPIN Query object. Thus for users of the SPIN API the impact is hopefully almost non existent.

Overall I believe it will be beneficial for the SPIN community to have more publicly available models, no matter whether they use RDF syntax or text syntax. There are lots of people editing Turtle by hand, and I want to include those instead of having to change their workflows and enforce TopBraid on them. As a tool vendor, we can help you with a converter that takes SPIN text files and converts them to hybrid files that use sp:text plus the sp:where triples. I can add such a menu item to TBC's Model menu, for a start. Would this help?

I hope this makes sense, and I do appreciate your feedback. No decision has been made yet, and I welcome more opinions and arguments.

Thanks,
Holger


On 1/11/2013 19:07, Jerven Bolleman wrote:
Dear Holger,

First let me thank you again for your hard work on SPIN. I can't emphasize enough how much I like the SPIN concepts.

Now I can completely understand the thinking behind this wish for SPARQL contents as a text string. Unfortunately, I am also worried that tools will support one or the other of the syntaxes i.e. ones that just grep out the sp:text and run those queries, won't support the rdf model. i.e. we will get a lot more half backed support.

I just hope that there will be tooling to automatically generate the RDF syntax. I use the RDF syntax a lot (and actually do write parts by hand at times). Mostly because I have SPIN rules about SPIN rules. e.g. for some of my purposes every SPIN rule should have a comment and creator etc... And I would be very disappointed to lose this.

My belief (which might be very wrong) is that SPIN support by implementers is limited by the lack of a public free test suite to help them get started. Maybe we the community can work on this?

Regards,
Jerven



On 01/11/2013 07:23 AM, Holger Knublauch wrote:
Dear users,

for those interested in SPIN, I would like to get feedback on a small
internal change with potentially large implications.

Many people over the years (most recently [1]) have suggested that the
SPIN RDF syntax (representing SPARQL in RDF) is too hard to use in
conjunction with text editors and puts unnecessary obstacles in the way
of implementors.

What I'd like to add is some flexibility that makes the SPIN RDF syntax
no longer mandatory to encode SPIN rules, constraints, functions etc.

Here is how the pure textual SPIN syntax would look like

ss:Rectangle
   spin:rule [
       rdf:type sp:Construct ;
       sp:text """
             # Computes area := width * height
             CONSTRUCT {
                 ?this ss:area ?area .
             }
             WHERE {
                 ?this ss:width ?width .
                 ?this ss:height ?height .
                 BIND ((?width * ?height) AS ?area) .
             }
             """^^xsd:string ;
     ] ;

In other words, the SPARQL query is embedded as entered into the file
and more easy to read for people examining the Turtle source code.

Another example, this time with an even more compact single-line string:

ss:Square
   rdf:type rdfs:Class ;
   spin:constraint [
       rdf:type sp:Ask ;
       sp:text "ASK WHERE { ?this ss:width ?width .  ?this ss:height
?height .  FILTER (?width != ?height) .  }"
     ] ;
   rdfs:label "Square"^^xsd:string ;
   rdfs:subClassOf ss:Rectangle .

sp:text was already supported since the beginning, so the only change
that I want to make is to remove the need to use the RDF syntax if
sp:text is present. I expect that for most people who use SPIN through
TopBraid, the RDF syntax will remain the preferred storage mechanism,
because it does have several advantages:
- allows structural analysis and walking through the RDF graph
- makes it easier to find references to properties etc
- usages of properties and resources within queries get automatically
renamed
- no need to ever worry about prefixes

With those changes I hope to attract more external users and
implementations that will eventually grow the size of the SPIN community.

Feedback welcome.

Thanks,
Holger


[1] http://lists.w3.org/Archives/Public/public-vocabs/2013Jan/0079.html




--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en


Reply via email to