From: Edward S. <esc...@ce...> - 2016-02-25 15:45:06
|
Sharing this with the mailing list. (The same problem occurs with findall and bagof.) -------- Forwarded Message -------- Subject: Re: [Yap-users] More fun problems! Date: Wed, 24 Feb 2016 19:49:22 -0500 From: Eyal Dechter <eya...@gm...> To: Edward Schwartz <esc...@ce...> Looks like a bug to me. Findall shouldn't leave choice points. Sent from my iPhone On Feb 24, 2016, at 6:39 PM, Edward Schwartz <esc...@ce... <mailto:esc...@ce...>> wrote: > > Yes. And bagof. > > > Sent from my T-Mobile 4G LTE Device > > > -------- Original message -------- > From: Eyal Dechter <eya...@gm... <mailto:eya...@gm...>> > Date: 2/24/2016 6:10 PM (GMT-05:00) > To: Edward Schwartz <esc...@ce... <mailto:esc...@ce...>> > Subject: Re: [Yap-users] More fun problems! > > Do you get the same behavior with findall? > > Sent from my iPhone > > > On Feb 24, 2016, at 4:37 PM, Edward Schwartz <esc...@ce... <mailto:esc...@ce...>> wrote: > > > > On 02/24/2016 04:35 PM, Edward Schwartz wrote: > > > > I forgot to include the query: > > > > certainInstanceCallsMethodSet(C,S). > > > >> Here is the problematic output: > >> ok > >> method(101) > >> method(101) > >> ok > >> method(101) > >> method(102) > >> ok > >> method(101) > >> method(103) > >> hey > >> _164154 > >> hey2 > >> method(101) > >> C = method(101), > >> S = [method(101),method(102),method(103)] ? ; > >> here we go > >> method(104) > >> done! > >> false. > >> > >> So the first rule is used to prove > >> certainInstanceCallsMethod(method(101), method(101)), > >> certainInstanceCallsMethod(method(101), method(102)), and > >> certainInstanceCallsMethod(method(101), method(103)). > >> > >> The second rule begins evaluating, but stops when it reaches > >> certainVFTableEntry. AFTER I hit semicolon some type of backtracking > >> occurs and the second rule finishes, proving > >> certainInstanceCallsMethod(method(101), method(104)). If I execute the > >> query again, all four methods are included in the resulting set. > >> > >> It's possible and even likely that certainVFTableEntry is recursing and > >> calling certainInstanceCallsMethod again; this is why we are using > >> tabling. Assuming I have rid my program of all coroutining, is this a > >> bug, or is it some type of expected behavior? In particular, why does > >> the backtracking happen outside of the setof()? > >> > >> Thanks again, > >> > >> 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 |