Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviewed all the issues; Added a few comments for review. #1

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b4bf461
wscl-issues: Add issue SLOT-VALUE-MISSING-SETF
scymtym Jun 21, 2021
fa0a5f4
wscl-issues: Initial notes for DEFPARAMETER-NON-TOPLEVEL-SEMANTICS
scymtym Jun 21, 2021
d82a82f
wscl-issues: Minor improvements in DEFPARAMETER-NON-TOPLEVEL-SEMANTICS
scymtym Jun 21, 2021
ecaabb0
wscl-issues: Add issue ADJUST-ARRAY-DISPLACED-TO-CONSTRAINTS
scymtym Jul 11, 2021
69dea02
New issue suggesting AREF should signal a TYPE-ERROR.
robert-strandh Jul 11, 2021
df8c829
Supply more text as a result of reading the proposed format.
robert-strandh Jul 12, 2021
e1df77c
Update edit history.
robert-strandh Jul 12, 2021
ec4f12d
New issue suggesting AREF should signal a TYPE-ERROR for incorrect rank.
robert-strandh Jul 12, 2021
8781cf8
Add behavior for ECL.
robert-strandh Jul 12, 2021
a786fbb
Add discussion item.
robert-strandh Jul 12, 2021
27d02d3
Add more implementations.
robert-strandh Jul 12, 2021
95b2eaf
New issue concerning invalid idices to AREF.
robert-strandh Jul 13, 2021
cf2e681
New issue suggesting digit-char-p should signal a TYPE-ERROR.
robert-strandh Jul 14, 2021
16c2aaa
wscl-issues: Fix reference to ADJUST-ARRAY-DISPLACEMENT in ADJUST-ARR…
scymtym Jul 14, 2021
f8aa765
wscl-issues: Fix typo in DIGIT-CHAR-P-TYPE-ERROR
scymtym Jul 14, 2021
3d8968f
Suggest that MAKE-STRING-INPUT-STREAM should signal an error.
robert-strandh Jul 15, 2021
ed390f7
Merge branch 'main' of github.com:s-expressionists/wscl into main
robert-strandh Jul 15, 2021
a89b792
Copy in some Cliki issues
Bike Jul 15, 2021
2106ee4
Reformat cliki issues
Bike Jul 15, 2021
58f3d6d
Merge branch 'cliki'
Bike Jul 15, 2021
bbd76da
Initial copy of cliki issue relating to compiler macros
Bike Jul 15, 2021
f3fe835
Reformat define-compiler-macro-implicit-block
Bike Jul 15, 2021
5ea6f5c
add implementation note on cmacro issue
Bike Jul 15, 2021
f876e2a
Suggest that CHAR should signal an error.
robert-strandh Jul 16, 2021
6f46dee
Merge branch 'main' of github.com:s-expressionists/wscl into main
robert-strandh Jul 16, 2021
80b07db
Make the isse also about SCHAR.
robert-strandh Jul 17, 2021
3eac4f9
wscl-issues: Fix unmatched parentheses in AREF-ACCESSOR-DIMENSION-ERROR
scymtym Jul 17, 2021
ec9e94f
wscl-issues: Fix unmatched parentheses in AREF-ACCESSOR-RANK-ERROR
scymtym Jul 17, 2021
1e0337b
wscl-issues: Add reference to SCHAR in CHAR-TYPE-ERROR
scymtym Jul 17, 2021
0604e8f
wscl-issues: Add markup for operators in DEFINE-COMPILER-MACRO-DECLINE
scymtym Jul 17, 2021
d057e3a
wscl-issues: Add missing closing " in MAKE-STRING-INPUT-STREAM-TYPE-E…
scymtym Jul 17, 2021
1efbf2b
wscl-issues: Add markup for operators in PROG2-RETURN-VALUE
scymtym Jul 17, 2021
d889561
wscl-issues: Add markup for operators in STANDARDIZED-RESTART-NAMES
scymtym Jul 17, 2021
7af0e10
Simplify section Current Practice, and provide more implementations.
robert-strandh Jul 17, 2021
b454356
Merge branch 'main' of github.com:s-expressionists/wscl into main
robert-strandh Jul 17, 2021
36528e7
Suggest that MAPHASH should signal an error.
robert-strandh Jul 18, 2021
3899370
Suggest that CLRHASH should signal an error.
robert-strandh Jul 18, 2021
45163a4
Suggest that REMHASH should signal an error.
robert-strandh Jul 19, 2021
f221ecc
Supply missing argument to test cases.
robert-strandh Jul 19, 2021
291fe33
Suggest that GETHASH should signal an error.
robert-strandh Jul 19, 2021
e133b55
Suggest that HASH-TABLE-COUNT should signal an error.
robert-strandh Jul 20, 2021
8f2ce1b
Suggest that CELL-ERROR-NAME should signal an error.
robert-strandh Jul 20, 2021
b9692a0
Suggest that TYPE-ERROR-DATUM should signal an error.
robert-strandh Jul 21, 2021
209f6ac
Suggest that TYPE-ERROR-EXPECTED-TYPE should signal an error.
robert-strandh Jul 21, 2021
f8772fd
Suggest that PACKAGE-ERROR-PACKAGE should signal an error.
robert-strandh Jul 22, 2021
641c5dd
Suggest that STREAM-ERROR-STREAM should signal an error.
robert-strandh Jul 22, 2021
da6b044
wscl-issues: Improve markup in VALUES-&ALLOW-OTHER-keys
scymtym Jul 22, 2021
53e3c22
wscl-issues: Improve markup in CELL-ERROR-NAME-TYPE-ERROR
scymtym Jul 22, 2021
39f9eaa
wscl-issues: Improve markup in CLRHASH-TYPE-ERROR
scymtym Jul 22, 2021
6cde9ae
wscl-issues: Improve markup in GETHASH-TYPE-ERROR
scymtym Jul 22, 2021
aa4a07f
wscl-issues: Improve markup in HASH-TABLE-COUNT-TYPE-ERROR
scymtym Jul 22, 2021
07e6863
wscl-issues: Improve markup in MAPHASH-TYPE-ERROR
scymtym Jul 22, 2021
c621c88
wscl-issues: Improve markup in REMHASH-TYPE-ERROR
scymtym Jul 22, 2021
96d3bf6
wscl-issues: Improve markup in TYPE-ERROR-DATUM-TYPE-ERROR
scymtym Jul 22, 2021
291bc13
wscl-issues: Improve markup in TYPE-ERROR-EXPECTED-TYPE-TYPE-ERROR
scymtym Jul 22, 2021
b23f8d8
wscl-issues: Improve markup in CHAR-TYPE-ERROR
scymtym Jul 22, 2021
949f306
wscl-issues: Improve markup in PACKAGE-ERROR-PACKAGE-TYPE-ERROR
scymtym Jul 22, 2021
84dd261
wscl-issues: Improve markup in STREAM-ERROR-STREAM-TYPE-ERROR
scymtym Jul 22, 2021
e41e419
Suggest fixing incorrect terminology in USE-PACKAGE specification.
robert-strandh Jul 23, 2021
1b663ed
Merge branch 'main' of github.com:s-expressionists/wscl into main
robert-strandh Jul 23, 2021
50312c8
Improve markup.
robert-strandh Jul 23, 2021
88635aa
Suggest that EXPORT should signal an error.
robert-strandh Jul 24, 2021
19d91fe
Suggest that IMPORT should signal an error.
robert-strandh Jul 24, 2021
872f14e
Suggest that SHADOW should signal an error.
robert-strandh Jul 25, 2021
bedac31
ARITHMETIC-ERROR-OPERANDS/OPERATION should signal a type error.
robert-strandh Jul 26, 2021
8744cc1
Suggest that UNEXPORT should signal type errors.
robert-strandh Jul 28, 2021
557b620
Suggest that UNINTERN should signal type errors.
robert-strandh Jul 29, 2021
84d2d51
Fix incorrect dates for version 1.
robert-strandh Jul 29, 2021
93424a0
Suggest that FIND-SYMBOL should signal type errors.
robert-strandh Jul 31, 2021
123a632
Suggest that FIND-PACKAGE should signal type errors.
robert-strandh Aug 1, 2021
baf000f
Added default value for displaced-to.
informatimago Aug 1, 2021
12001ca
Added discussion paragraph.
informatimago Aug 1, 2021
ea7ec2b
Added discussion paragraph about test cases.
informatimago Aug 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions wscl-issues/proposed/adjust-array-displaced-to-constraints
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
Issue: ADJUST-ARRAY-DISPLACED-TO-CONSTRAINTS
Forum: Cleanup
Category: CLARIFICATION
Status: proposed
Edit History: 11-Jul-21, Version 1 by Jan Moringen,
References: ADJUST-ARRAY
Related Issues: ADJUST-ARRAY-DISPLACEMENT

