eyereasoner / eye

Euler Yet another proof Engine
https://eyereasoner.github.io/eye/
MIT License
125 stars 17 forks source link

Bug `pred:list-contains` missing match #71

Closed jeswr closed 1 year ago

jeswr commented 1 year ago

If I execute the following query there are no derivations, despite the fact that I expect one result of the form [] :valid true.

@prefix pred: <http://www.w3.org/2007/rif-builtin-predicate#> .
@prefix : <http://example.org/> .

2 :to :o .

{
  ((1 2) ?s) pred:list-contains true .
  ?s :to :o .
} => {
  [] :valid true .
} .

In contrast the following queries do give the expected derivation of [] :valid true

@prefix pred: <http://www.w3.org/2007/rif-builtin-predicate#> .
@prefix : <http://example.org/> .

1 :to :o .

{
  ((1 2) ?s) pred:list-contains true .
  ?s :to :o .
} => {
  [] :valid true .
} .
@prefix pred: <http://www.w3.org/2007/rif-builtin-predicate#> .
@prefix : <http://example.org/> .

2 :to :o .

{
  ?s list:in (1 2) .
  ?s :to :o .
} => {
  [] :valid true .
} .
josd commented 1 year ago

Thanks for the observation and it should now work fine with EYE v3.2.2

@prefix pred: <http://www.w3.org/2007/rif-builtin-predicate#> .
@prefix : <http://example.org/> .

2 :to :o .

{
  ((1 2) ?s) pred:list-contains true .
  ?s :to :o .
} => {
  [] :valid true .
} .

now gives

@prefix pred: <http://www.w3.org/2007/rif-builtin-predicate#>.
@prefix : <http://example.org/>.

2 :to :o.
_:sk_0 :valid true.