RE: Detecting cycles in OWL

Hello all,

Notation 3 is meant as a superset of RDF, introducing logical elements such as implications, quantification, and scoped negation as failure; as well as nested formulas (cfr. RDF datasets) that allow a form of quoting, among others. As such, I agree with Hans that it has a different purpose from SPARQ: N3 is a logical and assertional extension of RDF, whereas SPARQL is meant for querying RDF.

It is true that one can use CONSTRUCT/INSERT queries to mimic rule-based behavior, depending on what the implementation will then support - then you're essentially implementing a rule-based system / formalism, which is exactly what N3, SWRL, .. are. Both certainly have their purposes. (In fact, I always found SPIN quite interesting with its representation of behavior of class individuals via SPARQL queries :).

Regarding Enrico's point: since N3 rules are seen as logical implications, one can reason over them, e.g., use them as part of logical conditions, or even infer new implications during reasoning. On the open world topic, N3 features scoped negation as failure (SNAF) which allows checking whether a document / formula holds or allows deriving a given fact at a given point in time. While N3 implements the open world assumption, it allows for a monotonic negation as failure - "closing" the world to an extent that is often useful in practice.

From: Franconi Enrico <>
Sent: April-29-20 7:55 AM
Subject: Re: Detecting cycles in OWL

CAUTION: The Sender of this email is not from within Dalhousie.
Let me try to explain my point of view on the difference between OWL and (simple) rule based approaches and SPARQL (with RDF(s) entailment regime).

  *   OWL (and only OWL) is able to reason about the schema alone (aka TBox). For example, given an OWL ontology, I can derive new OWL statements, or check inconsistency, or check redundancy. Rule systems and SPARQL can not reason over rules or SPARQL statements; that is, given a bunch of rule statements or a bunch of SPARQL statements, I can not derive any new statement. This inability of being able to reason is due exactly to the fact that (simple) rule languages and SPARQL are too expressive, and therefore undecidable. So, being too powerful is not an advantage if you are interested in reasoning at the schema level.
  *   In presence of data (aka ABox) in addition to the schema, OWL assumes that the data represents an incomplete picture of the world. (Simple) rule systems and SPARQL (with RDF(s) entailment regime) assume the data to be a (somehow) complete picture of the world, just like SQL database systems.
It seems to me that, in the context of the semantic web, the ability to assume an "open world" view of data is crucial, in order to allow for interoperability among distinct authorities across the web. Indeed, RDF(s) semantics assumes an "open world", namely an incomplete view of data.
Having said that, I tend to disagree with Holger. OWL and N3 are not interoperable, due to the difference of the assumptions on the semantics of data. Indeed, a lot of research has been done to let OWL and rules semantically interoperate, but it is definitely not trivial to understand and implement.
In addition to that, there is also a main difference between (simple) rules and SPARQL (with RDF(s) entailment): a crucial aspect of rule systems is recursion, which SPARQL definitely does not have.


Il giorno 29 apr 2020, alle ore 04:24, Holger Knublauch <<>> ha scritto:

Ok this part of the thread may be morphing into a discussion of N3 rules in particular. I didn't mean to start a "fight" here and of course there are reasons for the design of each language, and people will defend that. It's good to have diversity. It's also good to have discussions that go across language boundaries.

Correct me if I am completely wrong and I have not extensively studied N3 rules. But judging by examples at [1] to me the expressiveness of N3 Rules looks like a subset of SPARQL. Whether engines can do backward or forward chaining is not necessarily a characteristic of the language but can be regarded as an implementation detail. Of course, if you select a simple-enough subset of SPARQL then chaining becomes feasible too. In fact SPIN did have magic properties that were a simple form of backward chaining. (Aside, many scenarios of rules are rather for transformations/mappings, and no sophisticated chaining is needed apart from running rules in a dedicated order).

So one thought is whether N3 rules could be redefined by embedding a subset of SPARQL syntax into Core N3 (Turtle). The benefits of reusing the SPARQL syntax are the numerous existing engine implementations, editing tools and learning material for SPARQL.

As a historic note, OWL was intentionally limited to a subset of its potential design space because that subset of logic had desirable computational complexity and supported particular algorithms. However, with the benefit of hindsight, I believe many people agree that the subset that was chosen for OWL excluded too many real-world use cases. Designing N3 to reflect particular algorithmic possibilities may carry similar risks.

You also highlight use cases such as temporal reasoning across calendar formats etc. The SPARQL standard defines some but not all necessary functions, but there are collections of extension functions such as GeoSPARQL and most implementations include extension points to add more functions. I do wonder whether N3 could simply reuse the same, already existing infrastructure.



On 29/04/2020 10:59, Hans wrote:

Hi Holger,

I tend to disagree.
In my experience SPARQL is less powerful than N3-rule-based machine reasoning (also depending on the reasoner of course :).
Every query is a kind of 'dead end rule', whereas N3-rules can pass the conclusion to other rules during a same reasoning session.
A handy combination of forward and backward rules is possible.
To try to make out of SPARQL a full-blown rule system is not that senseful, because it is not designed for that purpose IMHO.
A strong real world use case for N3-rule-based machine reasoning is temporal reasoning, implying e.g. unification of different calendars (Gregorian, Julian, proleptic Julian and other, with all the quirks) with usage of Julian Day Number, AFAIK beyond the capability of SPARQL.
This case uses e.g. a cascade of backward rules triggered from within other rules.
It is at the end comparing apples with lemons I think.

Kind regards,

On 29.04.20 01:53, Holger Knublauch wrote:

On 28/04/2020 20:32, Mikael Pesonen wrote:


It seems that OWL reasoning has quite limited real world use: checking consistency of model and data, and deducting new facts for search etc.

The lack of expressiveness of OWL has long been a problem for us and many (if not most) of our customers. Even if you can express something in OWL, it often becomes convoluted and non-intuitive. With SPARQL (CONSTRUCT/INSERT) you can do so much more, including the use cases that OWL was supposed to solve. SPIN and later SHACL were partially created to declaratively link SPARQL queries with the domain ontologies.

On N3 rules (mentioned in this thread), I wonder whether this shouldn't simply reuse SPARQL, esp for the built-ins. Why reinvent the wheel?


Received on Wednesday, 29 April 2020 14:01:25 UTC