From p.singleton@keele.ac.uk  Fri Aug 18 19:01:55 2000
Received: from cmailg5.svr.pol.co.uk (cmailg5.svr.pol.co.uk [195.92.195.175])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id TAA16817
	for <prolog@swi.psy.uva.nl>; Fri, 18 Aug 2000 19:01:39 +0200 (MET DST)
Received: from modem4294967211.firearms.dialup.pol.co.uk ([195.92.2.213] helo=keele.ac.uk)
	by cmailg5.svr.pol.co.uk with esmtp (Exim 3.13 #0)
	id 13PpWe-0001IZ-00
	for prolog@swi.psy.uva.nl; Fri, 18 Aug 2000 18:01:48 +0100
Message-ID: <399D6B92.844E819A@keele.ac.uk>
Date: Fri, 18 Aug 2000 18:00:02 +0100
From: Paul Singleton <p.singleton@keele.ac.uk>
Organization: SmartArts Computing Consultancy
X-Mailer: Mozilla 4.74 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: SWI Prolog <prolog@swi.psy.uva.nl>
Subject: discovering a proc's definition module
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Can a module export a proc it imports?

Does

  ?- predicate_property(some_proc(_,_), imported_from(Module)).

always tell me the module in which some_proc/2 is actually *defined*?

If not, how do I:

 * discover the definition module of any accessible proc?

 * enumerate the procs defined in a given module?

(I can see how to: enumerate all modules; enumerate their exports;
enumerate all foreign libraries, the procs they provide, and the
modules in which they appear to provide them, but I'm missing something
w.r.t. native procedures.)

Paul Singleton

