Bug#148926: Fwd: Re: [clisp-list] Bug Report: clisp eats whole memory
---------- Forwarded Message ----------
Subject: Re: [clisp-list] Bug Report: clisp eats whole memory
Date: 15 Jun 2002 13:14:39 -0400
From: Sam Steingold <sds@gnu.org>
To: Will Newton <will@misconception.org.uk>
Cc: clisp-list@lists.sourceforge.net
> * In message <E17JGfR-0008CF-00.2002-06-15-17-44-50@cmailg6.svr.pol.co.uk>
> * On the subject of "[clisp-list] Bug Report: clisp eats whole memory"
> * Sent on Sat, 15 Jun 2002 17:47:50 +0100
> * Honorable Will Newton <will@misconception.org.uk> writes:
>
> Reported via Debian BTS:
>
> Package: clisp
> Version: 1:2.27-0.5
> Severity: important
>
> Following sequence produce this effect:
> (jtms-init)
> (setq a (install-node 'a))
> (setq b (install-node 'b))
> (install-just a (list b))
this creates a circular structure which cannot be printed without
*print-circle* being set to T (since ANSI CL mandates the #S readable
format for the structure output).
*print-circle* is NIL initially as per the ANSI CL spec.
(setq *print-circle* t)
and try again - it will work.
> I found that this problem has something to do with push and defstruct.
> In harlequin lisp (lispworks) program worked without problems. When I
> replaced defstruct with defclass, problem disappeared in clisp too.
CLOS classes are not printed readably (as per the spec), so they can be
printed even without *print-circle* == T.
> -- System Information
> Debian Release: testing/unstable
> Architecture: i386
> Kernel: Linux pisidlo 2.2.20 #1 Sun Feb 24 20:26:35 CET 2002 i686
> Locale: LANG=cs_CZ, LC_CTYPE=cs_CZ
>
> Versions of packages clisp depends on:
> ii libc6 2.2.5-4 GNU C Library: Shared
> libraries an
> ii libncurses5 5.2.20020112a-7 Shared libraries for terminal
> hand
>
> --T4sUOijqQbZv57TR
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: attachment; filename="jtms.lsp"
>
>
> (defstruct node
> (index 0)
> (datum nil)
> (label 'out)
> (support nil)
> (justifications nil)
> (consequences nil)
> )
>
> (defstruct justification
> (index 0)
> in-list
> out-list
> consequence
> )
>
> (defvar *node-counter*)
> (defvar *just-counter*)
>
> (defun in-node? (node) (eq (node-label node) 'in))
>
> (defun out-node? (node) (eq (node-label node) 'out))
>
> (defun jtms-init ()
> (setq *node-counter* 0
> *just-counter* 0)
> )
>
> (defun install-node (datum)
> (let (node)
> (setq node (make-node :datum datum :index (incf *node-counter*)))
> ))
>
> (defun install-just (conseq in-supp &optional (out-supp nil))
> (let (just)
> (setq just (make-justification :index (incf *just-counter*)
>
> :in-list in-supp
> :out-list out-supp
> :consequence conseq))
>
> ; (setf (node-justifications conseq)
> ; (append (node-justifications conseq) just))
> (push just (node-justifications conseq))
> just
> ))
--
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Don't ascribe to malice what can be adequately explained by stupidity.
-------------------------------------------------------
--
To UNSUBSCRIBE, email to debian-qa-packages-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: