[r6rs-discuss] Compile-time detection of contract violations

Abdulaziz Ghuloum aghuloum at cs.indiana.edu
Thu Oct 26 15:07:24 EDT 2006


On Oct 26, 2006, at 10:23 AM, William D Clinger wrote:
>> My position is that if I write a correct library for R6RS, I want it 
>> to
>> be accepted by *all* R6RS-conforming implementations, regardless of 
>> how
>> extensive and incomplete its analysis may be.
>
> The meaning of the word "correct" will be defined in part
> by the R6RS.                      ^^^^^^^         ^^^^^^^

It's not in the current draft, right?  And does the "in part" part mean 
that implementors will have some freedom in rejecting/accepting 
programs as they please?

> On my reading of the current draft, a program
> that contains (lambda () (cons 1 2 3)) cannot possibly be
> correct, even if you have a proof that the call to cons
> will never be executed.

If (lambda () (cons 1 2 3)) cannot possibly be correct, then what about:
    (lambda () ((begin cons) 1 2 3)),
    (lambda () ((if #t cons list) 1 2 3)), and
    (lambda () ((f) 1 2 3)) where f may/will return cons?

Thanks.

Aziz,,,,




More information about the r6rs-discuss mailing list