From pmoura@noe.ubi.pt  Tue Jan 18 22:17:29 2000
Received: from fep01-svc.mail.telepac.pt (fep01-svc.mail.telepac.pt [194.65.5.200])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id WAA20845
	for <prolog@swi.psy.uva.nl>; Tue, 18 Jan 2000 22:17:27 +0100 (MET)
Received: from noe.ubi.pt ([194.65.202.50]) by fep01-svc.mail.telepac.pt
          (InterMail vM.4.01.02.27 201-229-119-110) with ESMTP
          id <20000118211903.REUC9428.fep01-svc.mail.telepac.pt@noe.ubi.pt>;
          Tue, 18 Jan 2000 21:19:03 +0000
Message-ID: <3884D86D.6074DB97@noe.ubi.pt>
Date: Tue, 18 Jan 2000 21:17:34 +0000
From: Paulo Moura <pmoura@noe.ubi.pt>
Reply-To: pmoura@noe.ubi.pt
Organization: University of Beira Interior, Portugal
X-Mailer: Mozilla 4.7 (Macintosh; I; PPC)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Paul Singleton <p.singleton@keele.ac.uk>
CC: SWI Prolog <prolog@swi.psy.uva.nl>
Subject: Re: [Fwd: abolish/1 in 3.3.0]
References: <3884CB89.A930796C@keele.ac.uk>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by swi.psy.uva.nl id WAA20845


Paul Singleton wrote:
> 
> Paulo Moura wrote:
> 
> > Paul Singleton wrote:
> 
> > > I'm puzzled by the following, which didn't happen in 3.2.8:
> > >
> > >   ?- abolish( qp_vno_to_builtins_lib/2).
> > >   ERROR: No permission to modify static_procedure
> > > `qp_vno_to_builtins_lib/2'
> > >
> > >   ?- listing(qp_vno_to_builtins_lib).
> > >   ERROR: No permission to access private_procedure
> > > `qp_vno_to_builtins_lib/2'
> > >
> > >   ?- predicate_property( qp_vno_to_builtins_lib(_,_), P).
> > >   P = interpreted ;
> > >   P = indexed(qp_vno_to_builtins_lib(1, 0)) ;
> > >   P = file('d:/pcm/bin/pcm_2000/54.pl') ;
> > >   P = line_count(22394) ;
> > >   P = hashed(4) ;
> > >   P = number_of_clauses(7) ;
> > >   No
> > >   ?-
> > >
> > > I don't need to do 'listing' but I really need to be able to
> > > abolish interpreted procedures.  Can anyone shed any light on
> > > this?
> 
> > Including the following directive in your source file will solve the problem:
> >
> >         :- dynamic(qp_vno_to_builtins_lib/2).
> 
> Yes, but this is not a dynamic procedure, it's just a regular
> consulted procedure, and I want to abolish it!

In the ISO Prolog Standard, procedures are either static or dynamic.
Dynamic procedures must be declared using the dynamic/1 directive. The
declaration is implicit when we assert a clause for a previously unknwn
predicate. The abolish/1 predicate is meant to retract dynamic
predicates. Note however that the standard does not forbids an
implementation of the abolish/1 predicate capable of also abolishing
static procedures. 

Regards,

Paulo


-----------------------------------------------------------
Paulo Jorge Lopes de Moura
Dep. of Mathematics and Informatics   Office 4.32 Ext. 3251
University of Beira Interior          Phone: +351 275319700
6200 Covilhã                          Fax:   +351 275319732
Portugal

mailto:pmoura@noe.ubi.pt
http://www.ci.uc.pt/logtalk/pmoura.html
-----------------------------------------------------------

