- From: Yosi Scharf <syosi@MIT.EDU>
- Date: Sat, 12 Mar 2005 20:27:01 -0500
- To: jos.deroo@agfa.com
- Cc: public-cwm-bugs@w3.org
Quoting jos.deroo@agfa.com:
>
> given
>
> ### test-rules.n3
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
> @prefix : <test#>.
>
> :Z :allOf (:A :B :C).
>
> {?L rdf:first ?I} => {?L :item ?I}.
> {?L rdf:rest ?R. ?R :item ?I} => {?L :item ?I}.
> ###
>
This is NOT a bug. This is just how cwm's foreward chainer works. ?L rdf:first
?I would run a builtin, and cwm will never simply try every node to see if the
builtin will run. You need some way of narrowing down to select a node.
These rules can become something like:
:Z :allOf (:A :B :C).
{?m :allOf ?x} => {:x a :NeedsItem}
{?L a :NeedsItem; rdf:first ?I; rdf:rest ?x} => {?L :item ?I; ?x a :NeedsItem}.
{?L a :NeedsItem; rdf:rest ?R. ?R :item ?I} => {?L :item ?I}.
and then they should work.
Yosi Scharf
Received on Sunday, 13 March 2005 01:27:14 UTC