I highly recommend testing OCanren on these disequality tests:

https://github.com/webyrd/miniKanren-with-symbolic-constraints/blob/master/disequality-tests.scm

Some of the tests are quite subtle, and they ensure that the reified
answers reove duplicate and subsumed and irrelevant constraints.


On Wed, May 3, 2017 at 12:12 PM, Kakadu <[email protected]> wrote:
> It seems that I misunderstood this stuff because in ocanren we print
> disequality constraints in the result term: near free logical
> variables. So, I parsed the answer as q = (_.0 _.1) when q =/= (_.0
> _.1)
>
> Question closed.
>
> On Wed, May 3, 2017 at 8:39 PM, William Byrd <[email protected]> wrote:
>> Yes, this is the current behavior:
>>
>> Chez Scheme Version 9.4.1
>> Copyright 1984-2016 Cisco Systems, Inc.
>>
>>> (load "mk-vicare.scm")
>>> (load "mk.scm")
>>
>>> (run* (q)
>>     (fresh (x y)
>>       (== q `(,x ,y))
>>       (=/= x y)
>>       (=/= y x)
>>     ))
>> (((_.0 _.1) (=/= ((_.0 _.1)))))
>>
>>> (run 1 (q) (=/= q q))
>> ()
>>
>>> (run* (q)
>>     (fresh (x y)
>>       (== q `(,x ,y))
>>       (=/= x y)
>>     ))
>> (((_.0 _.1) (=/= ((_.0 _.1)))))
>>
>> Which seems consistent to me, since in (== q `(,x ,y)), x and y may
>> have different values.
>>
>> On Wed, May 3, 2017 at 11:16 AM, Jason Hemann <[email protected]> wrote:
>>>> I think that all answers like `X such that X is not equal X` should be
>>>> considered wrong.
>>>
>>> I too believe implementations of miniKanren should have that behavior.
>>>
>>>> (run 1 (q) (=/= q q))
>>> ()
>>>
>>> I think I understand this program to be doing something different. This is
>>> closer I would say to an answer like X and Y such that X is not equal to Y.
>>>
>>>> (run* (q)
>>>     (fresh (x y)
>>>       (== q `(,x ,y))
>>>       (=/= x y)))
>>>
>>> Am I misinterpreting your comment/suggestion?
>>>
>>> JBH
>>>
>>>
>>>
>>>
>>> On Wed, May 3, 2017 at 1:10 PM, Kakadu <[email protected]> wrote:
>>>>
>>>> I think that all answers like `X such that X is not equal X` should be
>>>> considered wrong.
>>>>
>>>> On Wed, May 3, 2017 at 7:59 PM, William Byrd <[email protected]> wrote:
>>>> > Hi Dmitrii!
>>>> >
>>>> > I believe that this is the correct, simplified answer.  What answer
>>>> > did you expect?
>>>> >
>>>> > Cheers,
>>>> >
>>>> > --Will
>>>> >
>>>> > On Wed, May 3, 2017 at 10:40 AM, Dmitrii Kosarev
>>>> > <[email protected]> wrote:
>>>> >> Hey, folks
>>>> >>
>>>> >> I'm studying faster-miniKanren and it seems that I found a program
>>>> >> where the
>>>> >> result answer seems to be wrong. It is probably related to the occurs
>>>> >> check
>>>> >> in the constraints implementation... Can you  look, please?
>>>> >>
>>>> >> Happy hacking,
>>>> >> Dmitrii
>>>> >>
>>>> >> (display
>>>> >>   (run* (q)
>>>> >>     (fresh (x y)
>>>> >>       (== q `(,x ,y))
>>>> >>       (=/= x y)
>>>> >>       (=/= y x)
>>>> >>     )))
>>>> >>
>>>> >> ; (((_.0 _.1) (=/= ((_.0 _.1)))))
>>>> >>
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "minikanren" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it, send
>>>> >> an
>>>> >> email to [email protected].
>>>> >> To post to this group, send email to [email protected].
>>>> >> Visit this group at https://groups.google.com/group/minikanren.
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to a topic in the
>>>> > Google Groups "minikanren" group.
>>>> > To unsubscribe from this topic, visit
>>>> > https://groups.google.com/d/topic/minikanren/7DSQF1A9w3w/unsubscribe.
>>>> > To unsubscribe from this group and all its topics, send an email to
>>>> > [email protected].
>>>> > To post to this group, send email to [email protected].
>>>> > Visit this group at https://groups.google.com/group/minikanren.
>>>> > For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "minikanren" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at https://groups.google.com/group/minikanren.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>>
>>> --
>>> JBH
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "minikanren" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/minikanren.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "minikanren" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/minikanren/7DSQF1A9w3w/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/minikanren.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "minikanren" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/minikanren.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"minikanren" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/minikanren.
For more options, visit https://groups.google.com/d/optout.

Reply via email to