Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!newsfeed.pitt.edu!uunet!in1.uu.net!allegra!alice!pereira
From: pereira@alta.research.att.com (Fernando Pereira)
Subject: Re: environment sizes
In-Reply-To: pgmart@godzilla.zeta.org.au's message of 25 Apr 1995 09:44:26 GMT
X-Nntp-Posting-Host: alta.research.att.com
Message-ID: <PEREIRA.95Apr26222916@alta.research.att.com>
Sender: usenet@research.att.com (netnews <9149-80593> 0112740)
Reply-To: pereira@research.att.com
Organization: AT&T Bell Laboratories
References: <3nig9q$nrp@godzilla.zeta.org.au>
Date: Thu, 27 Apr 1995 02:29:16 GMT
Lines: 26

In article <3nig9q$nrp@godzilla.zeta.org.au> pgmart@godzilla.zeta.org.au (pgmart) writes:
   This is a simple question involving memory quota allocation:
   In your experience as Prolog programmers, what is the largest number of
   variables you have ever used in one clause (env/frame), or that your
   particular system has handled efficiently?
   i.e. is a limit of 1000 too big or too small?
Too small. Although human-generated clauses with that many variables
are unlikely, they could well arise as the result of compiling some
other formalism into Prolog or program transformation. I had many
annoying problems with limits of that kind when compiling various
grammar formalisms into Prolog. In general, I do not favor any
limits not imposed by memory size or size of pointers. If you want to
limit the size of environments to keep env offsets small,
always have a compact encoding for small offsets, and an escape
mechanism for large offsets. Other possible reasons for liming env
size can be escaped in similar ways (efficient scheme for the small,
frequent case, less efficient one for the general case).
--
Fernando Pereira
2B-441, AT&T Bell Laboratories
600 Mountain Ave, PO Box 636
Murray Hill, NJ 07974-0636
pereira@research.att.com
1-908-582-3980


