Thread View: net.lang.prolog
1 messages
1 total messages
Started by Chris Moss
Fri, 22 Aug 1986 09:53
Re: Dave Plummer's bagof query
Author: Chris Moss
Date: Fri, 22 Aug 1986 09:53
Date: Fri, 22 Aug 1986 09:53
33 lines
1436 bytes
1436 bytes
>>Date: Wed 6 Aug 86 14:38:43-CDT >>From: Dave Plummer <ATP.PLUMMER@R20.UTEXAS.EDU> >>Subject: DEC-10 Bagof - Bug? >> >>Given the program: >> >>p(1,_). p(2,_). p(3,3). p(4,4). >> >>and the goal bagof(X, p(X,Y), S). Edinburgh DEC-10 Prolog >>returns, >> >>S = [1,2,3] X = _ Y = 3 >>S = [4] X = _ Y = 4 >> >>This behaviour doesn't agree with my reading of the >>documentation Poplog produces the solutions: S=[4] X =_1 Y=4 S=[3] X =_1 Y=3 S=[1,2] X=_1 Y=_2 which is _slightly_ more consistent. The problem has been dealt with in: Lee Naish: All solutions predicates in Prolog. Tech Report 84/4, Dept of Comp. Sc., Univ of Melbourne. (it's been published I think, but I forget where) He has a 'hard-line' solution which involves coroutining and never returning variables if they can be subsequently bound. Chris Moss. cdsm@doc.ic.ac.uk cdsm@icdoc.uucp
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads