Re: Ann: SWI-Prolog 7.1.0

"Richard A. O'Keefe" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 8/12/2013, at 3:51 AM, Jan Wielemaker wrote:

> On 12/07/2013 12:11 PM, Paulo Moura wrote:
>> 
> 
> All you need is a compiler that decides at compile time that the clauses
> are mutually
> exclusive.

It's not quite that simple.
The clauses

	p(X, Y) :- write(boojum), X =:= Y.
	p(X, Y) :- write(snark),  X =\= Y.

are mutually exclusive, but p(1, 2) must write boojumsnark.

And of course

	p(a).
	p(b).

are mutually exclusive, but p(X) must still try both.

Indeed, the problem with indexing in Prolog has always
been "how do we handle variables in calls without an
exponential blowup?"  Functional language compilers have
it easy.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.