From: am (Antonio Leitao)

Subject: Allegro 4.1 Bug?

Date: 1996-3-18 6:07

Is this a bug?
********************************************************************
Allegro CL 4.1 [SPARC; R1] (10/20/93 16:00)
Copyright (C) 1985-1992, Franz Inc., Berkeley, CA, USA.  All Rights Reserved.
;; Optimization settings: safety 1, space 1, speed 1, debug 2
;; For a complete description of all compiler switches given the current
;; optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS).
USER(1): '(setf . x)
(SETF . X)
USER(2): '((setf . x))
Error: Attempt to take the car of X which is not a cons.
  [condition type: SIMPLE-ERROR]
[1] USER(3): :zo
Evaluation stack:

   (ERROR SIMPLE-ERROR :FORMAT-CONTROL ...)
 ->(FBOUNDP (SETF . X))
   (FORMAT #<EXCL::XP-STREAM @ #x105e51e> #(# #) ...)
#<unprintable object @ #x1156701>   (WRITE ' :STREAM ...)
#<unprintable object @ #x1156701>   (WRITE-TO-STRING ')
   (TPL:TOP-LEVEL-READ-EVAL-PRINT-LOOP)
   (TPL:START-INTERACTIVE-TOP-LEVEL
      #<EXCL::BIDIRECTIONAL-TERMINAL-STREAM @ #x7c9bae>
      #<Function TOP-LEVEL-READ-EVAL-PRINT-LOOP @ #x7d208e> ...)
[1] USER(4): 
********************************************************************
You shouldn't feel very bad because cmucl has the very same bug, and
it shows up much sooner:

CMU Common Lisp 17f, running on plutao
Send bug reports and questions to your local CMU CL maintainer, or to
<cs.cmu.edu. at cmucl-bugs>
Loaded subsystems:
    Python 1.0, target SPARCstation/Solaris 2
    CLOS based on PCL version:  September 16 92 PCL (f)
    CLX X Library MIT R5.02
    Motif toolkit and graphical debugger 1.0
    Hemlock 3.5
* '(setf . x)


Type-error in KERNEL::OBJECT-NOT-LIST-ERROR-HANDLER:  X is not of type LIST

Restarts:
  0: [ABORT] Return to Top-Level.

Debug  (type H for help)

(LENGTH #<error printing object>)
0] back

0: (LENGTH #<error printing object>)
1: (#:WITH-PRETTY-STREAM-6 #<pretty stream {07007235}>)
2: (PRETTY-PRINT::PPRINT-SETQ #<pretty stream {07007235}>
                              #<error printing object>)
3: (PRETTY-PRINT::OUTPUT-PRETTY-OBJECT #<error printing object>
                                       #<Synonym Stream to SYSTEM:*STDOUT*>)
4: (PRIN1 #<error printing object> NIL)
5: (COMMON-LISP::%TOP-LEVEL)
6: (COMMON-LISP::RESTART-LISP)
0] 

********************************************************************
In GCL, everything is OK:

GCL (GNU Common Lisp)  Version(2.2) Thu Oct 12 17:29:59 MET 1995
Licensed under GNU Public Library License
Contains Enhancements by W. Schelter

>'(setf . x)
(SETF . X)
>'((setf . x))
((SETF . X))
>
********************************************************************* I was writing a lisp pattern-matcher where patterns like (setf . ?vars&vals) are used in rules when the bug showed up. It just can't print those rules. This makes debugging very hard. Is there any workaround? Thanks. Antonio Leitao.