Problem Description:

In the draft ANSI Common Lisp specification, the description of
ADJUST-ARRAY states that :initial-element and :initial-contents must
not be supplied if :displaced-to is supplied and
displaced-index-offset may be supplied only if displaced-to is
supplied.

Douglas Katzman notes two problems with this:

1. :DISPLACED-TO could be given as NIL which almost surely should
not allow :DISPLACED-INDEX-OFFSET to be supplied.

2. Similarly there is a problem with "initial-elements and
initial-contents must not be supplied if displaced-to is
supplied." because that would forbid ":initial-element 'foo
:displaced-to nil" which we have always allowed.

Also:

3. no default value is specified for :DISPLACED-TO.

Proposal (ADJUST-ARRAY-DISPLACED-TO-CONSTRAINTS:ALLOW-NIL):

This proposal changes the description of ADJUST-ARRAY so that
:displaced-to nil results in the same constraints on
:initial-element, :initial-content and :displaced-index-offset as
:displaced-to not being supplied. The individual proposed changes
to the description of ADJUST-ARRAY are:

0. Change the sentence
"displaced-to---an array or nil. initial-elements and initial-contents must not be supplied if displaced-to is an array."
to "displaced-to---an array or nil. initial-elements and initial-contents must not be supplied if displaced-to is an array. The default is nil."

