From jan@swi.psy.uva.nl  Mon Aug 21 10:08:10 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id KAA25884;
	Mon, 21 Aug 2000 10:08:10 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id KAA02825;
	Mon, 21 Aug 2000 10:08:27 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: fred <gofreddo@ozemail.com.au>, prolog@swi.psy.uva.nl
Subject: Re: Why? What to do here?
Date: Mon, 21 Aug 2000 10:01:17 +0200
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <39A021F8.95C9F63C@ozemail.com.au>
In-Reply-To: <39A021F8.95C9F63C@ozemail.com.au>
MIME-Version: 1.0
Message-Id: <00082110082701.02738@gollem>
Content-Transfer-Encoding: 8bit

On Sun, 20 Aug 2000, fred wrote:
>Hi,
>
>Why is this happening? And what can be done to
>stop it happening?
>
>For SWI-Prolog Version 3.1.0
>?- clause( 2<3, P).
>
>No
>?-
>
>OK. Now try the same thing again
>For SWI-Prolog Version 3.3.8
>1 ?- clause( 2<3, P).
>ERROR: No permission to access private_procedure `(<)/2'
>2 ?-
>
>What is happening? Where is the
>documentation for 'private_procedure'?
>Where is any documentation relating to
>this behaviour?
>Can this unwanted behaviour be switched
>off? If so, how?
>
>This behaviour is killing interpreters written
>for 3.1.0!

It is ISO (or, at least my understanding thereof :-).
It is also not uncommon:

gollem (jan) 1_> sicstus
SICStus 3.7.1 (Linux-2.0.34-i686): Mon Oct 05 20:02:29 CEST 1998
Licensed to swi.psy.uva.nl
{consulting /swi40/jan/.sicstusrc...}
{/swi40/jan/.sicstusrc consulted, 0 msec 208 bytes}
| ?- clause( 2<3, P).
{PERMISSION ERROR: clause(user:(2<3),_42) - cannot access static user: < /2}
| ?- 

So, a correct interpreter in ISO looks like this:

solve((A,B)) :- !,
	solve(A),
	solve(B).
...
solve(Goal) :-
	catch(clause(Goal, Body), _, fail), !,
	solve(Body).
solve(Builtin) :-
	call(Builtin).

You can also use

...
solve(Builtin) :-
	predicate_property(Builtin, built_in), !,
	call(Builtin).
solve(Goal) :-
	clause(Goal, Body),
	solve(Body).

which I think is the most clean solution (nicely giving an
exception if an undefined predicate is encountered too :-)

	Regards --- Jan

