From: Vitor S. C. <vs...@gm...> - 2016-02-24 09:47:59
|
That is correct, and Ricardo and I were talking about the need to improve the tabling docs yesterday. There are a number of very usefuk features that are not documented yet. there are two problems with tabling constraints,IMHO The first is the attribute vars. Shouldn't be so hard. The second is something like :- table a/2. X in 1..5, x \== Y, Y in 1..5, b(X) X in 1..5, x \== Y, Y in 1..5, Z \== Y, b(y), Z = 3 What should we table? Y depends on X (and Z) One solution would be to tablethe whole graph, but tabling is about repeating, so I don't see this helping. You can also table graph fragments (sat) I don't remember how far xsb went in their work, I think a general solution is maybe very hard, so the programmer has to take charge. So I'd suggest start withprojecting the constraints out before you table, so that you only table what you want and can table. Hope this helps Vitor On Wed, 24 Feb 2016 at 04:01, Eyal Dechter <eya...@gm...> wrote: > Yes, they are incompatible. What "coroutining" is is not documented very > well, but in section 1.1 there is the following > > " > > - --enable-coroutining=yes gives you support for coroutining, > including freezing of goals, attributed variables, and constraints. This > will also enable support for infinite rational trees. > > " > > XSB Prolog according to its manual supports tabling with attributed > variables, so it would be even nicer if this could be ported to YAP. > > Eyal > > On Tue, Feb 23, 2016 at 6:11 PM, Edward Schwartz <esc...@ce...> > wrote: > >> On 02/23/2016 10:07 AM, Eyal Dechter wrote: >> > Clpfd is implemented using attributed variables, I think, so I think >> you'll have the same problem you did with diff/2. >> > >> > Sent from my iPhone >> >> Looking at the source code, clpfd does use attributed variables. I take >> it then that attributed variables and tabling are incompatible? Are >> attributed variables considered part of coroutining? >> >> In any case, it would be very nice if such cases could raise an error >> instead of having unexpected behavior for us novice users! >> >> Best, >> >> Ed >> > > |