1. Change the sentence "Initial-element must not be supplied if
either initial-contents or displaced-to is supplied." to
"Initial-element must not be supplied if either initial-contents
is supplied or a non-nil displaced-to is supplied.".

2. Change the sentence "initial-contents must not be supplied if
either initial-element or displaced-to is given." to
"initial-contents must not be supplied if either initial-element
is given or a non-nil displaced-to is given.".

3. Change the sentence "displaced-index-offset may be supplied only
if displaced-to is supplied." to "displaced-index-offset may be
supplied only if a non-nil displaced-to is supplied."

4. Add the following sentence at the end of the "Exceptional
Situations" section: "An error of type error is signaled if
displaced-index-offset is supplied but displaced-to is either not
supplied or nil."

Test Cases:

(defun one ()
(adjust-array (make-array 3 :initial-element 1 :adjustable t) 4
:displaced-to nil :initial-element 2))
(one) => #(1 1 1 2)

(defun two ()
(adjust-array (make-array 3 :initial-element 1 :adjustable t) 4
:displaced-to nil :initial-contents '(2 2 2 2)))
(two) => #(2 2 2 2)

(defun three ()
(adjust-array (make-array 3 :initial-element 1 :adjustable t) 4
:displaced-to nil :displaced-index-offset 1))
(three) => ERROR: :displaced-index-offset must not be supplied when
:displaced-to nil is supplied.

Rationale:

ADJUST-ARRAY-DISPLACEMENT states "Note: Omitting the :DISPLACED-TO
argument to ADJUST-ARRAY is equivalent to specifying :DISPLACED-TO
NIL; in either case, the array is not displaced after the call ..."
so the behavior described in ALLOW-NIL was intended but not
specified precisely enough.

Current Practice:

SBCL 2.1.1
(one) => #(1 1 1 2)
(two) => #(2 2 2 2)
(three) => #(1 1 1 0) ; not conforming under ALLOW-NIL

Cost to Implementors:

TODO

Cost to Users:

TODO

Cost of non-adoption:

TODO

Benefits:

TODO

Aesthetics:

TODO

Discussion:

TODO
88 changes: 88 additions & 0 deletions wscl-issues/proposed/aref-accessor-dimension-error
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
Issue: AREF-ACCESSOR-DIMENSION-ERROR
Forum: Cleanup
Category: CLARIFICATION
Status: proposed
Edit History: 13-Jul-21, Version 1 by Robert Strandh.
17-Jul-21, Version 2 by Robert Strandh.
References: AREF

Problem Description:

In the draft ANSI Common Lisp specification, the description of
the accessor AREF indicates no exceptional situations.

It is therefore unclear what the behavior should be if AREF were
given an invalid index for one of the dimensions of the array given
as an argument.

Proposal (AREF-ACCESSOR-DIMENSION-ERROR:SIGNAL-ERROR-IN-SAFE-CODE):

This proposal changes the description of the AREF accessor, so that
the section "Exceptional Situations" contains the following text:

"The accessor AREF should signal an error of type TYPE-ERROR if one
of the indices given is invalid for the array passed as an
argument."

Test Cases:

(defun one (object)
(declare (optimize (safety 3)))
(aref object 1))

(one (make-array 1 :initial-element nil)) =>
ERROR: Invalid index 1 for array #(nil).

(defun two (object)
(declare (optimize (safety 3)))
(setf (aref object 1) 345))

(two (make-array 1 :initial-element nil)) =>
ERROR: Invalid index 1 for array #(nil).

Rationale:

We think it was a simple omission from the draft ANSI specification
to not specify the behavior in this situation.

Current Practice:

The following implementations signal a type error:
SBCL, ABCL, ECL, CLISP, Clasp

The following implementations signal a simple error:
CCL, CMUCL

TODO: Check other implementations, in particular Allegro and
LispWorks.

Cost to Implementors:

Very small. We believe that most implementations are already
signaling an error in safe code. Some implementations may signal a
simple error, and those implementation would need to signal a
type-error instead.

Cost to Users:

None.

Cost of non-adoption:

Application programmers may need to add numerous
explicit checks to be certain that their code
is conforming.

Benefits:

Application programmers may rely on an error being
signaled in safe code, and thus avoid having to
add explicit checks in portable code.

Aesthetics:

No influence.

Discussion:

TODO
84 changes: 84 additions & 0 deletions wscl-issues/proposed/aref-accessor-rank-error
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
Issue: AREF-ACCESSOR-RANK-ERROR
Forum: Cleanup
Category: CLARIFICATION
Status: proposed
Edit History: 12-Jul-21, Version 1 by Robert Strandh.
References: AREF

Problem Description:

In the draft ANSI Common Lisp specification, the description of
the accessor AREF indicates no exceptional situations.

It is therefore unclear what the behavior should be if AREF were
given a number of indices that is not that of the rank of the
array given as an argument.

Proposal (AREF-ACCESSOR-RANK-ERROR:SIGNAL-ERROR-IN-SAFE-CODE):

This proposal changes the description of the AREF accessor, so that
the section "Exceptional Situations" contains the following text:

"The accessor AREF should signal an error of type TYPE-ERROR if the
number of indices given is different from the rank of the array
passed as an argument."

Test Cases:

(defun one (object)
(declare (optimize (safety 3)))
(aref object 0 0))

(one (make-array 1 :initial-element nil)) =>
ERROR: The value #(nil) is not of type ARRAY * (* *)

(defun two (object)
(declare (optimize (safety 3)))
(setf (aref object 0 0) 345))

(two (make-array 1 :initial-element nil)) =>
ERROR: The value #(nil) is not of type ARRAY * (* *)

Rationale:

We think it was a simple omission from the draft ANSI specification
to not specify the behavior in this situation.

Current Practice:

SBCL 2.1.3
(one ...) => ERROR: The value #(nil) is not of type ARRAY * (* *)
(two ...) => ERROR: The value #(nil) is not of type ARRAY * (* *)

TODO: check other implementations.

Cost to Implementors:

Very small. We believe that most implementations are already
signaling an error in safe code. Some implementations may signal a
simple error, and those implementation would need to signal a
type-error instead.

Cost to Users:

None.

Cost of non-adoption:

Application programmers may need to add numerous
explicit checks to be certain that their code
is conforming.

Benefits:

Application programmers may rely on an error being
signaled in safe code, and thus avoid having to
add explicit checks in portable code.

Aesthetics:

No influence.

Discussion:

TODO
Loading