7.4 SWRL Essentials


SWRL is based on the OWL 1 DL and OWL Lite species, using a subset of RuleML rules modeled on Horn clauses.
SWRL predates OWL 2. The RuleML subset supported in SWRL includes only unary and binary predicates, a sensible choice, given OWL 1’s foundation in RDF.
A Horn clause represents the familiar if-then conditional statement more formally referred to as implication. An implication is the combination of an antecedent and a consequent.
SWRL has three different syntaxes: one abstract and two concrete flavors based on XML and RDF.
The Abstract Syntax which represents SWRL using a small number of Extended Backus-Naur Form (EBNF) notations.
The XML Concrete Syntax is based on the OWL XML Presentation Syntax (a detailed overview is located at http://www.w3.org/TR/owl-xmlsyntax) as well as RuleML (theXMLSchema can be found at http://www.ruleml.org/xsd/0.8/ruleml-datalog-monolith.xsd). The SWRL XML syntax uses the OWL XML Ontology root element and some of its sub elements.
The RDF Concrete Syntax mirrors the XML syntax in its constructs. Developers tend to represent their SWRL rules in RDF rather than XML syntax. This may be in part because RDF SWRL rules can be saved in both triple stores and ontology files like any other RDF data.
Built-ins, SWRL built-ins expand the expressive power of SWRL and are a main motivator for the use of SWRL.

7.4 SWRL Essentials


DL-Safe Rules, so far has focused on the positive aspects of SWRL’s broad expressiveness, the biggest downside is the loss of decidability. The advent of DL-safe rules solves some of the problems regarding un-decidability. DL-safe rules are those rules that bind only known instances in your knowledge base or ontology to rule variables.
Ontological Mediation is the idea that while the Semantic Web gives users freedoms like reusability, flexibility and the support of distributed knowledge there will most definitely be a need to integrate RDF data across these systems at various levels.