Subject: Re: Prolog-Variable "max_files"

From: Jan Wielemaker <[email-masked]>
Date: Wed, 10 May 2000 14:52:15 +0200

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