Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!uunet!allegra!alice!pereira
From: pereira@radish.research.att.com (Fernando Pereira)
Subject: Re: Novice prolog questions and thanks
In-Reply-To: tarau@IRO.UMontreal.CA's message of Sat, 11 Feb 1995 16:23:14 GMT
X-Nntp-Posting-Host: radish.research.att.com
Message-ID: <PEREIRA.95Feb12123604@radish.research.att.com>
Sender: usenet@research.att.com (netnews <9149-80593> 0112740)
Reply-To: pereira@research.att.com
Organization: AT&T Bell Laboratories
References: <Pine.SOL.3.91.950209143630.11319A-100000@bingsun1> <3hf9m4$grt@news.irisa.fr>
	<D3uG6r.B2q@IRO.UMontreal.CA>
Date: Sun, 12 Feb 1995 17:36:04 GMT
Lines: 40

In article <D3uG6r.B2q@IRO.UMontreal.CA> tarau@IRO.UMontreal.CA (Paul Tarau) writes:
   For systems featuring or having the ability to implement some
   form of linear implication (Lolli, LambdaProlog-MALI or BinProlog)
   you can avoid looping in graph traversal algorithms by `consuming'
   visited nodes through the use of linear implication ( -: in BinProlog,
   -o in Lolli ).
Can you explain why you decided to appropriate -: (and :- ) for linear
(reverse) implication, when there's the perfectly reasonable and
standard -o notation for it? The symbol :- has never stood for a
resource-sensitive connective in the history of Prolog. Won't the
appropriation cause confusion and code incompatibility?

   Here is a CUT & PASTE from the BinProlog 3.30 distribution (netsurf with Mosaic
   for file progs/lgraph.pl on ftp://clement.info.umoncton.ca/BinProlog):

   path(X,X,[X]).
   path(X,Z,[X|Xs]):-linked(X,Y),path(Y,Z,Xs).

   linked(X,Y):-c(X,Ys),member(Y,Ys).

   go(Xs):-
     c(1,[2,3]) -: c(2,[1,4]) -: c(3,[1,5]) -: c(4,[1,5]) -:
     path(1,5,Xs).

This will certainly confuse novices (and not so novices).  Most of the
program seems standard Prolog, but it depends crucially on the linear
interpretation of :-.

Trying out new logic programming ideas is good. Confusing matters by
using old names for the new ideas is not.

--
Fernando Pereira
2B-441, AT&T Bell Laboratories
600 Mountain Ave, PO Box 636
Murray Hill, NJ 07974-0636
pereira@research.att.com
1-908-582-3980


