Re: CWM Bug: Simple Filter Broken

On Oct 15, 2007, at 5:15 AM, Sean B. Palmer wrote:

>
> $ cat filter.n3
> @prefix log: <http://www.w3.org/2000/10/swap/log#> .
>
> { ?s ?p ?o } => { [ ?p [] ] } .
>
> $ echo ':Bob :knows :Steve . :John :knows :Fred .' | \
>      cwm --filter=filter.n3 --ntriples
> _:g13 <file:///tmp/#knows> _:g14 .
>
> I think that should be generating two triples.
>
You would think it would be generating two triples. However, that  
graph would not be lean by the definition given in http://www.w3.org/ 
TR/rdf-mt/#deflean .

When writing cwm's rule engine, the decision was made to try to not  
entail redundant triples. A set of triples is redundant if the graph  
after those triples are added is rdf-entailed by the graph  
beforehand. Because of this, the following will not loop forever

echo '{?x ?p ?y} => {[] ?p []} . :a :b :c . ' | cwm --think

There may be cases where cwm does create reduntant triples with  
rules, because the code to stop it is not perfect --- it does stop  
that particular infinite loop. Therefore, in filter mode, the same  
code is run and only one triple was generated. It was, however, not  
wrong, as the result it gave was semantically equivalent to the  
result you wanted. Therefore, this is not a bug, and will not be fixed.


Yosi

> Using the CVS cwm I updated several seconds ago.
>
> -- 
> Sean B. Palmer, http://inamidst.com/sbp/
>

Received on Monday, 15 October 2007 14:03:55 UTC