Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Scheme > R6RS test suite
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 77 Topic 4625 of 4665
Post > Topic >>

R6RS test suite

by Matthew Flatt <mflatt@[EMAIL PROTECTED] > Jul 22, 2008 at 03:08 PM

The R6RS test suite for PLT Scheme is written as a collection of R6RS
libraries, and we hope that it can be useful to other R6RS
implementors. We'd very much like to have R6RS implementors and users
contribute to the test suite.

You can find the test suite in the PLT Scheme SVN repository:

  http://svn.plt-scheme.org/plt/trunk/collects/tests/r6rs/

So far, we've tried to get basic coverage of the standard: using each
function and syntactic form at least once, and trying the interesting
input cases for each.

The content of the "README.txt" file follows. As you can see, we
haven't had much success running the test suite on some other
implementations. For Ikarus and Larceny, the problems are not merely
how to load the libraries that contain the tests; the test suite's
organization prevents it from loading when an implementation is
missing small features. I'm not sure how to improve that without
relying on `eval' (and the content below explains why I'd prefer to
avoid `eval') or breaking up the tests into really small sets.

Any suggestions?

======================================================================
Files and libraries
======================================================================

Files that end ".sps" are R6RS programs. The main one is "main.sps",
which runs all the tests.

Files that end ".sls" are R6RS libraries. For example, "base.sls" is a
library that implements `(tests r6rs base)', which is a set of tests
for `(rnrs base)'. Many R6RS implementations will auto-load ".sls"
files if you put the directory of tests in the right place.

In general, for each `(rnrs <id> ... <id>)' in the standard:

 * There's a library of tests "<id>/.../<id>.sls". It defines and
   ex****ts a function `run-<id>-...<id>-tests'.

 * There's a program "run/<id>/.../<id>.sps" that im****ts
   "<id>/.../<id>.sls", runs the tests, and re****ts the results.

And then there's "main.sps", which runs all the tests (as noted
above). Also, "test.sls" implements `(tests r6rs test)', which
implements the testing utilities that are used by all the other
libraries.

======================================================================
Limitations and feedback
======================================================================

One goal of this test suite is to avoid using `eval' (except when
specifcally testing `eval'). Avoiding `eval' makes the test suite as
useful as possible to ahead-of-time compilers that implement `eval'
with a separate interpreter. A drawback of the current approach,
however, is that if an R6RS implementation doesn't supply one binding
or does not sup****t a bit of syntax used in a set of tests, then the
whole set of tests fails to load.

A related problem is that each set of tests is placed into one
function that runs all the tests. This format creates a block of code
that is much larger than in a typical program, which might give some
compilers trouble.

In any case, re****ts of bugs (in the tests) and new tests would be
very much appreciated. File either as a PLT Scheme bug re****t at

   http://bugs.plt-scheme.org

======================================================================
Hints on running the tests
======================================================================

Ikarus
------

Put this directory at "<somewhere>/tests/r6rs" and run with "run.sps"

  cd <somewhere>
  ikarus --r6rs-script tests/r6rs/run.sps

or run an individual library's test, such as "run/program.sps" as

  cd <somewhere>
  ikarus --r6rs-script tests/r6rs/run/program.sps

As of Ikarus 0.3.0+ (revision 1548), many libraries fail to load,
mostly because condition names like &error cannot be used as
expressions.

Larceny
-------

Put this directory at "<somewhere>/tests/r6rs" and run with "run.sps"

  larceny -path <somewhere> -r6rs -program run.sps

or run an individual library's test, such as "run/program.sps" as

  larceny -path <somewhere> -r6rs -program run/program.sps

As of Larceny 0.962, many test suites (such as "base.sls") take too
long and use too much memory to load on our machine; probably the test
functions are too big.

PLT Scheme
----------

If you get an SVN-based or the "Full" nightly build, then these tests
are
in a `tests/r6rs' collection already. You can run all of the tests
using

   mzscheme -l tests/r6rs/run.sps

and so on.

Otherwise, install this directory as a `tests/r6rs' collection,
perhaps in the location re****ted by

  (build-path (find-system-path 'addon-dir)
              (version) "collects"
              "tests" "r6rs")

As of PLT Scheme 4.0.2.5, two tests fail. They correspond to
do***ented non-conformance with R6RS.

Ypsilon
-------

[If there's a library-autoload mechanism, we didn't figure it
 out. Better ideas are welcome...]

Load the library declarations that you're interested in. For `(rnrs
<id> ... <id>)':

   * Load "test.sls"
   * Load "<id>/...<id>.sls"
   * Eval `(im****t tests r6rs <id> ... <id>)'
   * Eval `(run-<id>-...<id>-tests)'
   * Eval `(im****t tests r6rs test)'
   * Eval `(show-test-results)'
 




 77 Posts in Topic:
