So, the only clause that adds a 1 to the solution is ([[n . ns] vars]
...). It takes the first number (in the example, n=2), takes the first n
vars using dropo, and forces their sum to be n.


On Thu, Mar 6, 2014 at 2:35 PM, Mauro Lopes <[email protected]> wrote:

> Oops, sorry for the wrong line numbers. I opened the old version of the
> file (the one before those extra fd/in).
>
>
> On Thu, Mar 6, 2014 at 2:30 PM, Mauro Lopes <[email protected]> wrote:
>
>> I see.
>> The only clause that adds a 1 to the solution is in line 26. It takes the
>> first number (in the example, n=2), takes the first n vars (line 34) and
>> force their sum to be n, making all of them equal to 1. So there is no way
>> to have a solution starting with (1 0)
>>
>>
>> On Thu, Mar 6, 2014 at 2:13 PM, David Nolen <[email protected]>wrote:
>>
>>> On Thu, Mar 6, 2014 at 12:10 PM, Mauro Lopes <[email protected]>wrote:
>>>
>>>> (1 0 0 1) and (0 1 0 1) are wrong for me.
>>>>
>>>
>>> But which portion of your program should disallow this? If I can
>>> identify that it will be much simpler for me to determine the flaw in
>>> core.logic's FD functionality. I've encountered bugs like this in the past
>>> - they almost always boil down to some subtle problem around logic var
>>> aliasing. We have a bunch of tests to check for this but it looks like
>>> you've come across a case I've missed.
>>>
>>> Thanks,
>>> David
>>>
>>>
>>>> The idea is that, say, (f 8 [2 3]) should give me all ways of putting
>>>> two sequences of ones (with sizes 2 and 3, in this order), separated by
>>>> some zeros, in an 8-length row.
>>>>
>>>> It is like solving a one-row nonogram. Then I just use it for all rows
>>>> and columns to make a full nonogram solver:
>>>>
>>>> http://github.com/maurolopes/nonogramsolver
>>>>
>>>> As I said, my program seems to be working now. I'm only giving you
>>>> context so it is easier to understand my code and debug core.logic.
>>>>
>>>  --
>>> 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/fjL-vGpwK6g/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 http://groups.google.com/group/minikanren.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>

-- 
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 http://groups.google.com/group/minikanren.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to