SemTechBiz SF more TVNewser TVSpy LostRemote SocialTimes AllFacebook AllTwitter GalleyCat AppNewser UnBeige AgencySpy PRNewser 10,000 Words FishbowlNY FishbowlLA FishbowlDC MediaJobsDaily

Standards News: Using SPARQL to express rules and object behavior for the Semantic Web

SPIN - SPARQL Inferencing NotationThe current stack of modeling languages for the web of data provide excellent mechanisms for capturing the static structure of data. SKOS can be used to describe concept hierarchies and vocabularies. RDF Schema and OWL can be used to define classes, properties and relationships between these conceptual entities. There is, however, a key set of application requirements these languages have not dealt with. Namely, the way to describe general computational behavior of objects.

These requirements are now addressed by an emerging standard that uses SPARQL to express rules for the Semantic Web. It is called SPARQL Inferencing Notation or SPIN. Because of its heavy use of SPARQL it is also known as SPARQL Rules. SPIN has recently been accepted by W3C as a member submission from TopQuadrant, OpenLink and RPI.

SPIN combines concepts from object oriented languages, query languages, and rule-based systems to describe object behavior on the web of data. Object oriented languages provide well-known mechanisms for defining object behavior by describing classes and associating methods with class members. Object oriented methods often formalize how the modification of one attribute implies changes to other attributes. Another common purpose of methods is to capture constraints to ensure that the state of the objects remains within the bounds that the class designer had intended. One of the basic ideas of SPIN is to link class definitions with SPARQL queries to capture constraints and rules that formalize the expected behavior of those classes.

SPIN delivers a number of key advantages including ability to:

  • Express business rules and constraints in a standard way without having to learn yet another rules language.
  • Run rules directly on RDF data without a need for a separate time consuming “materialization” step. SPARQL is supported by all major RDF APIs and databases
  • Describe object behavior on the web of data by adding concepts from object oriented languages.

To facilitate storage and maintenance, SPARQL queries are represented in RDF triples. The SPIN Modeling Vocabulary defines a collection of properties and classes that can be used to link RDFS and OWL classes with SPARQL queries. For example, the class ex:Rectangle can define a property spin:rule that points to a SPARQL CONSTRUCT query that computes the value of ex:area based on the values of ex:width and ex:height. Similarly, the property spin:constraint may link the class ex:Square with a SPARQL ASK query that verifies that the width and height values are equal. These properties follow existing SPARQL standards, and the execution of these constructs can be efficiently handled by any SPARQL processor. Since SPIN is entirely based on and represented in RDF, rules and constraints can be shared on the web together with the class definitions they are associated with.

SPIN also supports modular abstraction and re-use of SPARQL queries by providing a templating mechanism. Templates are SPARQL queries parameterized with pre-bound variables. Building on the idea of templates, SPIN makes it possible to define custom SPARQL functions. These functions can be shared on the web using their URIs, and SPARQL processors can dynamically look up function definitions on demand, such as in Web service calls. A good example of SPIN functions has been published in the context of ontology-based unit conversion.

To learn more about SPIN, follow the links below:

Semantic Technology Conference Attracts Notable Speakers

LOGO: Semantic Technology & Business Conference; June 2-5, 2013, San Francisco, CaliforniaJoin Semantic Technology & Business Conference, June 2-5 in San Francisco, to hear the latest industry developments from 130 experts in the space. Sessions will be led by practitioners and semantic experts at Walmart, Viacom, Wells Fargo, Google, Yahoo!, and more. Register today.