Skip to content

Commit 4926d9b

Browse files
committed
Describe and test 'standard'
1 parent 89feb51 commit 4926d9b

File tree

3 files changed

+45
-40
lines changed

3 files changed

+45
-40
lines changed

README.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ this is the default algorithm;
1919
by Ian Mackie;
2020

2121
* `optimal`, an implementation of
22-
[_Lambdascope_][5] by Vincent van Oostrom et al.
22+
[_Lambdascope_][5] by Vincent van Oostrom et al;
23+
24+
* `standard`, an implementation of optimal reduction as in
25+
[_The Optimal Implementation of Functional Programming Languages_][8],
26+
pages 40-41.
2327

2428
The embedded read-back mechanism is described
2529
in Section 7 of [10.4204/EPTCS.225.7][4].
@@ -30,30 +34,31 @@ in Section 7 of [10.4204/EPTCS.225.7][4].
3034
[5]: http://www.phil.uu.nl/~oostrom/publication/pdf/lambdascope.pdf
3135
[6]: https://arxiv.org/abs/1710.07516
3236
[7]: https://doi.org/10.1145/96709.96711
37+
[8]: https://books.google.com/books?id=Bod5HbPh-WwC
3338

3439
# Benchmarks
3540

3641
The following is output of the `test.sh` script provided in the package:
3742

3843
```
39-
SAMPLE ABSTRACT CLOSED OPTIMAL
40-
counter 27/4 58/6 143/4
41-
w2eta 37/7 137/16 205/7
42-
1021 199/55 11871/1088 1599875/55
43-
22210i 494/68 2539/254 58602/68
44-
3222i 1206/50 8638/819 804529/50
45-
1022i 4317/69 33369/3139 N/A
46-
4222i 262425/72 2097926/196692 N/A
47-
222210i 1311135/139 8652059/852063 N/A
48-
2222101 2621862/327818 N/A N/A
49-
facty6nt 1112/210 80562/2436 2790150/210
50-
facty9i 1629/287 3746232/130949 N/A
51-
33-fact4 3770/704 16114/912 80706/704
52-
fibo16nt 24931/3042 134135/5673 5462373/3042
53-
fact100i 28502/3752 121854/10565 N/A
54-
35-fact5 72944/13480 805218/16206 4702709/13480
55-
fibo20i 93534/6863 536843/24626 1961507/6863
56-
fact1knt 6215039/1353692 N/A N/A
44+
SAMPLE ABSTRACT CLOSED OPTIMAL STANDARD
45+
counter 27/4 58/6 143/4 121/4
46+
w2eta 37/7 137/16 205/7 374/7
47+
1021 199/55 11871/1088 1599875/55 4307803/55
48+
22210i 494/68 2539/254 58602/68 N/A
49+
3222i 1206/50 8638/819 804529/50 N/A
50+
1022i 4317/69 33369/3139 N/A N/A
51+
4222i 262425/72 2097926/196692 N/A N/A
52+
222210i 1311135/139 8652059/852063 N/A N/A
53+
2222101 2621862/327818 N/A N/A N/A
54+
facty6nt 1112/210 80562/2436 2790150/210 3013433/210
55+
facty9i 1629/287 3746232/130949 N/A N/A
56+
33-fact4 3770/704 16114/912 80706/704 234075/704
57+
fibo16nt 24931/3042 134135/5673 5462373/3042 8959455/3042
58+
fact100i 28502/3752 121854/10565 N/A N/A
59+
35-fact5 72944/13480 805218/16206 4702709/13480 N/A
60+
fibo20i 93534/6863 536843/24626 1961507/6863 4023117/6863
61+
fact1knt 6215039/1353692 N/A N/A N/A
5762
```
5863

5964
`T/B` should be read as total of `T` interactions,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"repository": "codedot/lambda",
55
"name": "@alexo/lambda",
66
"bin": "./lambda.js",
7-
"version": "0.3.6",
7+
"version": "0.3.7",
88
"license": "MIT",
99
"dependencies": {
1010
"inet-lib": "0.2.5",

test.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ compare()
3131
printf "\n"
3232
}
3333

34-
printf "$TERMF$CELLF$CELLF$CELLF\n" SAMPLE \
35-
ABSTRACT CLOSED OPTIMAL
36-
37-
compare counter abstract closed optimal
38-
compare w2eta abstract closed optimal
39-
compare 1021 abstract closed optimal
40-
compare 22210i abstract closed optimal
41-
compare 3222i abstract closed optimal
42-
compare 1022i abstract closed OPTIMAL
43-
compare 4222i abstract closed OPTIMAL
44-
compare 222210i abstract closed OPTIMAL
45-
compare 2222101 abstract CLOSED OPTIMAL
46-
compare facty6nt abstract closed optimal
47-
compare facty9i abstract closed OPTIMAL
48-
compare 33-fact4 abstract closed optimal
49-
compare fibo16nt abstract closed optimal
50-
compare fact100i abstract closed OPTIMAL
51-
compare 35-fact5 abstract closed optimal
52-
compare fibo20i abstract closed optimal
53-
compare fact1knt abstract CLOSED OPTIMAL
34+
printf "$TERMF$CELLF$CELLF$CELLF$CELLF\n" SAMPLE \
35+
ABSTRACT CLOSED OPTIMAL STANDARD
36+
37+
compare counter abstract closed optimal standard
38+
compare w2eta abstract closed optimal standard
39+
compare 1021 abstract closed optimal standard
40+
compare 22210i abstract closed optimal STANDARD
41+
compare 3222i abstract closed optimal STANDARD
42+
compare 1022i abstract closed OPTIMAL STANDARD
43+
compare 4222i abstract closed OPTIMAL STANDARD
44+
compare 222210i abstract closed OPTIMAL STANDARD
45+
compare 2222101 abstract CLOSED OPTIMAL STANDARD
46+
compare facty6nt abstract closed optimal standard
47+
compare facty9i abstract closed OPTIMAL STANDARD
48+
compare 33-fact4 abstract closed optimal standard
49+
compare fibo16nt abstract closed optimal standard
50+
compare fact100i abstract closed OPTIMAL STANDARD
51+
compare 35-fact5 abstract closed optimal STANDARD
52+
compare fibo20i abstract closed optimal standard
53+
compare fact1knt abstract CLOSED OPTIMAL STANDARD

0 commit comments

Comments
 (0)