From jan@swi.psy.uva.nl  Wed May 10 14:57:47 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 OAA00119;
	Wed, 10 May 2000 14:57:47 +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 OAA22856;
	Wed, 10 May 2000 14:57:59 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: "Thiessen.D" <D.Thiessen@nlfb.de>,
        "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Subject: Re: Prolog-Variable "max_files"
Date: Wed, 10 May 2000 14:52:15 +0200
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <AD47E2B18130D311BA6600E02944BCBA42E510@exhann.nlfb.bgr.de>
In-Reply-To: <AD47E2B18130D311BA6600E02944BCBA42E510@exhann.nlfb.bgr.de>
MIME-Version: 1.0
Message-Id: <00051014575907.21111@gollem>
Content-Transfer-Encoding: 8bit

On Wed, 10 May 2000, Thiessen.D wrote:
>Dear Prolog-Expert,
>
>I have a Prolog program (running under Windows NT) that is trying to open 36
>files. Unfortunately I am getting an error message:
>
>Prolog initialisation failed:
>Cannot represent due to `max_files'Prolog initialisation failed:
>
>I tried to change the value of max_files in my program -  max_files=60 - but
>then I received the error message
>
>attempt to redefine a system predicate =:\2
>use :- redefine_system_predicate (+head) if this is intented].
>
>How can I determine the value of this variable. Also I would like to use
>this routine:
>(-redefine_system_predicate(+Head) 
>	This directive may be used both in module user and in normal modules
>to redefine any system predicate. If the system definition is redefined in
>module user, the new definition is the default definition for all
>sub-modules. Otherwise the redefinition is local to the module. The system
>definition remains in the module system. 
>	Redefining system predicate facilitates the definition of
>compatibility packages. Use in other context is discouraged. )
>
>but I do not know how.
>I would really appreciate any help!

Depends a little on the version.  Before 3.3, there was a maximum to
the number of open files in Prolog itself.  This has been removed
and if this error occurrs now, it is what Prolog gets back from the OS.
In this case, it might be a limit of the Windows-NT POSIX implementation
which is used by SWI-Prolog.

max_files is just the name of a representation limit, not something you
can set.

	Regards --- Jan

