[R6RS] revised^1 exception vote list
dyb at cs.indiana.edu
dyb at cs.indiana.edu
Tue May 16 16:27:31 EDT 2006
1. If an implementation is unable to perform an action or
return a value in a way compatible with the R6RS, then
it (must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &implementation-restriction
2. If a procedure is passed an argument that is not of the
type specified by the R6RS (noting that, for the purpose
of this vote, list and alist are not considered types
because their definitions are complicated by concurrent
or interleaved side effects), then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &type
3. If a side-effecting procedure (e.g. set-car!, set-cdr!,
vector-set!, string-set!) is passed an immutable object,
such as the value of a literal constant or the string
returned by symbol-string, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &immutable
["Must" or "should" implies that eval is required or encouraged to
copy constants in programs constructed dynamically to some read-only
area. I would actually prefer that eval be discouraged from copying
constants. "May" is compatible with R5RS.]
["Must" is an onerous requirement for some implementations.]
4. If a definition or expression is not syntactically
correct (e.g. (if x y z w) or (lambda (x x) x)),
then it (must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &syntax
[I'm assuming that an implementation is free to refuse to run a
program that contains such an error, as we discussed last week.]
5. If a definition or expression refers to a variable
that is not bound within the library in which the
definition or expression appears, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &undefined-variable
[See note under #4.]
6. If evaluation of a letrec or letrec* or an equivalent
sequence of internal definitions results violates the
letrec or letrec* condition, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &letrec
7. If an assignment (set!) is executed, and the left
hand side of the assignment is not defined in the
library that contains the assignment, or in some
other context has not yet been defined, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &undefined-variable
[What is meant by "has not yet been undefined"?]
[See note under #4.]
8. If an assignment (set!) is executed, and the left
hand side of the assignment is immutable because
it was imported, or is defined in some environment
whose exported variables are immutable, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &immutable-variable
[See note under #4.]
9. If no possible result of the number-string procedure
would satisfy its specification, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &result
10. If the result of some arithmetic procedure is specified
to be an infinity that the implementation is unable to
represent, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &no-infinities
11. If the result of some arithmetic procedure is specified
to be a NaN that the implementation is unable to
represent, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &no-nans
12. If the empty list is passed to the car procedure,
then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &pair
13. If the empty list is passed to the cdr procedure,
then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &pair
14. If the appropriate composition of car and cdr operations
is not defined for the argument of one of the caar through
cddddr procedures, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &domain
15. If the argument to the length procedure is not a plausible
list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &list
16. If an argument to the append procedure is not a plausible
list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &list
[The original formulation of this question included the phrase
"and the argument is not the last argument". With this added,
I would vote "must".]
17. If the last argument to the append procedure is not a
plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: returns
raise an exception with
condition type: &list
[Anything other than "returns" is incompatible with r5rs. Also,
aything other than returns might break implementations of quasiquote
that currently use append to handle unquote-splicing, unless we
decide to similarly modify the semantics of unquote-splicing.]
18. If the argument to the reverse procedure is not a
plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &list
19. If some index argument to a procedure that requires
an index (e.g. list-ref, list-tail, vector-ref) is
not a non-negative exact integer, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &non-negative-exact-integer
20. If the second argument to list-ref or list-tail is
n, and the first argument is not a plausible list
up to n, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &list
[Doesn't list-ref require a plausible list up to n+1?]
[I think this should be &range in the case where the input is a
plausible list but not a plausible list up to n (or n+1).]
21. If the first argument to list-ref or list-tail is
not a plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &list
[I would say that it must return unless it raises an
exception under #20.]
22. If (1) there does not exist a natural number n such
that the second argument to memq, memv, or member
is the first Scheme value of a plausible prefix of
length n such that the last value xn of that prefix
has the first argument as its car at some time after
tn and before the procedure returns, and (2) the
second argument is not a plausible list, and (3)
there exists some natural number n such that the
second argument is not the first Scheme value of
any plausible prefix of length n, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &list
23. If (1) there does not exist a natural number n such
that the second argument to memq, memv, or member
is the first Scheme value of a plausible prefix of
length n such that the last value xn of that prefix
has the first argument as its car at some time after
tn and before the procedure returns, and (2) the
second argument is not a plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &list
24. If the second argument to memq, memv, or member is
not a plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &list
[I would say that it must return unless it raises an
exception under #22 or #23.]
25. If (1) there does not exist a natural number n such
that the second argument to assq, assv, or assoc
is the first Scheme value of a plausible prefix of
length n such that every Scheme value x1 through xn
of that prefix is a pair, and xn has a pair as its
car at some time after tn, and at some time after
that the car of that pair is the first argument,
all before the procedure returns, and (2) the
second argument is not a plausible alist, and (3)
there exists some natural number n such that the
second argument is not the first Scheme value of
any plausible alist prefix of length n, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &alist
26. If (1) there does not exist a natural number n such
that the second argument to assq, assv, or assoc
is the first Scheme value of a plausible prefix of
length n such that every Scheme value x1 through xn
of that prefix is a pair, and xn has a pair as its
car at some time after tn, and at some time after
that the car of that pair is the first argument,
all before the procedure returns, and (2) the
second argument is a plausible list but not a
plausible alist, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &alist
27. If the second argument to assq, assv, or assoc is
not a plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &list
[I would say that it must return unless it raises an
exception under #25 or #26.]
28. If the argument to integer-char is not a Unicode
scalar value (i.e. is outside the range of Unicode
scalar values, or within the range of surrogates),
then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &scalar-value
[I assume "integer-char" should be "integer->char".]
29. If the first argument to make-string or make-vector
is not a non-negative exact integer, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &non-negative-exact-integer
30. If the first argument to make-string or make-vector
is a non-negative exact integer that is larger than
some implementation-specific limit on the size of a
string or vector, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &implementation-restriction
31. If the second argument to string-ref, vector-ref,
string-set!, or vector-set! is not a non-negative
exact integer, or the second or third argument to
substring is not a non-negative exact integer, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &non-negative-exact-integer
32. If the second argument to string-ref or vector-ref
is a non-negative exact integer that is larger than
the string-length or vector-length of the first
argument, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &range
33. If the second or third argument to substring is
a non-negative exact integer that is larger than
the string-length of the first argument, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &range
34. If the second argument to substring is larger than
the third, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &incompatible
35. If the argument to list-string or list->vector is
not a plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &list
36. If the argument to list-string is a plausible list,
but for every natural number n and for every plausible
prefix of that argument of length n there exists an i
such that for all times t such that ti < t < the time
of first return from list-string the car of xi is not
a character, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &domain
37. If the last argument to apply is not a plausible list,
then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &list
38. If any but the first argument to map or for-each is
not a plausible list, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &list
39. If two of the list arguments x and y to map or for-each
are plausible lists, but there does not exist a
natural number n such that x and y are both plausible
lists of length n, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &incompatible
40. If the argument to force is not a promise created by
delay, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &domain
41. If the escape procedure that is created by
call-with-current-continuation is called with zero
arguments or with more than one argument, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &violation
[This should depend on the continuation.]
42. If zero values or more than one value are returned
to a continuation that requires one value, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &values
43. If an escape procedure is used to escape from the
dynamic context of the before or after thunks passed
to a dynamic-wind, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &violation
[Can we nail down what it does rather than considering it an error?]
44. If the first argument to eval is not syntactically
correct, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &syntax
45. If the second argument to eval is omitted or is not
one of the environments or things that R6RS explicitly
allows as the second argument to eval, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &eval-environment
46. If the first argument to eval is a definition, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &eval-definition
[I prefer must &syntax: a definition isn't an expression.
47. If the argument to null-environment or scheme-report-environment
is not one of the exact integers 5 or 6, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &domain
[I'd prefer not to support (null-environment 6) or
(scheme-report-environment 6) and move these into an r5rs
compatibility library. If they do support argument 6, which of our
several libraries would these represent?]
48. If interaction-environment is called, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &nonstandard
[I'd prefer we just flush this.]
49. If any i/o procedure detects what would (in most other
languages/libraries) be considered an i/o error, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &io
50. If call-with-input-file or open-input-file is asked
to open a file that doesn't seem to exist, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &file-does-not-exist
51. If call-with-output-file or open-output-file is asked
to open a file that seems already to exist, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &file-exists
[Would be nice to give programmer options, e.g., truncate, remove,
error, append.]
52. If the string argument to call-with-input-file,
call-with-output-file, open-input-file, or
open-output-file is not a string of the form
that is used to name files on the executing
systems, then it
(must/should/may/might/returns/abstain/discuss)
Vote: should
raise an exception with
condition type: &domain
[Syntax may depend on non-Scheme libraries that the programmer
links with the program.]
53. If call-with-input-file, call-with-output-file,
open-input-file, or open-output-file is unable
to open a file for any other reason, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &io
54. If read encounters an end-of-file in the middle of
parsing some external representation that is not yet
complete, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &lexical
55. If read encounters the external representation of an
infinity (e.g. -inf.0 or +inf.0), and the implementation
is unable to represent the infinity, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &no-infinities
56. If read encounters the external representation of an
NaN (e.g. +nan.0), and the implementation is unable to
represent the NaN, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &no-nans
57. If read encounters the external representation of any
other number that the implementation is unable to
represent (e.g. a one followed by one million zeros
in a system that is unable to represent such large
numbers), then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &implementation-restriction
58. If read encounters an external representation of the
form #!<symbol, where <symbol> is a valid external
representation of a symbol, then it
(must/should/may/might/returns/abstain/discuss)
Vote: may
raise an exception with
condition type: &lexical
[I think "may" is essentially what we decided two weeks ago.]
59. If read encounters an external representation of the
form #{<datum*}, where <datum>* is a sequence of
valid external representations, then it
(must/should/may/might/returns/abstain/discuss)
Vote: discuss
raise an exception with
condition type: &lexical
[What is the rationale for addressing this particular extension?]
60. If read encounters any other nonstandard external
representation, then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &lexical
61. If the first argument to write, display, or write-char
cannot be output to its second argument (e.g. the first
argument to write-char is some weird Unicode character,
and the output port accepts only ASCII characters), then it
(must/should/may/might/returns/abstain/discuss)
Vote: must
raise an exception with
condition type: &incompatible
More information about the R6RS
mailing list