Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!att!ucbvax!hplabs!well!jax From: jax@well.UUCP (Jack J. Woehr) Newsgroups: comp.lang.prolog Subject: Stupid Question about UNH Prolog Summary: confused(jax) :- unh,!. Keywords: UNH,cut,tarsiers Message-ID: <7505@well.UUCP> Date: 30 Oct 88 03:56:18 GMT Reply-To: jax@well.UUCP (Jack J. Woehr) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 46 ok, forgive me for being stupid. In UNH Prolog, I consult the following: /* cuttest.pro ... learning about the behaviour of the database and cuts. */ foo(1). foo(2). foo(3). foobar(X,Y) :- foo(X),!,foo(Y). Then the query ?- foobar(X,Y). returns four answers; (3,3) (3,1) (3,2) and (3,3) in that order. On the other hand, the file: /* cuttest2.pro ... learning about the behaviour of the database and cuts. */ goobar(X,Y) :- goo(X),!,goo(Y). goo(1). goo(2). goo(3). behaves as I expected the first one to do, returning three answers: (1,1) (1,2) (1,3) to the query ?- goobar(X,Y). Is UNH Prolog broken or am I? {}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{} {} {} {} jax@well ." Sysop, Realtime Control and Forth Board" {} {} jax@chariot ." (303) 278-0364 300/1200 8-n-1 24 hrs." {} {} JAX on GEnie ." Tell them JAX sent you!" {} {} {} {}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}