Dnia 22-02-2007, czw o godzinie 21:06 -0500, William D Clinger
napisa?(a):
> The current draft of the R6RS effectively forbids
> static rejection of libraries and programs that
> contain such violations, because there is always
> the remote possiblity that the violation might be
> a deliberate ploy to invoke some exception handler
> that might be installed by some other library.
I believe there should be defined a set of potential programs, called
e.g. statically valid programs, such that:
- It includes all programs which are intuitively correct.
- It's easy to determine whether a program is statically valid,
without running it.
- A conforming Scheme implementation must accept all statically valid
programs, and it must reject all programs which are not statically
valid (modulo implementation extensions, resource constraints etc.).
It may emit warnings though if it sees something suspicious in a
statically valid program.
In other words, an implementation is not allowed to reject a program
only on the basis of a sophisticated, non-standard analysis which would
conclude that a certain fragment will signal a violation at runtime.
In other words, program rejection criteria should be deterministic and
implementation-independent.
This is to prevent the following bad scenario:
- Programmer A creates a program.
- The program is tested on a Scheme implementation, and everything
is fine.
- A few years later, a few countries away user B compiles the program.
- She uses a different Scheme implementation, which is smarter, and
thanks to flow analysis coupled with a soft type system it finds
a genuine bug in the program. The bug is hidden in a path of code
which is executed only in pathological cases, e.g. during I/O error
recovery, and that's why it has never been found during testing.
- The bug prevents user B from using the program at all, even if it
would never execute the problematic code. She is not qualified to
understand and fix bugs in a large program she has not written.
--
__("< Marcin Kowalczyk
\__/ qrczak_at_knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
Received on Sun Feb 25 2007 - 11:35:52 UTC