Article View: net.lang.prolog
Article #604Re: Standard behavior?
From: Jamie Andrews
Date: Mon, 12 May 1986 20:57
Date: Mon, 12 May 1986 20:57
20 lines
1349 bytes
1349 bytes
In article <6500005@uicsl> gooley@uicsl.UUCP writes:
>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?
It depends what you mean by "one match". I should think all Prolog
systems would just tell you that the query succeeds, since there are no free
variables to get bindings for in the query.
The standard reading of the predicate in FOL with identity would be
a(X) <- X = [] \/ X = X.
...which, given the standard computation algorithm, should probably give
two responses to the query
:-a(X).
... namely, X=[] and X=X.
--Jamie.
...!ihnp4!alberta!ubc-vision!ubc-cs!andrews
Technical Details
Message-ID:
<240@ubc-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!alberta!ubc-vision!ubc-cs!andrewsReferences:
<6500005@uicsl>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!alberta!ubc-vision!ubc-cs!andrews From: andrews@ubc-cs.UUCP (Jamie Andrews) Newsgroups: net.lang.prolog Subject: Re: Standard behavior? Message-ID: <240@ubc-cs.UUCP> Date: Mon, 12-May-86 16:57:35 EDT Article-I.D.: ubc-cs.240 Posted: Mon May 12 16:57:35 1986 Date-Received: Wed, 14-May-86 11:29:16 EDT References: <6500005@uicsl> Reply-To: andrews@ubc-cs.UUCP (Jamie Andrews) Organization: UBC Department of Computer Science, Vancouver, B.C., Canada Lines: 20