Skip to content

Commit fe8ca8a

Browse files
committed
Correct benchmarks
1 parent 3565842 commit fe8ca8a

4 files changed

Lines changed: 25 additions & 25 deletions

File tree

encoding/abstract/template.txt

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,108 +44,108 @@
4444

4545
\print {
4646
/* Continue evaluation. */
47-
++this.wait;
47+
++this.total;
4848
} \wait[\print, \call];
4949

5050
\eval[\fan_{i}(a, b)] {
5151
/* Postpone evaluation. */
52-
++this.wait;
52+
++this.total;
5353
} \fan_{i}[a, b];
5454

5555
\eval[a] {
5656
/* Continue evaluation. */
57-
++this.wait;
57+
++this.total;
5858
} \wait[\eval(a), \call];
5959

6060
\eval[\atom_{M}] {
6161
/* Return an atom. */
62-
++this.wait;
62+
++this.total;
6363
} \atom_{M};
6464

6565
\eval[\lambda(a, b)] {
6666
/* Return abstraction. */
67-
++this.wait;
67+
++this.total;
6868
} \lambda[a, b];
6969

7070
\read_{C}[\fan_{i}(a, b)] {
7171
/* Duplicate context. */
72-
++this.read;
72+
++this.total;
7373
} \fan_{i}[\read_{C}(a), \read_{this.clone(C)}(b)];
7474

7575
\call {
7676
/* Erase late call. */
77-
++this.wait;
77+
++this.total;
7878
} \erase;
7979

8080
\fan_{i}[\wait(a, \amb(b, \decide(c, d), d)), \wait(e, b)] {
8181
/* Postpone duplication. */
82-
++this.wait;
82+
++this.total;
8383
} \wait[\fan_{i}(a, e), c];
8484

8585
\call {
8686
/* Continue evaluation. */
87-
++this.wait;
87+
++this.total;
8888
} \decide[\call, \erase];
8989

9090
\erase {
9191
/* Erase reference. */
92-
++this.wait;
92+
++this.total;
9393
} \decide[a, a];
9494

9595
\call {
9696
/* Continue evaluation. */
97-
++this.wait;
97+
++this.total;
9898
} \hold[a, \eval(a)];
9999

100100
\read_{C}[\wait(a, b)] {
101101
/* Postpone readback. */
102-
++this.wait;
102+
++this.total;
103103
} \wait[\read_{C}(a), b];
104104

105105
\erase {
106106
/* Erase holder. */
107-
++this.wait;
107+
++this.total;
108108
} \hold[\erase, \erase];
109109

110110
\erase {
111111
/* Erase reference. */
112-
++this.wait;
112+
++this.total;
113113
} \wait[\erase, \erase];
114114

115115
\apply[a, \wait(b, \hold(\apply(a, b), \wait(c, d)))] {
116116
/* Postpone application. */
117-
++this.wait;
117+
++this.total;
118118
} \wait[c, d];
119119

120120
\print {
121121
/* Output results of read-back. */
122122
this.nf = M;
123-
++this.read;
123+
++this.total;
124124
} \atom_{M};
125125

126126
\read_{C}[a] {
127127
/* Read back abstraction. */
128-
++this.read;
128+
++this.total;
129129
} \lambda[\atom_{this.mkid()}, \read_{this.abst(C)}(a)];
130130

131131
\apply[\read_{this.appl(M)}(a), a] {
132132
/* Read back application. */
133-
++this.read;
133+
++this.total;
134134
} \atom_{M};
135135

136136
\read_{C}[\atom_{this.atom(C, M)}] {
137137
/* Read back an atom. */
138-
++this.read;
138+
++this.total;
139139
} \atom_{M};
140140

141141
\fan_{i}[\atom_{M}, \atom_{M}] {
142142
/* Duplicate an atom. */
143-
++this.read;
143+
++this.total;
144144
} \atom_{M};
145145

146146
\erase {
147147
/* Erase an atom. */
148-
++this.read;
148+
++this.total;
149149
} \atom_{M};
150150

151151
\erase {
@@ -170,7 +170,7 @@
170170

171171
\erase {
172172
/* Erase context. */
173-
++this.read;
173+
++this.total;
174174
} \read_{C}[\erase];
175175

176176
$$
@@ -235,5 +235,3 @@ this.minus = cons.bind(this, "-");
235235
this.uniq = uniq;
236236
this.beta = 0;
237237
this.total = 0;
238-
this.wait = 0;
239-
this.read = 0;

encoding/optimal/template.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
\apply[a, \scope_{0}(b)] {
170170
/* Apply beta reduction. */
171171
++this.beta;
172+
++this.total;
172173
} \lambda[\wait(c, \hold(\scope_{0}(c), a)), b];
173174

174175
\fan_{i}[\apply(a, b), \apply(c, d)] {

encoding/turning/template.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
\apply[a, b] {
118118
/* Apply beta reduction. */
119119
++this.beta;
120+
++this.total;
120121
} \lambda[\wait(c, \hold(c, a)), b];
121122

122123
\apply[a, \outapp(\fanout_{i}(b, c), a)] {

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.0.9",
7+
"version": "0.1.0",
88
"license": "MIT",
99
"dependencies": {
1010
"inet-lib": "0.2.2",

0 commit comments

Comments
 (0)