RIF and OWL
The W3C RIF Working Group has just published the RIF specification as a Candidate Recommendation. As a coincidence, the OWL 2 Working Group published the OWL 2 specification as Proposed Recommendation just a few days before. Ie, two major sets of technologies that can be used for various kinds of inferences on the Semantic Web have arrived to a high level of maturity almost at the same time. If everything goes as planned (I know, it never does, but one can still speculate) they will become Recommendations around the end of the year.
A group of questions I often get is: how do these two sets of recommendations relate to one another? Did W3C create competing, incompatible technologies that are in the same design space? Why having two? How can they be combined?
To answer this question one has to realize that the two sets of technologies represent different approaches. OWL 2 (and, actually, RDFS) rely, very broadly speaking, on knowledge representation techniques. Think of thesauri, of ontologies, of various classification mechanisms: one classifies and characterizes predicates, resources, and can then deduce logical consequences based on that classification. (On the Semantic Web this usually means discovering new relationships or locating inconsistencies.) RIF, on the other hand, is more reminiscent of logic programming (think of Prolog). Ie, if these and these relationships hold then new relationships can be deduced. (It must be said that RIF also includes a separate work on production rules, but they are fairly distinct from OWL 2, so let us forget about that for the moment.)
Would I want to use OWL 2 or rather RIF to develop an application? Well, it depends. Some applications are better formulated this way, others that way. There are a number of papers published on when one approach is better than the other, how certain tasks can or cannot be expressed using classification or rules, respectively, how reasoning is possible in one circumstances or the other. Very often it also boils down to personal experience and, frankly, taste: some feel more comfortable using rules while others prefer knowledge representation. I do not think it makes sense to claim that one is better than the other. Simply put: they are different and both approaches have their roles to play.
So far so good, the reader could say, but what about using OWL and RIF together?
One of the six recommendation track documents of RIF is called “RIF RDF and OWL Compatibility”. Because we are talking about formal semantics, this document is of course not an easy read. However, in layman's term, what it describes is how the two “sides”, ie, the rule and the classification sides, should work together on the same data set. It defines some sort of an interplay between two different mechanisms: the, shall we say, logic programming part and the knowledge representation part. Implementations doing both are a bit like hybrid cars: they have two parallel engines and a well defined connections between those two. That said, the document only defines what the combination means; whether, for example, engines will always succeed in handling the two worlds together in a finite time is not necessarily guaranteed in all cases. But we can be positive: in many cases (ie, by accepting restrictions here and there) this combination does work well, and there are, actually, good implementations out there that do just that.
A simple case where no problem occurs is the so called OWL 2 RL Profile. This profile has been defined by the OWL Working Group with the goal of being implementable fully via rule engines. This does not necessarily means RIF (I myself have implemented OWL 2 RL by direct programming in Python), but the fact that RIF could also be used is important. The RIF Working Group has therefore published a separate document (“OWL 2 RL in RIF”) which shows just that: it reformulates the rules for the implementation of OWL 2 RL as RIF rules (more exactly, RIF Core rules). Ie, a RIF implementation can just take those rules, import any kind of RDF data that also include OWL 2 statements, and the RIF engine will produce just the right inference results. How cool is that?
So, the answer to the original question is: yes, for many applications, RIF and OWL 2 can happily live together ever after…
Ivan,
The labels in your classification system need to be amended. As a past chair of the Knowledge Representation conference, and current president of KR.org, I can assure you that both description logics (OWL) and logic programming (RIF) are equals parts of the field named "knowledge representation". Thus referring to OWL as KR and RIF as LP is like saying Physics is Science and Chemistry is Chemistry. Although these are only labels, you can see by analogy why chemists might find the mislabeling somewhat offensive.
I would replace "knowledge representation" with "description logics" in your entry.
Since both RIF and OWL "rely, very broadly speaking, on knowledge representation techniques", what is the real difference? They can actually be used for many of the same tasks, and as you say the choice is primarily one of style, but the substantive differences is that RIF (ie logic programming) and OWL (ie description logics) are designed to allow for optimizations of different sets of reasoning problems. The expressive differences are quite minor, and in practice one may never encounter a representation problem that couldn't be handled by either - but you may quite easily find yourself with a reasoning problem that takes significantly longer to terminate using one or the other.
It would no doubt be more useful to provide examples of when this occurs, but "very broadly speaking" description logics optimize for taxonomic reasoning problems within an ontology specification (ie without the data), and logic programs optimize for reasoning problems within the data (ie without the ontology). So a reasonable rule of thumb is, if your ontology is very large (like the Gene Ontology) you probably should use OWL, and if your data set is very large (like the Linked Data Cloud), you should probably use RIF.
That said, I should reemphasize that the difference is largely a matter of style, and criteria like available expertise, ease of adapting to existing data, tooling support, maturity and costs, etc., should be considered as far more important when trying to choose.
-Chris
Chris,
I stand corrected:-) The reason I did not want to use the term 'Description Logic' is because this term is, as we know, reserved to one specific semantics attached to OWL 2 and which is different than the RDF Based Semantics. Maybe 'classification methods' would have been a better term to use.
Hi Ivan,
I understand the general idea of juxtaposing KR approaches and logic programming approaches, but I'd like to know more about where the IF part fits in. If RIF is an interchange format and not an actual rules language, can it really form the basis of a set of application development logic assertions? I see from http://www.w3.org/TR/rif-core/ that it identifies a core a common subset of other rules language; does implementing RIF refer to implementing rules expressed using this core or implementing an automated mapping between other formats, which is what "interchange format" sounds like to me? Or is the idea that RIF serves as a meta-language in which one can plan out application logic that will then use one of a choice of actual rules languages? If so, then wouldn't implementations of RIF make it less meta, i.e. make the other languages less necessary outside of the maintenance of legacy systems?
thanks,
Bob
I totally agree. So what, if two major set of technologies have arrived at the same time!! Both can off-course.....happy live together.
Acne Treatment
I don't think this is a issue to get worried about coz these 2 technologies represent 2 different approaches..one emphasizes on knowledge representation techniques and the other one represents logic programming.