Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!decwrl!sun!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.prolog Subject: Re: Stupid Question about UNH Prolog Keywords: UNH,cut,tarsiers Message-ID: <606@quintus.UUCP> Date: 31 Oct 88 04:15:08 GMT References: <7505@well.UUCP> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 13 In article <7505@well.UUCP> jax@well.UUCP (Jack J. Woehr) reports that >foo(1). foo(2). foo(3). foobar(X,Y) :- foo(X), !, foo(Y). yields the answers (X,Y) = (3,3), (3,1), (3,2), (3,3), but that >goobar(X,Y) :- goo(X), !, goo(Y). goo(1). goo(2). goo(3). yields the answers (X,Y) = (1,1), (1,2), (1,3) and asks > Is UNH Prolog broken or am I? You should get the same answers from both. However, the "foo" version looks suspiciously as though there is an additional clause foo(3) at the front. Are you sure you tried this in an empty Prolog system? If starting a fresh copy of Prolog, entering those clauses, and verifying with the aid of listing/1 that those are the _only_ clauses for foo/1 and foobaz/2 produces the result claimed, there is indeed a mistake.