|
| 1 | +## Test suite for strong β-reduction |
| 2 | + |
| 3 | +We refer to reducers reducing under abstractions as *strong* reducers. |
| 4 | +The suite tests for strong β-reduction until normal form and therefore |
| 5 | +assumes reduction strategies where such normal form is found. |
| 6 | +(e.g. normal-order, leftmost-outermost, commonly referred to as |
| 7 | +Call-by-Need) |
| 8 | + |
| 9 | +Languages may be tested in one of two ways: |
| 10 | + |
| 11 | +- if the language reduces strongly and lazily, translate the tests to |
| 12 | + the language and use it to reduce the terms directly |
| 13 | +- if not, use a higher order (or NbE) reducer to reduce the terms |
| 14 | + |
| 15 | +Please contribute! |
| 16 | + |
| 17 | +### Tests |
| 18 | + |
| 19 | +The tests are reconstructed from the handwritten test suite of the |
| 20 | +[bruijn](https://bruijn.marvinborner.de) programming language. Currently |
| 21 | +the suite consists of 3466 tests. It comprises many different data |
| 22 | +structures and numeric encodings. Some of the tests are also quite long |
| 23 | +and contain redundant terms and potential for sharing. |
| 24 | + |
| 25 | +Each line in `tests` consists of |
| 26 | +`<bruijn term>: <term (blc)> - <nf (blc)>`. The left |
| 27 | +[BLC](https://tromp.github.io/cl/Binary_lambda_calculus.html) term is |
| 28 | +expected to be α-equivalent to the right BLC term after strong |
| 29 | +β-reduction. The bruijn representation is only used for prettyprinting |
| 30 | +and debugging. |
| 31 | + |
| 32 | +Any test reducing for more than 5s without reaching a normal form is |
| 33 | +deemed to have failed. |
| 34 | + |
| 35 | +### Results |
| 36 | + |
| 37 | +| Test | Passed | Timeout | Failed | |
| 38 | +|:---------------|:-------|:--------|:-------| |
| 39 | +| Haskell HOAS | 3466 | 0 | 0 | |
| 40 | +| Optiscope | 3301 | 164 | 1 | |
| 41 | +| Tromp AIT/nf.c | 1935 | 5 | 1526 | |
| 42 | +| Your project | ? | ? | ? | |
| 43 | + |
| 44 | +### Effects |
| 45 | + |
| 46 | +- improved optiscope: https://github.com/etiamz/optiscope/issues/5 |
0 commit comments