🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2655

Re: compare/3 problem

#2655
From: Alain Callebaut
Date: Fri, 24 Apr 1987 08:44
23 lines
1319 bytes
> become globalized. Try the following program on your favourite
> WAM-based Prolog:
> 
>         test :- foo(X), bar(X).
>         foo(X) :- compare(Z,Y,X), compare(Z,Y,X).
>         bar(_).
> 
> The query "?- test." should preferably succeed. (It didn't on one
> of the commercially available, widely popular Prologs we tried :-)
> 
> The obvious fix is to let compare/3 globalize variables.

I tried this on my favourite WAM-based Prolog (which is BIM-Prolog).
As you prefer, "?- test." did SUCCEED.
Perhaps you can also try the following program :

	test :-  write(_x), write(_x) .

Now, "?- test." should write twice the same numbered variable.
(In BIM-Prolog it does.)

So, should write/1 (and many others) also globalizLveritar(,Y,e
Technical Details
Message-ID: <765@kulcs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!prlb2!kulcs!alain

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!prlb2!kulcs!alain
From: alain@kulcs.UUCP (Alain Callebaut)
Newsgroups: comp.lang.prolog
Subject: Re: compare/3 problem
Message-ID: <765@kulcs.UUCP>
Date: Fri, 24-Apr-87 04:44:36 EDT
Article-I.D.: kulcs.765
Posted: Fri Apr 24 04:44:36 1987
Date-Received: Sun, 26-Apr-87 04:50:34 EDT
Sender: root@kulcs.UUCP
Reply-To: alain@kulcs.UUCP (Alain Callebaut)
Distribution: world
Organization: Dep. of Computer Science, Katholieke Universiteit Leuven
Lines: 23