gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Calling for top ten ANSI issues ...


From: Camm Maguire
Subject: Re: [Gcl-devel] Calling for top ten ANSI issues ...
Date: 22 Sep 2003 14:52:44 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

"Paul F. Dietz" <address@hidden> writes:

> Camm Maguire wrote:
> 
> > OK, this fix is simple if I understand from you correctly what is
> > supposed to happen -- :allow-other-keys is supposed to allow any other
> > garbage arguments of any type, not just other possibly unknown keyword
> > value pairs.  i.e. there is no assumption that keywordp will return
> > true on the arguments that follow.  Right?  Currently, I believe we
> > have the 'leftmost' behavior working, but only read allow-other keys
> > as allowing genuine keywordp-true keywords to pass.
> 
> Actually, there is no requirement that the 'keywords' be members
> of the KEYWORD type.  This lambda list syntax:
> 
>     (lambda (&key ((x y) 'default)) y)
> 
> specifies that the keyword symbol for the parameter is X, not :X.
> (See section 3.4.1.4, paragraph 2.)
> 
> IIRC, there's at least one test (of FLET?) that may be failing
> due to gcl not handling this.
> 

OK I think I've cleared these.  (haven't committed yet but hopefully
will shortly).

> 
> > [3.] As in the earlier email, the problem is with (float
> > most-positive-double-float 1.0s0), and I'm not sure what is supposed
> > to be returned here.  But apart from this, should we be printing Nans
> > and Infs?  Is there an ANSI format for these?
> 
> Change committed which makes this go away.
> 

Thanks!  But as to the question regarding nans and infs?

> 
> >>5. LOOP errors
> >>
> >>    These can probably be fixed by using the CMUCL or SBCL LOOP macro.
> > We are actually using a cmucl version currently from late 2002.  I
> > see
> > there have been recent updates, perhaps in response to your tests?
> > I'll try grabbing the latest, unless you tell me of a preferred
> > version.
> 
> The latest is good.  There have also been other bug fixes not caused
> by the tests (but I have added test cases for those.)
> 

OK, I've got the loop errors down to about 8  (haven't committed yet).

Remaining are of form:
Form: (LOOP
        CL-TEST::FOR
        CL-TEST::I
        CL-TEST::IN
        '(4 8 9 CL-TEST::A 13)
        WHEN
        (EQ CL-TEST::I 'CL-TEST::A)
        RETURN
        :GOOD
        CL-TEST::WHILE
        (< CL-TEST::I 12)
        CL-TEST::COLLECT
        CL-TEST::I)

which expand as

(macroexpand '(LOOP
        CL-TEST::FOR
        CL-TEST::I
        CL-TEST::IN
        '(4 8 9 CL-TEST::A 13)
        WHEN
        (EQ CL-TEST::I 'CL-TEST::A)
        RETURN
        :GOOD
        CL-TEST::WHILE
        (< CL-TEST::I 12)
        CL-TEST::COLLECT
        CL-TEST::I))

(BLOCK ()
  (LET ((CL-TEST::I NIL) (#:G4590 '(4 8 9 CL-TEST::A 13)))
    (DECLARE (TYPE LIST #:G4590))
    (ANSI-LOOP::WITH-LOOP-LIST-COLLECTION-HEAD (#:G4591 #:G4592)
      (ANSI-LOOP::LOOP-BODY NIL
          (NIL (ANSI-LOOP::LOOP-REALLY-DESETQ CL-TEST::I (CAR #:G4590))
               NIL
               (ANSI-LOOP::LOOP-REALLY-DESETQ #:G4590 (CDR #:G4590))
               (UNLESS (< CL-TEST::I 12) (GO ANSI-LOOP::END-LOOP)))
          ((IF (EQ CL-TEST::I 'CL-TEST::A) (RETURN-FROM () :GOOD))
           (ANSI-LOOP::LOOP-COLLECT-RPLACD (#:G4591 #:G4592)
               (LIST CL-TEST::I)))
          ((WHEN (ENDP #:G4590) (GO ANSI-LOOP::END-LOOP))
           (ANSI-LOOP::LOOP-REALLY-DESETQ CL-TEST::I (CAR #:G4590)) NIL
           (ANSI-LOOP::LOOP-REALLY-DESETQ #:G4590 (CDR #:G4590))
           (UNLESS (< CL-TEST::I 12) (GO ANSI-LOOP::END-LOOP)))
          ((RETURN-FROM () (ANSI-LOOP::LOOP-COLLECT-ANSWER #:G4591)))))))
T

>(macroexpand '(ANSI-LOOP::LOOP-BODY NIL
          (NIL (ANSI-LOOP::LOOP-REALLY-DESETQ CL-TEST::I (CAR #:G4590))
               NIL
               (ANSI-LOOP::LOOP-REALLY-DESETQ #:G4590 (CDR #:G4590))
               (UNLESS (< CL-TEST::I 12) (GO ANSI-LOOP::END-LOOP)))
          ((IF (EQ CL-TEST::I 'CL-TEST::A) (RETURN-FROM () :GOOD))
           (ANSI-LOOP::LOOP-COLLECT-RPLACD (#:G4591 #:G4592)
               (LIST CL-TEST::I)))
          ((WHEN (ENDP #:G4590) (GO ANSI-LOOP::END-LOOP))
           (ANSI-LOOP::LOOP-REALLY-DESETQ CL-TEST::I (CAR #:G4590)) NIL
           (ANSI-LOOP::LOOP-REALLY-DESETQ #:G4590 (CDR #:G4590))
           (UNLESS (< CL-TEST::I 12) (GO ANSI-LOOP::END-LOOP)))
          ((RETURN-FROM () (ANSI-LOOP::LOOP-COLLECT-ANSWER #:G4591)))))

(TAGBODY
  (ANSI-LOOP::LOOP-REALLY-DESETQ CL-TEST::I (CAR #:G4590))
  (ANSI-LOOP::LOOP-REALLY-DESETQ #:G4590 (CDR #:G4590))
  ANSI-LOOP::NEXT-LOOP
  (UNLESS (< CL-TEST::I 12) (GO ANSI-LOOP::END-LOOP))
  (IF (EQ CL-TEST::I 'CL-TEST::A) (RETURN-FROM () :GOOD))
  (ANSI-LOOP::LOOP-COLLECT-RPLACD (#:G4591 #:G4592) (LIST CL-TEST::I))
  (WHEN (ENDP #:G4590) (GO ANSI-LOOP::END-LOOP))
  (ANSI-LOOP::LOOP-REALLY-DESETQ CL-TEST::I (CAR #:G4590))
  (ANSI-LOOP::LOOP-REALLY-DESETQ #:G4590 (CDR #:G4590))
  (GO ANSI-LOOP::NEXT-LOOP)
  ANSI-LOOP::END-LOOP
  (RETURN-FROM () (ANSI-LOOP::LOOP-COLLECT-ANSWER #:G4591)))
T

>

Is this reordering a known failure with the existing cmucl loop macro?

Take care,


>       Paul
> 
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]