Discussion:
[Larceny-users] srfi-19 testing and larceny-5889 errors
Marco Maggi
2009-01-07 22:32:14 UTC
Permalink
In my effort to test srfi-19 I have
written:

http://github.com/marcomaggi/nausicaa/tree/master/srfi/tests/test-time.sps

which shows errors when loading (srfi :19)
from Larceny into Larceny-5889.

My modified reference implementation:

http://github.com/marcomaggi/nausicaa/tree/master/srfi/libraries/srfi/time.sls

passes most of the tests (the wrong ones
are DATE->STRING with ~U and ~V escape
sequences, for which I still have to
understand exactly what the SRFI document
requires and if it conforms to what GNU
date prints).

I do not guarantee that my modified
implementation does the right thing, but
with some of the tests IMHO Larceny really
does the wrong thing.

Notice also:

http://srfi.schemers.org/srfi-19/post-mail-archive/msg00029.html

I will stick with what the reference
implementation does...
--
Marco Maggi

"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"
William D Clinger
2009-01-08 08:04:47 UTC
Permalink
Marco Maggi wrote a test program...
Post by Marco Maggi
which shows errors when loading (srfi :19)
from Larceny into Larceny-5889.
I have fixed a few bugs in Larceny's implementation of
(srfi :19 time). Most of these were bugs in the reference
implementation. (It is unclear to me whether the nanosecond
argument to make-time should be allowed to be greater than
or equal to 10^9. The reference implementation sometimes
assumed that argument was strictly less than 10^9, but
also contained at least one line of code that tried to
compensate if the nanosecond field of a time was a trifle
larger than 10^9.)

As noted in a FIXME comment, something is wrong with the
SRFI 19 specifications of ~U, ~V, and ~W as well as ~x.
I have assumed that the reference implementation of ~U
and ~W is correct, which means that the specification
of ~U is correct (but is slightly different from Marco's
interpretation) and the specification of ~W is correct
except for the stated range of results.

I don't know what to do about ~V, whose specification
and reference implementation both appear to be incorrect.
I just left its implementation alone.

Will

Loading...