R6RS test suite
Matthew Flatt <mflatt@  2008-07-22 15:08:55 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-22 17:58:11 
Re: R6RS test suite
William D Clinger <ces  2008-07-22 19:11:25 
Re: R6RS test suite
Abdulaziz Ghuloum <agh  2008-07-22 19:10:14 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-23 03:32:32 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-23 04:22:43 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-23 04:44:17 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-23 05:09:49 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-23 05:35:23 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-23 06:08:30 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-23 06:20:56 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-23 07:21:25 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-23 07:22:39 
Re: R6RS test suite
William D Clinger <ces  2008-07-23 07:59:43 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-23 08:53:30 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-23 09:21:58 
Re: R6RS test suite
William D Clinger <ces  2008-07-23 12:08:12 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-23 13:19:30 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-23 13:20:22 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-23 14:03:10 
Re: R6RS test suite
y.fujita.lwp@[EMAIL PROTE  2008-07-26 01:49:14 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-26 05:32:50 
Re: R6RS test suite
samth <samth0@[EMAIL P  2008-07-26 05:59:32 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-26 06:25:13 
Re: R6RS test suite
y.fujita.lwp@[EMAIL PROTE  2008-07-26 07:26:27 
Re: R6RS test suite
William D Clinger <ces  2008-07-29 19:11:59 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-30 00:43:17 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-31 12:30:08 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-31 12:50:51 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-31 13:18:55 
Re: R6RS test suite
Matthew Flatt <mflatt@  2008-07-31 13:45:30 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-07-31 15:21:20 
Re: R6RS test suite
y.fujita.lwp@[EMAIL PROTE  2008-08-01 00:54:28 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-01 12:13:40 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-04 12:28:32 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-04 12:59:15 
Re: R6RS test suite
Abdulaziz Ghuloum <agh  2008-08-04 13:31:25 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-08 14:24:19 
Re: R6RS test suite
William D Clinger <ces  2008-08-08 15:24:49 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-08 15:38:35 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-09 15:34:12 
Re: R6RS test suite
William D Clinger <ces  2008-08-09 22:19:06 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-10 04:05:51 
Re: R6RS test suite
William D Clinger <ces  2008-08-10 07:55:36 
Re: R6RS test suite
Brad Lucier <lucier@[E  2008-08-10 22:24:22 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-11 00:05:50 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-11 03:00:48 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-11 03:44:41 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-11 04:38:29 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-11 04:57:32 
Re: R6RS test suite
William D Clinger <ces  2008-08-11 06:41:30 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-11 06:55:14 
Re: R6RS test suite
Abdulaziz Ghuloum <agh  2008-08-11 10:52:24 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-11 11:20:56 
Re: R6RS test suite
Abdulaziz Ghuloum <agh  2008-08-11 13:29:51 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-11 14:18:46 
Re: R6RS test suite
Brad Lucier <lucier@[E  2008-08-11 14:23:13 
Re: R6RS test suite
Abdulaziz Ghuloum <agh  2008-08-11 14:42:49 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-11 15:03:35 
Re: R6RS test suite
William D Clinger <ces  2008-08-11 15:57:39 
Re: R6RS test suite
William D Clinger <ces  2008-08-11 16:07:31 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-11 17:05:42 
Re: R6RS test suite
Abdulaziz Ghuloum <agh  2008-08-11 17:23:04 
Re: R6RS test suite
"pnkfelix@[EMAIL PRO  2008-08-11 18:09:28 
Re: R6RS test suite
William D Clinger <ces  2008-08-11 20:19:14 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-11 23:45:40 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-12 05:17:32 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-12 12:17:26 
Re: R6RS test suite
Brad Lucier <lucier@[E  2008-08-12 17:07:55 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-12 18:38:35 
Re: R6RS test suite
William D Clinger <ces  2008-08-12 21:31:46 
Re: R6RS test suite
Bill <schottstaedt@[EM  2008-08-13 07:10:46 
Re: R6RS test suite
William D Clinger <ces  2008-08-13 09:47:08 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-14 02:34:23 
Re: R6RS test suite
William D Clinger <ces  2008-08-14 05:04:43 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-14 05:23:51 
Re: R6RS test suite
leppie <xacc.ide@[EMAI  2008-08-14 05:25:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 20 13:10:34 CDT 2008.