On Sun, 2009-12-27 at 08:47 +0200, ketmar wrote: > ikarus seems to fail 3 tests in r5rs_pitfalls: > ( http://sisc.sourceforge.net/r5rs_pitfall.scm ) > > Failure: 1.1, expected '0', got '1'. > Failure: 1.3, expected '#t', got '#f'.
In R6RS, these are illegal because you're not supposed to continue from a letrec <init> more than once. (As Leppie noted.) So, for an R6RS system, they shouldn't be considered as failing, because they're illegal. (But the legality doesn't have to be detected, as I noted in my previous message. I'm not sure what I think about that.) The message at the URL in the comments for 1.1 has a logical reason for why 0 should be expected, but it's an unclear tricky corner case issue, so I guess R6RS added its restriction to try to avoid the issue altogether. I'm not expert enough to have an opinion about this. I'm guessing 1.3 is happening because Ikarus's optimizations are assuming the R6RS restriction against continuing from an <init> more than once and because Ikarus doesn't see a set! and so the closure is closing over the initial value instead of the variable location. Or something. > ... > Failure: 8.3, expected '1', got '2'. As the comments for this one say, returning 1 is a bug in R5RS and the general agreement is that 2 should be returned. I think R6RS tried to fix this, but I came across the same general problem still existing (probably because R6RS is not clear enough) with some R6RS systems (not Ikarus nor Larceny) and there was a lengthy discussion about it at [1]. [1] http://groups.google.com/group/comp.lang.scheme/browse_thread/thread/3d66ac98e0f38236 -- : Derick ----------------------------------------------------------------
