From: Eyal D. <eya...@gm...> - 2016-02-22 21:56:37
|
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 > |