From: Eyal D. <eya...@gm...> - 2016-02-23 15:07:28
|
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 > On Feb 23, 2016, at 9:26 AM, Edward Schwartz <esc...@ce...> wrote: > > Hi Vitor and Eyal, > > Thank you for responding. We don't use any cuts in our own code. We do > use clpfd; I'm not sure how that is implemented internally, and whether > it would cause problems with tabling. > > When I use start_low_level_trace, some of the progress right before > "why?" is printed is related to clpfd... which makes me think that might > be responsible. > > Does this seem like a possibility? > > Many thanks, > > Ed > >> On 02/22/2016 05:45 PM, Vitor Santos Costa wrote: >> hi Edward >> >> If you compile YAP under debug mode, there are two predicates >> >> :- start_low_level_trace. >> >> :- stop_low_level_trace. >> >> They will tell you all calls made. It is often a good idea to filter >> them by using grep or by narrowing. >> >> The second point may be looking at the final tables, that may help too. >> >> I'm forwarding this to Ricardo, he is the expert. >> >> Best >> >> Vitor >> >> On Mon, Feb 22, 2016 at 9:56 PM, Eyal Dechter <eya...@gm... >> <mailto:eya...@gm...>> wrote: >> >> HI Ed, there are all sorts of reasons this could print 'why?'. Its >> hard to say without knowing more about what your code does. If the >> code is pure, I'm not sure why this would happen, but otherwise it's >> not hard to come up with examples. For example: >> >> ?- [user]. >> % consulting user_input... >> c(X) :- nonvar(X), !, fail. >> | c(1). >> | c(2). >> | % consulted user_input in module user, 1 msec 0 bytes >> true. >> ?- forall(c(X), (c(X); writeln(why))). >> why >> why >> true. >> >> All any use of mutable variables, set_arg, asserta, or similar >> things can cause this. Not sure about tabling. >> >> Eyal >> >> On Mon, Feb 22, 2016 at 3:28 PM, Edward Schwartz <esc...@ce... >> <mailto:esc...@ce...>> wrote: >> >> Hi all, >> >> I am encountering another strange problem. It's difficult to >> reproduce >> in a small example, but should the following rule ever print "WHY?": >> >> testcase :- >> forall(foo(I, F, P, O, T, E, M), >> (foo(I, F, P, O, T, E, M); >> writeln('why?'))). >> >> Is it possible this is a bug relating to tabling (foo is >> tabled)? How >> can I debug this? >> >> Thanks, >> >> Ed >> >> ------------------------------------------------------------------------------ >> Site24x7 APM Insight: Get Deep Visibility into Application >> Performance >> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month >> Monitor end-to-end web transactions and take corrective actions now >> Troubleshoot faster and improve end-user experience. Signup Now! >> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 >> _______________________________________________ >> Yap-users mailing list >> Yap...@li... >> <mailto:Yap...@li...> >> https://lists.sourceforge.net/lists/listinfo/yap-users >> >> >> >> ------------------------------------------------------------------------------ >> Site24x7 APM Insight: Get Deep Visibility into Application Performance >> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month >> Monitor end-to-end web transactions and take corrective actions now >> Troubleshoot faster and improve end-user experience. Signup Now! >> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 >> _______________________________________________ >> Yap-users mailing list >> Yap...@li... <mailto:Yap...@li...> >> https://lists.sourceforge.net/lists/listinfo/yap-users >> >> |