Discussion:
Lack of a standard rules language Re: Toward easier RDF: a proposal
Doerthe Arndt
2018-11-22 14:34:54 UTC
Permalink
Dear all,
8. Lack of a standard rules language.  This is a big one.
Inference is fundamental to the value proposition of RDF,
and almost every application needs to perform some kind
of application-specific inference.  ("Inference" is used
broadly herein to mean any rule or procedure that produces new
assertions from existing assertions -- not just conventional
inference engines or rules languages.)  But paradoxically,
we still do not have a *standard* RDF rules language.
(See also Sean Palmer's apt observations about N3 rules.[14]) We want
to move forward the standardisation of N3 since I think that it is
I think this is a good opportunity to get back to N3 Logic. We have
worked with N3 for years now and there are several reasons why I believe
that it should be standardized:

* Syntax:

For someone knowing turtle, writing N3 rules is easy since N3
seamlessly extends the rdf's turtle syntax without having to fall
back on debatable constructs like reification.
Example:
For a triple :s :p :o. a rule {?x :p :o} => {?x :pp :oo}. would lead
to:s :pp :oo.

For reification, N3 also provides a solution in general which is
very close to the recent proposal of RDF* and could be aligned with it.
Example::s :says {:s :p :o}.

* Practice:

There are already existing reasoners for N3 Logic Like Cwm
(https://www.w3.org/2000/10/swap/doc/cwm.html) and EYE
(http://eulersharp.sourceforge.net/). The latter developed in
industry which can make us at least confident that N3 is able to
cover "real" use cases.

We used N3 in many practical use cases and had positive experiences
(for example
https://de.slideshare.net/ruleml2012/ruleml-2015-ontology-reasoning-using-rules-in-an-ehealth-context
and https://biblio.ugent.be/publication/8540876).

We already did some first steps towards the standardization by defining
a model theory and identifying current problems:

* A recent talk about this topic at the RuleML Webinar
(https://wiki.ruleml.org/index.php/RuleML_Webinar) can be accessed
here:
https://github.com/RuleML/ruleml-website/blob/master/talks/DoertheArndt-SemN3Impl2ExplQuant-RuleMLWebinar-2018-09-28.pdf

* Earlier work was presented at RuleML 2015 (Slides:
https://de.slideshare.net/ruleml2012/ruleml-2015-semantics-of-notation3-logic-a-solution-for-implicit-quantification,
Paper: https://link.springer.com/chapter/10.1007/978-3-319-21542-6_9)
* We furthermore hope to soon publish a journal paper about this topic
which is currently under review.

*Call to action:* who would support and/or join a W3C community group
around an N3 rule language?

Regards,

Doerthe

P.S.: To also get back to the rest of the ongoing discussion: N3
supports blank nodes and literals in all positions and treats lists as
"first class citizens" (in practice that means that there are no blank
nodes involved when expressing lists).
--
Dörthe Arndt
Researcher Semantic Web
imec - Ghent University - IDLab | Faculty of Engineering and Architecture | Department of Electronics and Information Systems
Technologiepark-Zwijnaarde 19, 9052 Ghent, Belgium
t: +32 9 331 49 59 | e:***@ugent.be
Nathan Rixham
2018-11-22 14:47:32 UTC
Permalink
Yes, N3 immediately addresses multiple points from the opening thread.

It's a great starting (and ending?) point, to this
Post by Doerthe Arndt
Dear all,
8. Lack of a standard rules language. This is a big one.
Inference is fundamental to the value proposition of RDF,
and almost every application needs to perform some kind
of application-specific inference. ("Inference" is used
broadly herein to mean any rule or procedure that produces new
assertions from existing assertions -- not just conventional
inference engines or rules languages.) But paradoxically,
we still do not have a *standard* RDF rules language.
(See also Sean Palmer's apt observations about N3 rules.[14]) We want to
move forward the standardisation of N3 since I think that it is really
I think this is a good opportunity to get back to N3 Logic. We have worked
with N3 for years now and there are several reasons why I believe that it
For someone knowing turtle, writing N3 rules is easy since N3
seamlessly extends the rdf's turtle syntax without having to fall back on
debatable constructs like reification.
For a triple :s :p :o. a rule {?x :p :o} => {?x :pp :oo}. would lead
to :s :pp :oo.
For reification, N3 also provides a solution in general which is very
close to the recent proposal of RDF* and could be aligned with it.
Example: :s :says {:s :p :o}.
There are already existing reasoners for N3 Logic Like Cwm (
https://www.w3.org/2000/10/swap/doc/cwm.html) and EYE (
http://eulersharp.sourceforge.net/). The latter developed in industry
which can make us at least confident that N3 is able to cover "real" use
cases.
We used N3 in many practical use cases and had positive experiences
(for example
https://de.slideshare.net/ruleml2012/ruleml-2015-ontology-reasoning-using-rules-in-an-ehealth-context
and https://biblio.ugent.be/publication/8540876).
We already did some first steps towards the standardization by defining a
- A recent talk about this topic at the RuleML Webinar (
https://wiki.ruleml.org/index.php/RuleML_Webinar) can be accessed
https://github.com/RuleML/ruleml-website/blob/master/talks/DoertheArndt-SemN3Impl2ExplQuant-RuleMLWebinar-2018-09-28.pdf
https://de.slideshare.net/ruleml2012/ruleml-2015-semantics-of-notation3-logic-a-solution-for-implicit-quantification,
Paper: https://link.springer.com/chapter/10.1007/978-3-319-21542-6_9)
- We furthermore hope to soon publish a journal paper about this topic
which is currently under review.
*Call to action:* who would support and/or join a W3C community group
around an N3 rule language?
Regards,
Doerthe
P.S.: To also get back to the rest of the ongoing discussion: N3 supports
blank nodes and literals in all positions and treats lists as "first class
citizens" (in practice that means that there are no blank nodes involved
when expressing lists).
--
Dörthe Arndt
Researcher Semantic Web
imec - Ghent University - IDLab | Faculty of Engineering and Architecture | Department of Electronics and Information Systems
Technologiepark-Zwijnaarde 19, 9052 Ghent, Belgium
Paul Tyson
2018-11-25 18:34:30 UTC
Permalink
Post by Nathan Rixham
Yes, N3 immediately addresses multiple points from the opening thread.
It's a great starting (and ending?) point, to this
The original defect report ("Lack of a standard rules language") is
wrong. RIF has been in the SemWeb stack for a long time. It has of
course been largely ignored while practitioners invent special-case
solutions.

RIF is directly compatible with XML, RDF, and OWL, which means you have
a lot of basic tooling to process it. It covers practically all rule
styles anyone would want, and includes a standard extension mechanism.

My only complaint about RIF is that, due to timing of the working
groups, it is not fully interoperable with SPARQL. Also for the same
reason, there is some disconnect between RIF datatypes and built-ins,
and the XSD datatypes and xpath functions. It's been quite a while since
I worked in this area so I don't recall the details.

That should be the starting point on this topic: re-open a working group
on RIF to make it capable of expressing SPARQL constructs, and resolve
the datatype and built-in discrepancies with other W3C specs.

Of course additional tooling, documentation, and advocacy for RIF
wouldn't hurt. But first drop the myth about "no standard rule
language".

Regards,
--Paul
Post by Nathan Rixham
Dear all,
Post by Doerthe Arndt
8. Lack of a standard rules language. This is a big one.
Inference is fundamental to the value proposition of RDF,
and almost every application needs to perform some kind
of application-specific inference. ("Inference" is used
broadly herein to mean any rule or procedure that produces new
assertions from existing assertions -- not just
conventional
inference engines or rules languages.) But paradoxically,
we still do not have a *standard* RDF rules language.
(See also Sean Palmer's apt observations about N3
rules.[14]) We want to move forward the standardisation of
I think this is a good opportunity to get back to N3 Logic. We
have worked with N3 for years now and there are several
For someone knowing turtle, writing N3 rules is easy
since N3 seamlessly extends the rdf's turtle syntax
without having to fall back on debatable constructs
like reification.
For a triple :s :p :o. a rule {?x :p :o} =>
{?x :pp :oo}. would lead to :s :pp :oo.
For reification, N3 also provides a solution in
general which is very close to the recent proposal of
RDF* and could be aligned with it.
Example: :s :says {:s :p :o}.
There are already existing reasoners for N3 Logic Like
Cwm (https://www.w3.org/2000/10/swap/doc/cwm.html) and
EYE (http://eulersharp.sourceforge.net/). The latter
developed in industry which can make us at least
confident that N3 is able to cover "real" use cases.
We used N3 in many practical use cases and had
positive experiences (for example
https://de.slideshare.net/ruleml2012/ruleml-2015-ontology-reasoning-using-rules-in-an-ehealth-context and https://biblio.ugent.be/publication/8540876).
We already did some first steps towards the standardization by
* A recent talk about this topic at the RuleML Webinar
(https://wiki.ruleml.org/index.php/RuleML_Webinar) can
https://github.com/RuleML/ruleml-website/blob/master/talks/DoertheArndt-SemN3Impl2ExplQuant-RuleMLWebinar-2018-09-28.pdf
https://de.slideshare.net/ruleml2012/ruleml-2015-semantics-of-notation3-logic-a-solution-for-implicit-quantification, Paper: https://link.springer.com/chapter/10.1007/978-3-319-21542-6_9)
* We furthermore hope to soon publish a journal paper
about this topic which is currently under review.
Call to action: who would support and/or join a W3C community
group around an N3 rule language?
Regards,
Doerthe
N3 supports blank nodes and literals in all positions and
treats lists as "first class citizens" (in practice that means
that there are no blank nodes involved when expressing lists).
--
Dörthe Arndt
Researcher Semantic Web
imec - Ghent University - IDLab | Faculty of Engineering and Architecture | Department of Electronics and Information Systems
Technologiepark-Zwijnaarde 19, 9052 Ghent, Belgium
David Booth
2018-11-26 08:13:17 UTC
Permalink
Post by Paul Tyson
Post by Nathan Rixham
Yes, N3 immediately addresses multiple points from the opening thread.
It's a great starting (and ending?) point, to this
The original defect report ("Lack of a standard rules language") is
wrong. RIF has been in the SemWeb stack for a long time.
But RIF is *not* a rules language, AFAIK. It is a rules *interchange*
format, to allow various different rules languages to be exchanged. As
the first sentence of the Introduction of the RIF Overview clearly states:
https://www.w3.org/TR/rif-overview/

"The Rule Interchange Format (RIF) . . . [is] a standard
for exchanging rules among rule systems, in particular
among Web rule engines. RIF focused on exchange rather
than trying to develop a single one-fits-all rule language
because, in contrast to other Semantic Web standards, such
as RDF, OWL, and SPARQL, it was immediately clear that a
single language would not satisfy the needs of many popular
paradigms for using rules in knowledge representation and
business modeling."

Am I missing something?
Post by Paul Tyson
It has of
course been largely ignored while practitioners invent special-case
solutions.
Why has it been ignored? It would be useful to learn.
Post by Paul Tyson
RIF is directly compatible with XML, RDF, and OWL, which means you have
a lot of basic tooling to process it. It covers practically all rule
styles anyone would want, and includes a standard extension mechanism.
My only complaint about RIF is that, due to timing of the working
groups, it is not fully interoperable with SPARQL. Also for the same
reason, there is some disconnect between RIF datatypes and built-ins,
and the XSD datatypes and xpath functions. It's been quite a while since
I worked in this area so I don't recall the details.
That should be the starting point on this topic: re-open a working group
on RIF to make it capable of expressing SPARQL constructs, and resolve
the datatype and built-in discrepancies with other W3C specs.
Suggestion noted. But if you think RIF should fill this need then it
would be wise also to understand why RIF has not had broader uptake already.

Thanks,
David Booth
Doerthe Arndt
2018-11-26 10:12:36 UTC
Permalink
Dear David,
Post by Paul Tyson
Post by Nathan Rixham
Yes, N3 immediately addresses multiple points from the opening thread.
It's a great starting (and ending?) point, to this
The original defect report ("Lack of a standard rules language") is
wrong. RIF has been in the SemWeb stack for a long time.
But RIF is *not* a rules language, AFAIK.  It is a rules *interchange*
format, to allow various different rules languages to be exchanged. 
As the first sentence of the Introduction of the RIF Overview clearly
https://www.w3.org/TR/rif-overview/
  "The Rule Interchange Format (RIF) . . . [is] a standard
  for exchanging rules among rule systems, in particular
  among Web rule engines. RIF focused on exchange rather
  than trying to develop a single one-fits-all rule language
  because, in contrast to other Semantic Web standards, such
  as RDF, OWL, and SPARQL, it was immediately clear that a
  single language would not satisfy the needs of many popular
  paradigms for using rules in knowledge representation and
  business modeling."
Am I missing something?
I would say that RIF is not *one* rule language, but *many* and here I
also see the problem.  To explain a little bit more:

RIF comes in different flavours, so-called "dialects". For each of these
dialects, the semantics can (and should) be defined, in that sense, the
dialects are also rule languages.  The problem is that these different
dialects can also contradict each other in their semantics (the RIF Web
site mentions "stable semantics" vs "well founded semantics" - so two
different ways to handle negation as an example), so one must be careful
when using "RIF rules" which dialect he or she is using. All the RIF
rule languages have a common ground, the minimal rule language RIF Core
(https://www.w3.org/TR/rif-core/), which can then be further extended.
RIF Core comes with a well-defined semantics and new RIF dialects can
extend that and add, for example, negation.

RIF is very beautiful for the purpose it is designed for, ie the
exchange of rules between different rule systems, but that is not really
what we need in the Semantic Web: here, we would like to have one single
language with fixed semantics we could use to express rules. Of course,
to get there, we would need an agreement on the features such a language
should support (eg, negation? stable semantics? well founded semantics?)
and that is not easy to reach.  A starting point to come to such an
agreement could be RIF Core.

There is one other problem I personally see with RIF: I think RIF is not
well-connected to RDF.  RIF is defined separately from RDF and the
specification only mentions how RIF can be expressed using RDF syntax
(https://www.w3.org/TR/rif-in-rdf/) and how RDF can be integrated into
RIF (https://www.w3.org/TR/rif-rdf-owl/). But in essence, RIF and RDF
are completely separated logics and only very few from the
implementations of RIF listed on the corresponding Wep page even mention
RDF (https://www.w3.org/2005/rules/wiki/Implementations).

So as a conclusion: I would favour N3 as a solution, but we could also
fix *one* RIF dialect as *the* rule language for the Semantic Web.

Kind regards,
Doerthe
--
Dörthe Arndt
Researcher Semantic Web
imec - Ghent University - IDLab | Faculty of Engineering and Architecture | Department of Electronics and Information Systems
Technologiepark-Zwijnaarde 19, 9052 Ghent, Belgium
t: +32 9 331 49 59 | e: ***@ugent.be
Marco Neumann
2018-11-26 10:44:22 UTC
Permalink
David, we did run a Lotico session almost 10 years ago in New York City on
RIF - W3C Rules Interchange Format with Chris Welty. It's still relevant
and might help you contextualize the basics and the situation around RIF,
industry and community adoption or lack thereof. You can find a link to the
slides and a live recording in the page.

http://www.lotico.com/index.php/RIF_-_W3C_Rules_Interchange_Format_with_Chris_Welty

enjoy, Marco
Post by David Booth
Post by Paul Tyson
Post by Nathan Rixham
Yes, N3 immediately addresses multiple points from the opening thread.
It's a great starting (and ending?) point, to this
The original defect report ("Lack of a standard rules language") is
wrong. RIF has been in the SemWeb stack for a long time.
But RIF is *not* a rules language, AFAIK. It is a rules *interchange*
format, to allow various different rules languages to be exchanged. As
https://www.w3.org/TR/rif-overview/
"The Rule Interchange Format (RIF) . . . [is] a standard
for exchanging rules among rule systems, in particular
among Web rule engines. RIF focused on exchange rather
than trying to develop a single one-fits-all rule language
because, in contrast to other Semantic Web standards, such
as RDF, OWL, and SPARQL, it was immediately clear that a
single language would not satisfy the needs of many popular
paradigms for using rules in knowledge representation and
business modeling."
Am I missing something?
Post by Paul Tyson
It has of
course been largely ignored while practitioners invent special-case
solutions.
Why has it been ignored? It would be useful to learn.
Post by Paul Tyson
RIF is directly compatible with XML, RDF, and OWL, which means you have
a lot of basic tooling to process it. It covers practically all rule
styles anyone would want, and includes a standard extension mechanism.
My only complaint about RIF is that, due to timing of the working
groups, it is not fully interoperable with SPARQL. Also for the same
reason, there is some disconnect between RIF datatypes and built-ins,
and the XSD datatypes and xpath functions. It's been quite a while since
I worked in this area so I don't recall the details.
That should be the starting point on this topic: re-open a working group
on RIF to make it capable of expressing SPARQL constructs, and resolve
the datatype and built-in discrepancies with other W3C specs.
Suggestion noted. But if you think RIF should fill this need then it
would be wise also to understand why RIF has not had broader uptake already.
Thanks,
David Booth
--
---
Marco Neumann
KONA
Paul Tyson
2018-11-29 01:10:22 UTC
Permalink
Post by David Booth
Post by Paul Tyson
Post by Nathan Rixham
Yes, N3 immediately addresses multiple points from the opening thread.
It's a great starting (and ending?) point, to this
The original defect report ("Lack of a standard rules language") is
wrong. RIF has been in the SemWeb stack for a long time.
But RIF is *not* a rules language, AFAIK. It is a rules *interchange*
format, to allow various different rules languages to be exchanged. As
https://www.w3.org/TR/rif-overview/
"The Rule Interchange Format (RIF) . . . [is] a standard
for exchanging rules among rule systems, in particular
among Web rule engines. RIF focused on exchange rather
than trying to develop a single one-fits-all rule language
because, in contrast to other Semantic Web standards, such
as RDF, OWL, and SPARQL, it was immediately clear that a
single language would not satisfy the needs of many popular
paradigms for using rules in knowledge representation and
business modeling."
Am I missing something?
Yeah, that gave me pause, but I tried it out and it worked for my
purpose. I can only guess those words were added for political reasons,
to mollify participants with a stake in other rule languages. RIF is a
rules interchange language in much the same way XML is a document
interchange language. My alternatives were RuleML and Common Logic, both
excellent creations, but RIF is tightly integrated with semweb stack.

In my application, the "interchanges" were rif2html (for documentation)
and rif2sparql (for runtime execution). But I can imagine rif2sql,
rif2prolog, rif2n3, rif2[your-favorite-enterprise-app] and any number of
specialized analysis and documentation tools. Try that with N3 source.
Post by David Booth
Post by Paul Tyson
It has of
course been largely ignored while practitioners invent special-case
solutions.
Why has it been ignored? It would be useful to learn.
I don't know. Social and market forces, I guess, in addition to
ignorance. Why an enterprise would bury so much of its crucial business
logic in proprietary formats is beyond my understanding.

Regards,
--Paul
Post by David Booth
Post by Paul Tyson
RIF is directly compatible with XML, RDF, and OWL, which means you have
a lot of basic tooling to process it. It covers practically all rule
styles anyone would want, and includes a standard extension mechanism.
My only complaint about RIF is that, due to timing of the working
groups, it is not fully interoperable with SPARQL. Also for the same
reason, there is some disconnect between RIF datatypes and built-ins,
and the XSD datatypes and xpath functions. It's been quite a while since
I worked in this area so I don't recall the details.
That should be the starting point on this topic: re-open a working group
on RIF to make it capable of expressing SPARQL constructs, and resolve
the datatype and built-in discrepancies with other W3C specs.
Suggestion noted. But if you think RIF should fill this need then it
would be wise also to understand why RIF has not had broader uptake already.
Thanks,
David Booth
Jos De Roo
2018-11-22 20:04:38 UTC
Permalink
Dear Doerthe,


Thanks for keeping this ball rolling and I'm happy to say

+1


Kind regards,

Jos


Jos De Roo | Agfa HealthCare
Data Scientist | HE/Clinical Analytics
http://josd.github.io/

Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium
http://www.agfa.com/healthcare

________________________________
From: Doerthe Arndt <***@ugent.be>
Sent: 22 November 2018 15:34:54
To: semantic-***@w3.org
Subject: Lack of a standard rules language Re: Toward easier RDF: a proposal

Dear all,

reading the below:

8. Lack of a standard rules language. This is a big one.
Inference is fundamental to the value proposition of RDF,
and almost every application needs to perform some kind
of application-specific inference. ("Inference" is used
broadly herein to mean any rule or procedure that produces new
assertions from existing assertions -- not just conventional
inference engines or rules languages.) But paradoxically,
we still do not have a *standard* RDF rules language.
(See also Sean Palmer's apt observations about N3 rules.[14]) We want to move forward the standardisation of N3 since I think that it is really worth it:

I think this is a good opportunity to get back to N3 Logic. We have worked with N3 for years now and there are several reasons why I believe that it should be standardized:

* Syntax:

For someone knowing turtle, writing N3 rules is easy since N3 seamlessly extends the rdf's turtle syntax without having to fall back on debatable constructs like reification.
Example:
For a triple :s :p :o. a rule {?x :p :o} => {?x :pp :oo}. would lead to :s :pp :oo.

For reification, N3 also provides a solution in general which is very close to the recent proposal of RDF* and could be aligned with it.
Example: :s :says {:s :p :o}.

* Practice:

There are already existing reasoners for N3 Logic Like Cwm (https://www.w3.org/2000/10/swap/doc/cwm.html) and EYE (http://eulersharp.sourceforge.net/). The latter developed in industry which can make us at least confident that N3 is able to cover "real" use cases.

We used N3 in many practical use cases and had positive experiences (for example https://de.slideshare.net/ruleml2012/ruleml-2015-ontology-reasoning-using-rules-in-an-ehealth-context and https://biblio.ugent.be/publication/8540876).

We already did some first steps towards the standardization by defining a model theory and identifying current problems:

* A recent talk about this topic at the RuleML Webinar (https://wiki.ruleml.org/index.php/RuleML_Webinar) can be accessed here: https://github.com/RuleML/ruleml-website/blob/master/talks/DoertheArndt-SemN3Impl2ExplQuant-RuleMLWebinar-2018-09-28.pdf
* Earlier work was presented at RuleML 2015 (Slides: https://de.slideshare.net/ruleml2012/ruleml-2015-semantics-of-notation3-logic-a-solution-for-implicit-quantification, Paper: https://link.springer.com/chapter/10.1007/978-3-319-21542-6_9)
* We furthermore hope to soon publish a journal paper about this topic which is currently under review.

Call to action: who would support and/or join a W3C community group around an N3 rule language?

Regards,

Doerthe

P.S.: To also get back to the rest of the ongoing discussion: N3 supports blank nodes and literals in all positions and treats lists as "first class citizens" (in practice that means that there are no blank nodes involved when expressing lists).

--
Dörthe Arndt
Researcher Semantic Web
imec - Ghent University - IDLab | Faculty of Engineering and Architecture | Department of Electronics and Information Systems
Technologiepark-Zwijnaarde 19, 9052 Ghent, Belgium
t: +32 9 331 49 59 | e: ***@ugent.be<mailto:***@ugent.be>
Loading...