RE: Explicit module scoping

From: Stefano Novello <stefano.novello_at_parc-technologies.com>
Date: Tue 28 Aug 2001 01:50:47 PM GMT
Message-ID: <0B9686DD2E83D411B67200508B9A9DA2459D25@LON-SRV2>
A counterexample. Two modules reference each other.
You cannot use use_module in both, but using : in the calls would work.

Which is one reason why the compiler should not
immediately load a module when it encouters it in
a ':' call.


tempest: cat > p.ecl
:- use_module(q).

:- export p/0.
p.
tempest: cat > q.ecl
:- use_module(p).
:- export q/0.
q.
tempest: eclipse
ECLiPSe Constraint Logic Programming System [kernel]
Copyright Imperial College London and ICL
Certain libraries copyright Parc Technologies Ltd
GMP library copyright Free Software Foundation
Version 5.2 #10, Tue Jun 26 02:14 2001
[eclipse 1]: [p].
system interface error: Too many open files in
open('/a/tempest/extra3/sn10/t/q.ecl', read, _22434)

*** compilation aborted
        before line 2 in the file /a/tempest/extra3/sn10/t/p.ecl

*** compilation aborted
        before line 2 in the file /a/tempest/extra3/sn10/t/q.ecl

*** compilation aborted
        before line 2 in the file /a/tempest/extra3/sn10/t/p.ecl

*** compilation aborted
        before line 2 in the file /a/tempest/extra3/sn10/t/q.ecl

*** compilation aborted
2nd Floor The Tower Building	EMAIL:
Stefano.Novello@parc-technologies.com
11 York Road                      TEL: +44 20 72614017
SE1 7NX LONDON                    FAX: +44 20 72614001

This e-mail message is for the sole use of the intended recipient(s) -
its contents are the property of Parc Technologies Limited (or its
licensors) and are confidential. Please do not copy, review, use (except
for the intended purposes), disclose or distribute the e-mail or its
contents or allow anyone else to do so without our prior permission. 
Parc Technologies Limited does not guarantee that this e-mail has not
been intercepted and amended nor that it is virus-free. You should carry
out your own virus checks before opening any attachment. Any opinions
expressed in this e-mail message are those of the author and not
necessarily Parc Technologies Limited.
Limited. 

 

-----Original Message-----
From: Warwick Harvey [mailto:wh@icparc.ic.ac.uk]
Sent: 28 August 2001 14:35
To: Joachim Schimpf
Cc: Andrew John Sadler; eclipse-bugs@icparc.ic.ac.uk
Subject: Re: Explicit module scoping


On Tue, Aug 28, 2001 at 01:59:29PM +0100, Joachim Schimpf wrote:
> Andrew John Sadler wrote:
> > and if it should (as it does), shouldn't the module expansion then
> > be done at run-time?
> 
> You are right, we could in pricinple turn the call into a metacall
> and do all the work at runtime. But I'd prefer not to have such
> a significant performance difference caused just by putting
> the :- lib(ic) in the wrong place. I'd rather stick to
> requiring declaration before use. Any opinions?

I don't think it's unreasonable to require the loading of a library to
be
textually before its first use in a file.  Unless somebody can think of
a
counter-example?

Cheers,
Warwick
Received on Tue Aug 28 14:50:32 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:09 PM GMT GMT