I thought about combining tabling and disequality and came up with the 
idea. Please, correct me, if it's completely wrong.

If I understand well, the problem with disequality is that master call of 
tabled goal can skip some answers due to it's constraints. 
Then the slave calls cannot observe these skipped answers even if they meet 
slave's constraints.

What if master call will produce all possible answers without looking at 
constraints ? Then each slave call, when it inspects the cache, checks that 
answer term satisfies slave's constraints. 
The master call should also check its constraints. It can do that in "fake" 
goal, that is added to the end of the original goal. 
This fake goal first checks that answer is not in cache, adding this answer 
to the cache if necessary (as in original implementation), and then checks 
master's constraints. 

понедельник, 3 июля 2017 г., 21:03:41 UTC+3 пользователь Evgenii Moiseenko 
написал:
>
> Hi everybody !
>
> I am curious about memoization in MiniKanren. I've read the corresponding 
> chapter in W.Byrd thesis. 
> But it's seems like the proposed solution is very restrictive, e.g. 
> disequality constraints isn't handled.
>
> I am very interesting in tabling since I am writing a relational 
> interpreter of some imperative language. The tabling helps a lot both with 
> convergence and with running time. 
> However, currently I use disequality constraints in several places. I 
> suspect that I get wrong results sometimes because of interaction of 
> tabling and disequality. 
>
> Is there any way to support constraints with tabling ? 
>

-- 
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