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

From: Michael Sperber <sperber>
Date: Wed Nov 1 04:26:06 2006

Abdulaziz Ghuloum <aghuloum_at_cs.indiana.edu> writes:

> Calling a procedure with an incorrect number of arguments raises a
> &contract condition. Implementations, under safe mode, must trap
> such condition and invoke the installed exception handler. Under
> unsafe mode, implementations can ignore this condition since
> &contract is a subtype of &defect which is a subctype of
> &violation, and as per Section 9.22, "an implementation is allowed
> to ignore any requirements for raising an exception with condition
> type &violation (or any of its subtypes)". Is this correct?
>
> Also, as far as errors (such as attempting to open a nonexistent
> file) are concerned, implementations cannot ignore these errors
> even under unsafe mode since such errors raise &error which is
> *not* a subtype of &violation. Is this also correct?

It is my understanding that you're correct on all counts.

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
Received on Wed Nov 01 2006 - 04:25:56 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC