From: Vitor S. C. <vs...@gm...> - 2016-02-22 22:45:57
|
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...> 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...> > 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... >> 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... > https://lists.sourceforge.net/lists/listinfo/yap-users > > |