Number: 685
Date: 13-Apr-84 12':07':52
Submitter: Sannella.PA
Source: JonL.pa
Subject: FMEMB, FASSOC etc should error on non-NIL termination (e.g. using CAR/CDRERR)
Assigned To: Masinter
Attn: Release
Status: Open
In/By: Intermezzo
Problem Type: Design - Impl
Impact: Moderate
Difficulty:
Frequency: Everytime
Priority: Hopefully
System: Language Support
Subsystem: Other
Machine:
Disk:
Lisp Version:
Source Files:
Microcode Version:
Memory Size:
File Server:
Server Software Version:
Disposition: [I think this will be fixed when we can set CAR/CDRERR to T (or once). Is that a separate AR]'
["Sannella.PA" "28-Aug-84 10':00':13" Status':(Wish->Open) Description':]'
[lmm': I marked this as "Fixed" although it won''t be IN/BY until Intermezzo. ]'
["masinter" "11-Sep-84 14':21':54" Assigned% To': Attn': In/By': Disposition':]
Description: '
Date': 11 Apr 84 20':03 PST'
From': JonL.pa'
Subject': Lisp': Want FMEMB, FASSOC etc to err on non-NIL termination'
To': LispSupport.pa'
cc': JonL.pa'
'
Lisp System Date': 11-Apr-84 00':53':49'
Machine': Dorado (Ahwahnee)'
Microcode version': 24,4'
Memory size': 10000'
Frequency': Always'
Impact': Fatal ocasionally, Minor at other times'
'
The semantic distinction between FMEMB and MEMB should not be taken as meaningful -- FMEMB should run an error when its list''s termination is other than NIL. This could be assured if CAR/CDRERR being "on" were the standard case; and also this should apply to any of the "fast" functions which depend upon this unfortunate, pdp10-inspired speed hack.'
'
Currently FMEMB is taking CDR of the list without checking LISTP, and one can actually fall into an infinite loop; e.g., try'
(FMEMB 5 ''(1 2 . 3))'
which will loop indefinitely around the value "{cdr of non-list}"'
'
-----'
'
Date': 17 Jul 84 23':56 PDT'
From': masinter.pa'
Subject': Re': FMEMB loops forever in TypeInMethods'
In-reply-to': LispSupport.pa''s message of 17 Jul 84 14':52':05 PDT (Tuesday)'
To': LispSupport.pa'
cc': LoopsCore↑, Foster'
'
To make (FMEMB ''A ''B) cause an error'
'
(ADVISE ''\CDR.UFN ''(AND X (NLISTP X) (ERRORX (LIST 4 X]'
'
I''m going to put this in as an available option on CAR/CDR errors, to have (CAR non-list) return {garbage}, but make (CDR non-list) error.'
'
-----'
'
Date': 21 Aug 84 18':45 PDT'
From': JonL.pa'
Subject': Re': HISTORYSAVE calls (FMEMB ''ABORT "from event")'
In-reply-to': masinter.pa''s message of 21 Aug 84 13':07 PDT'
To': masinter.pa'
cc': lispsupport.pa'
'
More grist for the mill that says FMEMB should do a NLISTP check instead of a NULL check for termination. Semantics are still the same as the kludgy Interlisp-10 inspired definition; it just errors out rather than going into an infinite loop.'
'
-- JonL --'
'
-----'
'
Date': 21 Aug 84 20':15 PDT'
From': masinter.pa'
Subject': Re': HISTORYSAVE calls (FMEMB ''ABORT "from event")'
In-reply-to': JonL.pa''s message of 21 Aug 84 18':45 PDT'
To': JonL.pa'
cc': masinter.pa, lispsupport.pa'
'
I run with CAR/CDRERR=CDR; when this flag is set, (FMEMB x y) where y is non-list causes an error. From time to time I notice things that don''t work when an error is caused, and report them or fix them.'
'
'
Workaround:
Test Case:
Edit-By: masinter
Edit-Date: 11-Sep-84 14':21':56