Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watdragon.UUCP Path: utzoo!watmath!watnot!watdragon!rggoebel From: rggoebel@watdragon.UUCP (Randy Goebel LPAIG) Newsgroups: net.lang.prolog Subject: Re: Standard behavior? Message-ID: <1020@watdragon.UUCP> Date: Sun, 25-May-86 23:16:30 EDT Article-I.D.: watdrago.1020 Posted: Sun May 25 23:16:30 1986 Date-Received: Mon, 26-May-86 06:33:24 EDT References: <980@watdragon.UUCP> <253@ubc-cs.UUCP> Organization: U of Waterloo, Ontario Lines: 24 > >> >Consider the following trivial predicate: > >> >a([]). > >> >a(_). > >> > > >> >Given the query :-a([]). , C-Prolog finds one match and UNSW Prolog finds two. > >> >Which is standard behavior? How do other implementations behave? > >------------- > >Hmmm. The reason for logic programming's existence is to dispense with > >guesses about what behaviour should be. The formulae assert that the > >individual constant named `[]' and everthing else (i.e., `_') is in the > >class named by the predicate `a'. If you believe that the anonymous variable > >is a universially quantified variable, then there are two resolution proofs > >of the query a([]). > > > >Implementors' treatment of `_' can produce non-standard behaviour; non-standard > >means not consistent with the logical interpretation. > > I have to disagree, Randy. The query merely asks whether or not > there is a proof of "a([])". Not how many there are. -------------------------------------------------------------------- There is nothing in my reply that says anything about what an implementation should do with such proofs (count them, print them, ignore them, etc.). All it says is that there are two proofs. If you ask for all proofs, then there had better be two. 8-).