Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.prolog Subject: Re: :- deterministic (not HP Prolog, but Trilogy) Message-ID: <906@cresswell.quintus.UUCP> Date: 27 Apr 88 18:49:23 GMT References: <900@cresswell.quintus.UUCP> <2217@ubc-cs.UUCP> Organization: Quintus Computer Systems, Mountain View, CA Lines: 32 Keywords: Deterministic predicates and also Cuts In article <2217@ubc-cs.UUCP>, voda@ubc-cs (Paul Voda) writes: > I do not know how the deterministic predicates are implemented in HP-Prolog, > but I do know what they are in Trilogy. Maybe this will help. Not really. Trilogy is a logic programming language which makes no pretence of being Prolog. (In some ways it resembles ALEPH, except that it is a lot purer.) Trilogy is allowed to reject programs as invalid based on a data flow analysis; Prolog systems are not. The HP-Prolog manual I have a (partial) copy of does not mention any restriction on :-deterministic predicates at all, and as it is an incremental system, I doubt that it is doing much data-flow analysis. > I have written a paper on the one solution construct which I will > mail to all interested parties on request. The title is: > > The Logical Reconstruction of Cuts as One Solution Operators. I have received a copy of this. It's a nice paper, but it makes me even more unhappy with cuts than ever. There is a question: how often do we really need the _control_ component to say "commit to the first solution" rather than "commit to any solution"? Consider the contrast between member(X, [H|T]) <-> X = H | member(X, T) member1(X, L) <-> first member(X, L) -vs- member1(X, [H|T]) <-> X = H | X ~= H & member1(X, T) -or- member1(X, [H|T]) <-> if X = H then true else member1(X, T) [if-then-else being sound as in NU Prolog]. It would be really interesting to see some sketches of how people are using once(Goal), [! Goal !], or (Goal->true) {all the same thing}.